Skip to content

SMS and WhatsApp templates

A text message template is one text for SMS and WhatsApp, in a version for each language.

Key permissions: get_text_message_templates, read_text_message_template, create_text_message_template, update_text_message_template, delete_text_message_template.

Field Type Meaning
id string The template’s id.
name string Its name.
defaultLanguage string ar, de, en, es, fr, hi, it, ja, pl, pt, th, tr, uk or zh.
contents array One entry per language, the default first: language and body.
purpose string or null The occasion it is written for: signature_request, signature_reminder, payment_reminder, approval_request, form_link, interactive_document_link, portal_link, quiz_link, quiz_result, survey_link, viewer_link, signing_completed, package_voided, package_declined or access_code. null for a message a workflow sends.
isSystemDefault boolean Whether it is one of your default messages.
isPurposeDefault boolean Whether you chose it to go out for its occasion.
whatsAppMappings array The approved templates: integrationId, language, metaTemplateName, metaLanguageCode, twilioContentSid, parameters and buttonUrlVariable.
createdAt, updatedAt time When it was created and last changed.

GET/v1/text_message_templates

Key permission: get_text_message_templates. Returns 200 OK with items and meta. Paginated with page and perPage, sorted with sort, filtered as any list. Each item carries id, name, defaultLanguage, purpose, isSystemDefault, isPurposeDefault, languages (the languages it is written in, its default first), createdAt and updatedAt. A default message counts as isPurposeDefault while you have chosen no template of your own for its occasion.

Terminal window
curl 'https://api.doxtly.com/v1/text_message_templates?sort=name&perPage=2' \
-H "X-Api-Key: $DOXTLY_API_KEY" -H "X-Api-Secret: $DOXTLY_API_SECRET"
{
"items": [
{
"id": "01a1c22e-d6ce-79bc-9a3c-e1744441bebe",
"name": "Access password",
"defaultLanguage": "en",
"languages": [
"en",
"pl"
],
"createdAt": "2026-11-09T22:20:11+01:00",
"updatedAt": "2026-11-09T22:20:11+01:00",
"purpose": "access_code",
"isSystemDefault": true,
"isPurposeDefault": true
},
{
"id": "01a1c22e-d61d-7b17-86f8-d9f73026abfe",
"name": "Approval request",
"defaultLanguage": "en",
"languages": [
"en",
"pl"
],
"createdAt": "2026-11-09T22:20:11+01:00",
"updatedAt": "2026-11-09T22:20:11+01:00",
"purpose": "approval_request",
"isSystemDefault": true,
"isPurposeDefault": true
}
],
"meta": {
"total": 14,
"page": 1,
"perPage": 2,
"totalPages": 7,
"hasMore": true,
"hasPrevious": false
}
}

Shortened: each list shows its first items.

GET/v1/text_message_sendings

Key permission: get_text_message_sendings. Returns 200 OK with items and meta. Paginated with page and perPage, sorted with sort. Each item carries id, templateName (null once the template is deleted), channel (sms or whatsapp), recipient, body (the text as sent), language, languageFallback (true when a WhatsApp message went in another language, for want of an approved template in the one asked for), status (sent or failed), deliveryStatus (delivered, read, failed, or null until the provider reports), providerErrorCode, errorMessage and sentAt.

Terminal window
curl 'https://api.doxtly.com/v1/text_message_sendings?perPage=2' \
-H "X-Api-Key: $DOXTLY_API_KEY" -H "X-Api-Secret: $DOXTLY_API_SECRET"
{
"items": [
{
"id": "005cd2a1-c6bb-40ba-9c36-7913235823fc",
"templateName": "Course reminder",
"channel": "sms",
"recipient": "+44 7700 900318",
"body": "Hello Grace, a reminder from Northbridge Advisory: GDPR for Managers starts on 19/11/2026 at 9:00, 12 Harbour Street. See you there!",
"language": "en",
"languageFallback": false,
"status": "sent",
"deliveryStatus": "delivered",
"providerErrorCode": null,
"errorMessage": null,
"sentAt": "2026-11-11T21:31:35+01:00"
},
{
"id": "01a1bebc-8b12-723c-8c15-f96eafbe8e98",
"templateName": "Signature request",
"channel": "sms",
"recipient": "+48600100200",
"body": "Northbridge Advisory sp. z o.o. asks you to sign \"V1 rem vp57b7\": https://app.doxtly.com/s/[redacted]",
"language": "en",
"languageFallback": false,
"status": "sent",
"deliveryStatus": null,
"providerErrorCode": null,
"errorMessage": null,
"sentAt": "2026-11-09T06:16:29+01:00"
}
],
"meta": {
"total": 12,
"page": 1,
"perPage": 2,
"totalPages": 6,
"hasMore": true,
"hasPrevious": false
}
}

