Skip to main content

Get Template

Retrieve details of a specific artifact type template.

Endpoint

GET /templates/{template_id}

Path Parameters

ParameterTypeRequiredDescription
template_idstringYesThe template ID

Request

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

Response

{
  "template_id": "tmpl-ins-dec-001",
  "name": "Insurance Declaration Page",
  "description": "Standard insurance policy declaration document",
  "status": "published",
  "owner": {
    "id": "dist-abc123",
    "name": "Acme Insurance"
  },
  "locks": [
    {
      "name": "policy_number",
      "data_type": "string",
      "description": "Unique insurance policy identifier",
      "validation": {
        "pattern": "^POL-[0-9]{8}$"
      },
      "weight": 20,
      "required": true
    },
    {
      "name": "effective_date",
      "data_type": "date",
      "description": "Date the policy coverage begins",
      "weight": 10,
      "required": true
    }
  ],
  "created_at": "2026-03-10T09:00:00Z",
  "published_at": "2026-03-12T14:00:00Z"
}

Error Responses

Not Found (404)

{
  "error": "not_found",
  "message": "Template not found",
  "details": {
    "template_id": "tmpl-nonexistent"
  }
}