Templates

Update a template

Replaces the fields of an existing template. The payload and its validation are identical to POST /api/templates — including the merge-field placeholders documented there, whose available values come from GET /api/board/{boardId}/merge-fields. On top of the template permission, the acting user must have access to the library folder the template sits in. A template that does not exist — or belongs to another company — returns 404; an archived one returns 403, since it is the caller's own and GET /api/templates/{id} still returns it.

put/api/templates/{id}

Request

Path parameters

idstring required

Template ID.

Request body

companyIdstring

Required with a partner token; resolved from an API key or delegate token.

userIdstring

The acting user. Required with an API key or partner token; a delegate token supplies its own.

namestring required
descriptionstring required
templateType'sms' | 'email' | 'form' | 'eSignature' | 'pdf' required

Template kind. blockDocument is not accepted — it is an internal type for document blocks, not a user-facing template.

subjectstring required

Email subject, or the file name for a pdf template — in which case filename-illegal characters are stripped. Merge placeholders work here too, and are shape-checked the same way.

contentstring required

Template body. Merge placeholders take the form {{value}} or {{value || fallback: text}}, where value is an item's value from GET /api/board/{boardId}/merge-fields — for example {{firstname}}, {{Locations["Rent"] || fallback: TBD}}. They are checked for shape — an unclosed {{, an empty field name or a malformed bracket reference is rejected. Whether each field exists is not checked: an unknown one renders as its fallback at merge time.

htmlBuilderfalse

Must be false or omitted. HTML-builder templates keep their markup in a builder-owned builderData format and can only be authored in the app.

builderDataobject

Builder document, when one already exists.

folderIdstring

Library folder the template belongs to — must be an existing, non-archived folder in the company. Governs who may edit the template.

aptletUuidstring

Board the template is scoped to. Must be an existing, non-archived board in the company.

signaturestring
attachmentIdsstring[]

Uploaded file ids to attach.

Response

Template updated.

Changes

No recorded changes to this operation across all 1 revision of this API.