Skip to navigation

Update a stored PDF template

Changes a template of the organization of the API key; only the fields you send change. The id comes from the path. isActive is not accepted (400 UNSUPPORTED_FIELD); deactivate a template in the Console. System templates are read-only (403 SYSTEM_TEMPLATE_READ_ONLY); a template of another organization is 404. isDefault: true makes it the default template of the whole organization. Requires an API key with pdf:template:update and purpose user; session keys get 403 SESSION_KEY_FORBIDDEN. Not metered.

Authentication

AuthorizationBearer

API Key authentication. Use sk_live_* for production or sk_test_* for testing.

Path parameters

idstringRequiredformat: "uuid"
Template id

Request

Partial update: only the fields you send change. The template id comes from the path; an id in the body is ignored. isActive is not accepted (400 UNSUPPORTED_FIELD) — deactivate a template in the Console.

namestringOptional1-100 characters
descriptionstring or nullOptional<=500 characters
documentTypestringOptional
templatemap from strings to anyOptional
sampleDatamap from strings to any or nullOptional
pageSettingsmap from strings to any or nullOptional
isDefaultbooleanOptional

Response

Template updated
idstringformat: "uuid"

Template id — use it as templateId in POST /pdf/generate.

organizationIdstring
namestring
descriptionstring or null
documentTypestring
versionstring
templatemap from strings to any
The stored BlockTemplate.
sampleDatamap from strings to any or null
pageSettingsmap from strings to any or null
isDefaultboolean or null
isActiveboolean or null
countryCodestring or null
isSystemboolean
createdAtdatetime
createdBystring

api-key:<key name> for templates stored through this API.

updatedAtdatetime
updatedBystring

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
413
Content Too Large Error
500
Internal Server Error