Skip to main content

Write the draft content of a template

PUT 

/v1/click/templates/:templateId/draft

Replaces the title, body, texts and acknowledgments of each locale named, so a template created through the API can be published without the dashboard. Locales not named, and everything else about the draft, are left as they are. Nothing published changes: deployments serve version records. A body is saved in its normalized form (<br> becomes <br />, & becomes &amp;); one that carries markup that would have to be removed, such as a script or an event handler, is refused with 422 CLICK_CONTENT_UNSAFE naming it, and nothing is written. Publishing applies the same rule.

Request​

Responses​

The draft after the write

Response Headers
    X-Request-Id

    Correlation id for this request, returned on every response (success and error). Quote it when contacting support to pinpoint the exact request, and use it to correlate your own logs. It is the same 128-bit id as the trace-id segment of the traceparent header.

    traceparent

    W3C Trace Context identifier for this request, returned on every response. Send your own traceparent on a request to have it adopted, so a multi-call workflow shares one trace. Format: 00-<32-hex trace-id>-<16-hex span-id>-<2-hex flags>.