POST/v1/text_message_templates

Key permission: create_text_message_template

Field Type Required Rules
name string Yes At most 128 characters.
defaultLanguage string Yes ar, de, en, es, fr, hi, it, ja, pl, pt, th, tr, uk or zh.
contents array Yes At least one, with one in defaultLanguage and none repeated: language and body, up to 1,600 characters, written with the email template syntax.
purpose string No The occasion, one of those in the object above. A template for an occasion must keep what it delivers in every version: signingUrl for a request to sign, a reminder to sign or a reminder to pay, approvalUrl for an approval, formUrl, documentUrl, portalUrl, quizUrl, surveyUrl or viewerUrl for a link, resultUrl for a quiz result, accessCode for an access code.
whatsAppMappings array No One per integration and language: integrationId (a WhatsApp integration of yours), language, and for Meta metaTemplateName (up to 512 characters) and metaLanguageCode (up to 15), for Twilio twilioContentSid (up to 64). parameters lists {name, variable}: which variable fills each of the approved template’s parameters. buttonUrlVariable names the variable that completes its button’s address.

The response is 201 Created with the template and its address in Location. 403 when your plan has no text message templates or its limit is reached. 400 when a version of a template for an occasion leaves out what it delivers, for an integration that isn’t yours, or for a mapping that doesn’t name its provider’s template. 422 for a field that breaks the rules above or a text the template syntax cannot read.

Terminal window
curl -X POST 'https://api.doxtly.com/v1/text_message_templates' \
-H "X-Api-Key: $DOXTLY_API_KEY" -H "X-Api-Secret: $DOXTLY_API_SECRET" \
-H 'Content-Type: application/json' \
-d '{"name":"Site visit reminder","defaultLanguage":"en","contents":[{"language":"en","body":"Hello {{ first_name }}, Northbridge Advisory will visit {{ company }} on {{ visit_date }} at {{ visit_time }}. Reply to this message if the time no longer suits you."},{"language":"pl","body":"Dzień dobry, {{ first_name }}. Northbridge Advisory odwiedzi {{ company }} {{ visit_date }} o {{ visit_time }}. Jeśli termin już nie pasuje, odpowiedz na tę wiadomość."}]}'
{
"id": "01a1ce98-1933-732c-9ecb-4e3e115db945",
"name": "Site visit reminder",
"defaultLanguage": "en",
"contents": [
{
"language": "en",
"body": "Hello {{ first_name }}, Northbridge Advisory will visit {{ company }} on {{ visit_date }} at {{ visit_time }}. Reply to this message if the time no longer suits you."
},
{
"language": "pl",
"body": "Dzień dobry, {{ first_name }}. Northbridge Advisory odwiedzi {{ company }} {{ visit_date }} o {{ visit_time }}. Jeśli termin już nie pasuje, odpowiedz na tę wiadomość."
}
],
"createdAt": "2026-11-12T08:10:36+01:00",
"updatedAt": "2026-11-12T08:10:36+01:00",
"purpose": null,
"isSystemDefault": false,
"isPurposeDefault": false,
"whatsAppMappings": []
}

GET/v1/text_message_templates/{id}

PUT/v1/text_message_templates/{id}

DELETE/v1/text_message_templates/{id}

Key permissions: read_text_message_template, update_text_message_template, delete_text_message_template.

GET returns 200 OK with the template. PUT takes the same body as create, replaces the template and returns 200 OK with it: a version or a mapping left out is taken away. DELETE returns 204 No Content; what was sent from the template stays in the list of what was sent. A default message keeps its occasion and every language, and can’t be deleted: each of these answers 409. So does deleting a template a workflow still uses, with code used_by_workflows and workflows (their id and name). An id that isn’t one of your templates answers 404.

