Templates

Publish the draft

Validates the draft (compile, options, syntax, datasets) and publishes a new live version. 201 when the run finished, 202 when validation is still running, 422 when a step failed — the problem details then carry the run in publish_run.

post/v1/templates/{template_id}/publish

Request

  • Base URL: https://api-eu.dynamicdocumentapi.com
  • URL: https://api-eu.dynamicdocumentapi.com/v1/templates/{template_id}/publish
  • Auth: one of:
    • HTTP bearer
    • API key in header X-API-Key

Path parameters

template_idstring required

Template id (tpl_…).

Headers

Idempotency-Keystring

Replays the stored response for 24 h; a different body with the same key → 422.

Request body

notestring

Response

Published.

created_atstring date-time required
draft_revisioninteger required
errorobject nullable required
errorsobject[] required

Flattened, with step.

finished_atstring date-time nullable required
idstring required

pub_…

notestring required
objectstring
status'running' | 'succeeded' | 'failed' required
  • running - running
  • succeeded - succeeded
  • failed - failed
template_idstring required
versionobject nullable required

{id, number, content_hash, published_at, note} once published.

warningsobject[] required

Changes

No recorded changes to this operation across all 2 revisions of this API.