Skip to main content

Certificate Templates

Certificate templates define the visual design of certificates — layout, typography, and graphical elements. Templates are reusable: one template can be applied to thousands of certificates. They are linked to an institution and optionally configured via Canva for visual editing.

The certificate template object

{
  "uuid": "i9j0k1l2-m3n4-5678-opqr-789012345678",
  "name": "Undergraduate Diploma 2024",
  "version": "1.0",
  "path": "templates/diploma-2024.pdf",
  "preview_image_path": "templates/previews/diploma-2024.png",
  "canva_config": null,
  "is_default": true,
  "status": "active",
  "institution": {
    "uuid": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Federal University of Technology"
  }
}
FieldTypeDescription
uuidstringUnique identifier
namestringTemplate display name
versionstringVersion identifier
pathstringInternal file path of the template
preview_image_pathstring|nullPath to the preview image
canva_configjson|nullCanva design configuration object
is_defaultbooleanWhether this is the default template for the institution
statusenumactive, inactive

List templates

GET /certificate-templates
curl "https://api.dokstamp.eu/certificate-templates?where[status]=active" \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Accept: application/json" \
  -H "X-Tenant: {TENANT}"

Create a template

POST /certificate-templates
ParameterTypeRequiredDescription
namestringYesTemplate name
versionstringYesVersion string
institution_uuidstringYesParent institution UUID
pathstringYesFile path of the template document
preview_image_pathstringNoPreview image path
canva_configobjectNoCanva design configuration
is_defaultbooleanNoSet as the institution’s default template
statusenumNoactive (default), inactive
curl -X POST https://api.dokstamp.eu/certificate-templates \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-Tenant: {TENANT}" \
  -d '{
    "name": "Undergraduate Diploma 2024",
    "version": "1.0",
    "institution_uuid": "550e8400-e29b-41d4-a716-446655440000",
    "path": "templates/diploma-2024.pdf",
    "is_default": true,
    "status": "active"
  }'

Get, update, delete

GET    /certificate-templates/{uuid}
PATCH  /certificate-templates/{uuid}
PUT    /certificate-templates/{uuid}
DELETE /certificate-templates/{uuid}
DELETE /certificate-templates/batch/destroy

Using a template when issuing certificates

Pass the template_uuid when creating a certificate:
{
  "template_uuid": "i9j0k1l2-m3n4-5678-opqr-789012345678",
  ...
}
If template_uuid is omitted and the institution has a default template (is_default: true), the default is applied automatically.