Skip to main content

Submit Template for Review

Submit a draft template for admin approval. After submission, the template enters pending_approval status.

Endpoint

POST /templates/{template_id}/submit

Path Parameters

ParameterTypeRequiredDescription
template_idstringYesThe template ID

Request

curl -X POST https://api.docyard.io/v1/templates/tmpl-ins-dec-001/submit \
  -H "X-API-Key: dk_live_dist_aaaaaaaa" \
  -H "X-API-Secret: dk_secret_dist_bbbbbbbb"

Response

{
  "template_id": "tmpl-ins-dec-001",
  "status": "pending_approval",
  "submitted_at": "2026-03-15T10:00:00Z",
  "message": "Template submitted for review. You will be notified once approved."
}

Error Responses

Invalid Status (409)

{
  "error": "invalid_status",
  "message": "Template cannot be submitted",
  "details": {
    "current_status": "pending_approval",
    "required_status": "draft"
  }
}

Not Found (404)

{
  "error": "not_found",
  "message": "Template not found"
}