Skip to main content

Reject Template

Reject a template and provide feedback to the distributor.

Endpoint

POST /admin/templates/{template_id}/reject

Path Parameters

ParameterTypeRequiredDescription
template_idstringYesThe template ID

Request

curl -X POST https://api.docyard.io/v1/admin/templates/tmpl-ins-dec-002/reject \
  -H "X-API-Key: dk_live_admin_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "The validation pattern for policy_number is too restrictive. Consider accepting alphanumeric characters beyond the specified pattern.",
    "feedback": {
      "field": "locks.policy_number.validation.pattern",
      "suggestion": "Use a more flexible regex pattern that accommodates your actual policy number format."
    }
  }'

Response

{
  "template_id": "tmpl-ins-dec-002",
  "status": "rejected",
  "rejected_at": "2026-03-15T11:00:00Z",
  "rejected_by": "admin-001",
  "reason": "The validation pattern for policy_number is too restrictive.",
  "feedback": {
    "field": "locks.policy_number.validation.pattern",
    "suggestion": "Use a more flexible regex pattern."
  },
  "message": "Template rejected. Distributor has been notified."
}