Terminal window
curl 'https://api.doxtly.com/v1/text_message_templates/01a1ce98-1933-732c-9ecb-4e3e115db945' \
-H "X-Api-Key: $DOXTLY_API_KEY" -H "X-Api-Secret: $DOXTLY_API_SECRET"
{
"id": "01a1ce98-1933-732c-9ecb-4e3e115db945",
"name": "Site visit reminder",
"defaultLanguage": "en",
"contents": [
{
"language": "en",
"body": "Hello {{ first_name }}, Northbridge Advisory will visit {{ company }} on {{ visit_date }} at {{ visit_time }}. Reply to this message if the time no longer suits you."
},
{
"language": "pl",
"body": "Dzień dobry, {{ first_name }}. Northbridge Advisory odwiedzi {{ company }} {{ visit_date }} o {{ visit_time }}. Jeśli termin już nie pasuje, odpowiedz na tę wiadomość."
}
],
"createdAt": "2026-11-12T08:10:36+01:00",
"updatedAt": "2026-11-12T08:10:36+01:00",
"purpose": null,
"isSystemDefault": false,
"isPurposeDefault": false,
"whatsAppMappings": []
}
Terminal window
curl -X PUT 'https://api.doxtly.com/v1/text_message_templates/01a1ce98-1933-732c-9ecb-4e3e115db945' \
-H "X-Api-Key: $DOXTLY_API_KEY" -H "X-Api-Secret: $DOXTLY_API_SECRET" \
-H 'Content-Type: application/json' \
-d '{"name":"Site visit reminder","defaultLanguage":"en","contents":[{"language":"en","body":"Hello {{ first_name }}, Northbridge Advisory will visit {{ company }} on {{ visit_date }} at {{ visit_time }}. Please have the signed engagement letter at hand."}]}'
{
"id": "01a1ce98-1933-732c-9ecb-4e3e115db945",
"name": "Site visit reminder",
"defaultLanguage": "en",
"contents": [
{
"language": "en",
"body": "Hello {{ first_name }}, Northbridge Advisory will visit {{ company }} on {{ visit_date }} at {{ visit_time }}. Please have the signed engagement letter at hand."
}
],
"createdAt": "2026-11-12T08:10:36+01:00",
"updatedAt": "2026-11-12T08:10:36+01:00",
"purpose": null,
"isSystemDefault": false,
"isPurposeDefault": false,
"whatsAppMappings": []
}
Terminal window
curl -X DELETE 'https://api.doxtly.com/v1/text_message_templates/01a1ce98-1933-732c-9ecb-4e3e115db945' \
-H "X-Api-Key: $DOXTLY_API_KEY" -H "X-Api-Secret: $DOXTLY_API_SECRET"

POST/v1/text_message_templates/{id}/purpose_default

Key permission: update_text_message_template

Makes this template the one that goes out for its occasion, instead of the one chosen before; a default message takes that place back when you choose it. Takes no body and returns 200 OK with the template. A template written for no occasion answers 409.

Terminal window
curl -X POST 'https://api.doxtly.com/v1/text_message_templates/01a1ce98-1c2c-7bad-ab79-cb93473dd643/purpose_default' \
-H "X-Api-Key: $DOXTLY_API_KEY" -H "X-Api-Secret: $DOXTLY_API_SECRET"
{
"id": "01a1ce98-1c2c-7bad-ab79-cb93473dd643",
"name": "Short form link",
"defaultLanguage": "en",
"contents": [
{
"language": "en",
"body": "{{ organization_name() }}: please fill in {{ formName }} here: {{ formUrl }}"
}
],
"createdAt": "2026-11-12T08:10:37+01:00",
"updatedAt": "2026-11-12T08:10:37+01:00",
"purpose": "form_link",
"isSystemDefault": false,
"isPurposeDefault": true,
"whatsAppMappings": []
}

POST/v1/text_message_templates/{id}/restore

Key permission: update_text_message_template

Puts the words of a default message back in one language. Takes {"language": "pl"}, any language the template can be written in, and returns 200 OK with the template. Any other template answers 409.

Terminal window
curl -X POST 'https://api.doxtly.com/v1/text_message_templates/01a1c22e-d630-7b23-a8d4-bea21e1ae03b/restore' \
-H "X-Api-Key: $DOXTLY_API_KEY" -H "X-Api-Secret: $DOXTLY_API_SECRET" \
-H 'Content-Type: application/json' \
-d '{"language":"it"}'
{
"id": "01a1c22e-d630-7b23-a8d4-bea21e1ae03b",
"name": "Form link",
"defaultLanguage": "en",
"contents": [
{
"language": "en",
"body": "{{ organizationName }} asks you to fill in \"{{ formName }}\": {{ formUrl }}"
},
{
"language": "pl",
"body": "{{ organizationName }} prosi o wypełnienie formularza „{{ formName }}”. {{ formUrl }}"
}
],
"createdAt": "2026-11-09T22:20:11+01:00",
"updatedAt": "2026-11-09T22:20:11+01:00",
"purpose": "form_link",
"isSystemDefault": true,
"isPurposeDefault": false,
"whatsAppMappings": []
}

Shortened: each list shows its first items.