POST/v1/templates/{id}/publish

Publish the draft as a new version

Scope templates.writeIdempotent with a key

Path parameters

idstringrequired

Headers

Idempotency-Keystringmax length 255

Up to 255 characters, scoped to the organisation and the endpoint, kept for 24 hours: a repeat with the same body replays the stored response with Idempotent-Replayed: true (API-004).

Body

sampleVariablesobject
sampleRecipientobject
6 fields
namestringrequired
addressLine1stringrequired
addressLine2string
postalCodestringrequired
citystringrequired
countrystringrequired

Returns

12 fields of the 201 answer
idstringrequired
numberintegerrequired
publishedAtdate-timerequired
publishedByTypeenumrequired
USERAPI_KEYMCP_CONNECTION
publishedByIdstringrequired
staticLayerStatusenumrequired
PENDINGREADYFAILED
templateIdstringrequired
documentobjectrequired
6 fields
schemaVersionnumberrequired
productobjectrequired
7 fields
specificationIdstringrequiredmin length 1
trimWidthMmnumberrequired
trimHeightMmnumberrequired
bleedMmnumberrequiredmin 0
safeZoneMmnumberrequiredmin 0
pagingobject or null
3 fields
minPagesintegerrequiredmin 1max 20
maxPagesintegerrequiredmin 1max 20
duplexbooleanrequired
foldenum or null
side
pagesarray of objectsrequiredmin items 1
3 fields
idstringrequired
sidestringrequiredmin length 1max length 32
elementsarray of one ofrequiredmax items 500
colorsobjectrequired
fontsarray of objectsrequired
3 fields
idstringrequiredmin length 1
familystringrequiredmin length 1
sourceenumrequired
curatedorganisationgoogle
metaobject
schemaVersionintegerrequired
variableSchemaarray of objectsrequired
13 fields
namestringrequired
typeenumrequired
textnumberdatedatetimebooleanimageUrlurllist
requiredbooleanrequired
kindenum

Who fills the variable: `customer` per item (the default when absent) or `fixed` with the value the product sets.

customerfixed
valuestring

The value of a fixed variable. Left out when the product's base hides the variable from customers.

fallbackstring
maxLengthinteger
formatstring
localeenum
nlen
trueTextstring
falseTextstring
descriptionstring
fieldsarray of objects
6 fields
namestringrequired
typeenumrequired
textnumberdatedatetimebooleanimageUrlurl
formatstring
localeenum
nlen
trueTextstring
falseTextstring
staticElementIdsobjectrequired
warningsarray of objectsrequired
5 fields
codestringrequired
severityenumrequired
errorwarning
messagestringrequired
pageIdstring
elementIdstring

Responses

201Success
401Authentication required or API key invalid
403Permission or scope missing, organisation suspended
404Not found
409A request with this Idempotency-Key is still in progress (idempotency_in_progress)
422Validation failed
429Rate limited for this API key and class; wait Retry-After seconds
otherError (RFC 9457 problem details)