The Dyspatch API is based on the REST paradigm, and features resource based URLs with standard HTTP response codes to indicate errors. We use standard HTTP authentication and request verbs, and all responses are JSON formatted. See our Implementation Guide for more details on how to implement Dyspatch.
Set Bearer followed by your API key as the Authorization header in your API requests.
Authorization: Bearer EXAMPLEAPIKEYXXXXXXXX12345678
Below is an example curl request with an API key in the Authorization header.
curl --request GET \
--url https://api.dyspatch.io/templates \
--header 'Authorization: Bearer EXAMPLEAPIKEYXXXXXXXX12345678' \
--header 'Accept: application/vnd.dyspatch.2024.11+json'
Security Scheme Type | API Key |
---|---|
Header parameter name: | Authorization |
Templates are the email templates found in your Dyspatch account. Only the published Template Draft is returned.
A typical integration will start with using the Templates list endpoint to iterate through and sync Templates.
Gets a list of Template Metadata objects for all published templates. Up to 25 results returned before results are paginated.
cursor | string A cursor value used to retrieve a specific page from a paginated result set. |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
A list of templates
Invalid request
Unauthenticated
Unauthorized
Rate limit exceeded
Server error
Server error
{- "cursor": {
- "next": "string",
- "hasMore": true
}, - "data": [
- {
- "id": "tem_g3L7Cw6Hp5wU",
- "name": "Template Name",
- "description": "Description of Template",
- "url": "/templates/tem_g3L7Cw6Hp5wUaf395LehwK",
- "path": "fdr_01gb8vd6pz/fdr_01gqjmdbq/fdr_01gqjmg1",
- "workspaceId": "fdr_01gb8vd6pz",
- "localizations": [
- {
- "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
- "name": "English (US)",
- "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
- "localeGroup": "lgr_alka38ajla301",
- "languages": [
- "fr-FR"
], - "updatedAt": "2024-10-31T17:55:56Z"
}
], - "createdAt": "2024-10-31T17:55:56Z",
- "updatedAt": "2024-10-31T17:55:56Z",
- "publishedDraftId": "tdft_g3L7Cw6Hp5wU"
}
]
}
Gets a template object with the matching ID. Templates without a published draft will result in an error.
templateId required | string A template ID |
targetLanguage required | string Enum: "html" "handlebars" "ampscript" "freemarker" "cheetah" "jinja" "liquid" "mandrillhandlebars" "handlebarsjava" The type of templating language to use when compiling the content. |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
A template object with the requested ID. Templates without a published draft will result in an error.
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
{- "id": "tem_g3L7Cw6Hp5wU",
- "name": "Template Name",
- "description": "Description of Template",
- "url": "/templates/tem_g3L7Cw6Hp5wUaf395LehwK",
- "compiled": {
- "sender": "example@example.com",
- "replyTo": "example@example.com",
- "subject": "PGh0bWw+PC9odG1sPgo=",
- "html": "PGh0bWw+PC9odG1sPgo=",
- "ampHtml": "PGh0bWwg4pqhNGVtYWlsPjwvaHRtbD4=",
- "text": "dGV4dCBjb250ZW50"
}, - "path": "fdr_01gb8vd6pz/fdr_01gqjmdbq/fdr_01gqjmg1",
- "workspaceId": "fdr_01gb8vd6pz",
- "createdAt": "2024-10-31T17:55:56Z",
- "updatedAt": "2024-10-31T17:55:56Z",
- "publishedDraftId": "tdft_g3L7Cw6Hp5wU",
- "localizations": [
- {
- "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
- "name": "English (US)",
- "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
- "localeGroup": "lgr_alka38ajla301",
- "languages": [
- "fr-FR"
], - "updatedAt": "2024-10-31T17:55:56Z"
}
]
}
Renders a template into HTML using the provided data.
templateId required | string A template ID |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
Rendered template contents incorporating the data passed in the request body.
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
{- "html": "<html>Hello, world!<html>",
- "ampHtml": "<html ⚡4email>Hello, world!<html>",
- "text": "Hello, world!",
- "subject": "Email Subject Line",
- "sender": "example@example.com",
- "replyTo": "example@example.com"
}
Renders a template into HTML for the selected language using the provided data.
templateId required | string A template ID |
languageId required | string A language ID (eg: en-US) |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
Rendered template contents in the selected language, incorporating the data passed in the request body.
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
{- "html": "<html>Hello, world!<html>",
- "ampHtml": "<html ⚡4email>Hello, world!<html>",
- "text": "Hello, world!",
- "subject": "Email Subject Line",
- "sender": "example@example.com",
- "replyTo": "example@example.com"
}
Drafts represent unpublished versions of templates that are still mutable. There could be many in progress drafts for a template.
Returns all Email drafts for your organization.
cursor | string A cursor value used to retrieve a specific page from a paginated result set. |
status | string Value: "awaitingTranslation" Filter the list of drafts by a particular status |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
Drafts
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
{- "cursor": {
- "next": "string",
- "hasMore": true
}, - "data": [
- {
- "id": "tdft_g3L7Cw6Hp5wU",
- "templateId": "tem_g3L7Cw6Hp5wU",
- "name": "Draft Name",
- "url": "/drafts/tdft_g3L7Cw6Hp5wUaf395LehwK/dft_g3L7Cw6Hp5wU",
- "path": "fdr_01gb8vd6pz/fdr_01gqjmdbq/fdr_01gqjmg1",
- "workspaceId": "fdr_01gb8vd6pz",
- "createdAt": "2024-10-31T17:55:56Z",
- "updatedAt": "2024-10-31T17:55:56Z",
- "status": "LOCKED_FOR_TRANSLATION",
- "templateName": "Template Name",
- "designApprovedDate": "2024-10-31T17:55:56Z"
}
]
}
Moves the Email draft into submitted state.
draftId required | string A draft ID |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
Successfully submitted
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
Gets a Email draft object with the matching ID. The "compiled" field will contain the template in the default, unlocalized form.
draftId required | string A draft ID |
targetLanguage required | string Enum: "html" "handlebars" "ampscript" "freemarker" "cheetah" "jinja" "liquid" "mandrillhandlebars" "handlebarsjava" The type of templating language to use when compiling the content. |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
A draft object with the requested ID.
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
{- "id": "tdft_g3L7Cw6Hp5wU",
- "template": "tem_g3L7Cw6Hp5wU",
- "name": "Draft Name",
- "url": "/drafts/tdft_g3L7Cw6Hp5wUaf395LehwK/dft_g3L7Cw6Hp5wU",
- "path": "fdr_01gb8vd6pz/fdr_01gqjmdbq/fdr_01gqjmg1",
- "workspaceId": "fdr_01gb8vd6pz",
- "compiled": {
- "sender": "example@example.com",
- "replyTo": "example@example.com",
- "subject": "PGh0bWw+PC9odG1sPgo=",
- "html": "PGh0bWw+PC9odG1sPgo=",
- "ampHtml": "PGh0bWwg4pqhNGVtYWlsPjwvaHRtbD4=",
- "text": "dGV4dCBjb250ZW50"
}, - "createdAt": "2024-10-31T17:55:56Z",
- "updatedAt": "2024-10-31T17:55:56Z",
- "localizations": [
- {
- "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
- "name": "English (US)",
- "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
- "localeGroup": "lgr_alka38ajla301",
- "languages": [
- "fr-FR"
], - "updatedAt": "2024-10-31T17:55:56Z"
}
], - "status": "LOCKED_FOR_TRANSLATION",
- "templateName": "Template Name",
- "designApprovedDate": "2024-10-31T17:55:56Z"
}
Returns localization metadata for the Email draft
draftId required | string A draft ID |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
A list of localizations
Invalid request
[- {
- "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
- "name": "English (US)",
- "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
- "localeGroup": "lgr_alka38ajla301",
- "languages": [
- "fr-FR"
], - "updatedAt": "2024-10-31T17:55:56Z"
}
]
Inserts a localization or sets the name on an existing localization that already uses the languageId
draftId required | string A draft ID |
languageId required | string A language ID (eg: en-US) |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
name | string |
Successful upsert
Invalid request
{- "name": "English (US)"
}
Deletes the localization with the given language ID if it exists
draftId required | string A draft ID |
languageId required | string A language ID (eg: en-US) |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
Successful delete
Invalid request
Completely replaces any existing translations for the given language with those provided in request body. Variables embedded in keys or values are expected to be in the format %(my_variable)s
and will automatically convert to the correct Dyspatch format depending on the type of template. Accepts key/value pairs in JSON format or in gettext PO file format. For JSON set Content-Type
header to application/json
. For gettext PO format set Content-Type
header to text/x-gettext-translation
.
draftId required | string A draft ID |
languageId required | string A language ID (eg: en-US) |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
property name* | string |
Successful
Invalid request
Unauthorized
{- "Hello %(name)s": "Bonjour %(name)s",
- "Welcome": "Bienvenue"
}
Returns the list of values that need to be translated for the draft. Set the Accept
header to application/vnd.dyspatch.2024.11+json
to get a JSON object, or text/vnd.dyspatch.2024.11+x-gettext-translation
to get the POT file.
draftId required | string A draft ID |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
Localization keys
Invalid request
[- {
- "key": "string",
- "comment": "string"
}
]
Localization objects are the same as Template objects except they contain localized content.
If your account is using localizations then use this instead of the compiled Template object.
Returns the published content associated with the localization of the matching ID
localizationId required | string A localization ID |
targetLanguage required | string Enum: "html" "handlebars" "ampscript" "freemarker" "cheetah" "jinja" "liquid" "mandrillhandlebars" "handlebarsjava" The type of templating language to use when compiling the content. |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
A localization object with the requested ID
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
{- "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
- "languages": [
- "fr-FR"
], - "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
- "template": "tem_g3L7Cw6Hp5wU",
- "compiled": {
- "sender": "example@example.com",
- "replyTo": "example@example.com",
- "subject": "PGh0bWw+PC9odG1sPgo=",
- "html": "PGh0bWw+PC9odG1sPgo=",
- "ampHtml": "PGh0bWwg4pqhNGVtYWlsPjwvaHRtbD4=",
- "text": "dGV4dCBjb250ZW50"
}, - "createdAt": "2024-10-31T17:55:56Z",
- "updatedAt": "2024-10-31T17:55:56Z",
- "name": "English (US)",
- "localeGroup": "lgr_alka38ajla301"
}
Returns a specific localization object of the matching draft with a matching localization ID
draftId required | string A draft ID |
localizationId required | string A localization ID |
targetLanguage required | string Enum: "html" "handlebars" "ampscript" "freemarker" "cheetah" "jinja" "liquid" "mandrillhandlebars" "handlebarsjava" The type of templating language to use when compiling the content. |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
A localization object from the matching draft ID with the requested ID
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
{- "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
- "languages": [
- "fr-FR"
], - "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
- "template": "tem_g3L7Cw6Hp5wU",
- "compiled": {
- "sender": "example@example.com",
- "replyTo": "example@example.com",
- "subject": "PGh0bWw+PC9odG1sPgo=",
- "html": "PGh0bWw+PC9odG1sPgo=",
- "ampHtml": "PGh0bWwg4pqhNGVtYWlsPjwvaHRtbD4=",
- "text": "dGV4dCBjb250ZW50"
}, - "createdAt": "2024-10-31T17:55:56Z",
- "updatedAt": "2024-10-31T17:55:56Z",
- "name": "English (US)",
- "localeGroup": "lgr_alka38ajla301"
}
SMS Templates are the SMS templates found in your Dyspatch account. Only the published Template Draft is returned.
A typical integration will start with using the Templates list endpoint to iterate through and sync Templates.
Gets a list of SMS Template Metadata objects for all published templates. Up to 25 results returned before results are paginated.
cursor | string A cursor value used to retrieve a specific page from a paginated result set. |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
A list of SMS templates
Invalid request
Unauthenticated
Unauthorized
Rate limit exceeded
Server error
Server error
{- "cursor": {
- "next": "string",
- "hasMore": true
}, - "data": [
- {
- "id": "tem_g3L7Cw6Hp5wU",
- "name": "Template Name",
- "description": "Description of Template",
- "url": "/templates/tem_g3L7Cw6Hp5wUaf395LehwK",
- "path": "fdr_01gb8vd6pz/fdr_01gqjmdbq/fdr_01gqjmg1",
- "workspaceId": "fdr_01gb8vd6pz",
- "localizations": [
- {
- "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
- "name": "English (US)",
- "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
- "localeGroup": "lgr_alka38ajla301",
- "languages": [
- "fr-FR"
], - "updatedAt": "2024-10-31T17:55:56Z"
}
], - "createdAt": "2024-10-31T17:55:56Z",
- "updatedAt": "2024-10-31T17:55:56Z",
- "publishedDraftId": "tdft_g3L7Cw6Hp5wU"
}
]
}
Gets an SMS template object with the matching ID. Templates without a published draft will result in an error.
templateId required | string A template ID |
smsTargetLanguage | string Enum: "sms" "handlebars" "liquid" "django" "jinja" "ampscript" "klaviyo" "brevo" "sendpulse" "iterablehandlebars" "dotdigitalliquid" The type of templating language to use when compiling the content. |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
A template object with the requested ID. Templates without a published draft will result in an error.
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
{- "id": "tem_g3L7Cw6Hp5wU",
- "name": "Template Name",
- "description": "Description of Template",
- "url": "/templates/tem_g3L7Cw6Hp5wUaf395LehwK",
- "compiled": {
- "sender": "John Doe",
- "phone": "123-456-7890",
- "content": [
- {
- "type": "Text",
- "value": "This is some text"
}
]
}, - "path": "fdr_01gb8vd6pz/fdr_01gqjmdbq/fdr_01gqjmg1",
- "workspaceId": "fdr_01gb8vd6pz",
- "createdAt": "2024-10-31T17:55:56Z",
- "updatedAt": "2024-10-31T17:55:56Z",
- "publishedDraftId": "tdft_g3L7Cw6Hp5wU",
- "localizations": [
- {
- "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
- "name": "English (US)",
- "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
- "localeGroup": "lgr_alka38ajla301",
- "languages": [
- "fr-FR"
], - "updatedAt": "2024-10-31T17:55:56Z"
}
]
}
Renders an SMS template into HTML using the provided data.
templateId required | string A template ID |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
Rendered template contents incorporating the data passed in the request body.
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
{- "sender": "John Doe",
- "phone": "123-456-7890",
- "content": [
- {
- "type": "Text",
- "value": "This is some text"
}
]
}
Renders an SMS template into HTML for the selected language using the provided data.
templateId required | string A template ID |
languageId required | string A language ID (eg: en-US) |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
Rendered template contents in the selected language, incorporating the data passed in the request body.
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
{- "sender": "John Doe",
- "phone": "123-456-7890",
- "content": [
- {
- "type": "Text",
- "value": "This is some text"
}
]
}
SMS Drafts represent unpublished versions of templates that are still mutable. There could be many in progress drafts for a template.
Returns all SMS drafts for your organization.
cursor | string A cursor value used to retrieve a specific page from a paginated result set. |
status | string Value: "awaitingTranslation" Filter the list of drafts by a particular status |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
Drafts
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
{- "cursor": {
- "next": "string",
- "hasMore": true
}, - "data": [
- {
- "id": "tdft_g3L7Cw6Hp5wU",
- "templateId": "tem_g3L7Cw6Hp5wU",
- "name": "Draft Name",
- "url": "/drafts/tdft_g3L7Cw6Hp5wUaf395LehwK/dft_g3L7Cw6Hp5wU",
- "path": "fdr_01gb8vd6pz/fdr_01gqjmdbq/fdr_01gqjmg1",
- "workspaceId": "fdr_01gb8vd6pz",
- "createdAt": "2024-10-31T17:55:56Z",
- "updatedAt": "2024-10-31T17:55:56Z",
- "status": "LOCKED_FOR_TRANSLATION",
- "templateName": "Template Name",
- "designApprovedDate": "2024-10-31T17:55:56Z"
}
]
}
Moves the SMS draft into submitted state.
draftId required | string A draft ID |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
Successfully submitted
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
Gets an SMS draft object with the matching ID. The "compiled" field will contain the template in the default, unlocalized form.
draftId required | string A draft ID |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
A draft object with the requested ID.
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
{- "id": "tdft_g3L7Cw6Hp5wU",
- "template": "tem_g3L7Cw6Hp5wU",
- "name": "Draft Name",
- "url": "/drafts/tdft_g3L7Cw6Hp5wUaf395LehwK/dft_g3L7Cw6Hp5wU",
- "path": "fdr_01gb8vd6pz/fdr_01gqjmdbq/fdr_01gqjmg1",
- "workspaceId": "fdr_01gb8vd6pz",
- "compiled": {
- "sender": "John Doe",
- "phone": "123-456-7890",
- "content": [
- {
- "type": "Text",
- "value": "This is some text"
}
]
}, - "createdAt": "2024-10-31T17:55:56Z",
- "updatedAt": "2024-10-31T17:55:56Z",
- "localizations": [
- {
- "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
- "name": "English (US)",
- "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
- "localeGroup": "lgr_alka38ajla301",
- "languages": [
- "fr-FR"
], - "updatedAt": "2024-10-31T17:55:56Z"
}
], - "status": "LOCKED_FOR_TRANSLATION",
- "templateName": "Template Name",
- "designApprovedDate": "2024-10-31T17:55:56Z"
}
Returns localization metadata for the SMS draft
draftId required | string A draft ID |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
A list of localizations
Invalid request
[- {
- "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
- "name": "English (US)",
- "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
- "localeGroup": "lgr_alka38ajla301",
- "languages": [
- "fr-FR"
], - "updatedAt": "2024-10-31T17:55:57Z"
}
]
Inserts a localization or sets the name on an existing localization that already uses the languageId
draftId required | string A draft ID |
languageId required | string A language ID (eg: en-US) |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
name | string |
Successful upsert
Invalid request
{- "name": "English (US)"
}
Deletes the localization with the given language ID if it exists
draftId required | string A draft ID |
languageId required | string A language ID (eg: en-US) |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
Successful delete
Invalid request
Completely replaces any existing translations for the given language with those provided in request body. Variables embedded in keys or values are expected to be in the format %(my_variable)s
and will automatically convert to the correct Dyspatch format depending on the type of template. Accepts key/value pairs in JSON format or in gettext PO file format. For JSON set Content-Type
header to application/json
. For gettext PO format set Content-Type
header to text/x-gettext-translation
.
draftId required | string A draft ID |
languageId required | string A language ID (eg: en-US) |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
property name* | string |
Successful
Invalid request
Unauthorized
{- "Hello %(name)s": "Bonjour %(name)s",
- "Welcome": "Bienvenue"
}
Returns the list of values that need to be translated for the draft. Set the Accept
header to application/vnd.dyspatch.2024.11+json
to get a JSON object, or text/vnd.dyspatch.2024.11+x-gettext-translation
to get the POT file.
draftId required | string A draft ID |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
Localization keys
Invalid request
[- {
- "key": "string",
- "comment": "string"
}
]
SMS Localization objects are the same as Template objects except they contain localized content.
If your account is using localizations then use this instead of the compiled Template object.
Returns the published SMS content associated with the localization of the matching ID
localizationId required | string A localization ID |
smsTargetLanguage | string Enum: "sms" "handlebars" "liquid" "django" "jinja" "ampscript" "klaviyo" "brevo" "sendpulse" "iterablehandlebars" "dotdigitalliquid" The type of templating language to use when compiling the content. |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
A localization object with the requested ID
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
{- "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
- "languages": [
- "fr-FR"
], - "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
- "template": "tem_g3L7Cw6Hp5wU",
- "compiled": {
- "sender": "John Doe",
- "phone": "123-456-7890",
- "content": [
- {
- "type": "Text",
- "value": "This is some text"
}
]
}, - "createdAt": "2024-10-31T17:55:57Z",
- "updatedAt": "2024-10-31T17:55:57Z",
- "name": "English (US)",
- "localeGroup": "lgr_alka38ajla301"
}
Returns a specific localization object of the matching SMS draft with a matching localization ID
draftId required | string A draft ID |
localizationId required | string A localization ID |
smsTargetLanguage | string Enum: "sms" "handlebars" "liquid" "django" "jinja" "ampscript" "klaviyo" "brevo" "sendpulse" "iterablehandlebars" "dotdigitalliquid" The type of templating language to use when compiling the content. |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
A localization object from the matching draft ID with the requested ID
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
{- "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
- "languages": [
- "fr-FR"
], - "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
- "template": "tem_g3L7Cw6Hp5wU",
- "compiled": {
- "sender": "John Doe",
- "phone": "123-456-7890",
- "content": [
- {
- "type": "Text",
- "value": "This is some text"
}
]
}, - "createdAt": "2024-10-31T17:55:57Z",
- "updatedAt": "2024-10-31T17:55:57Z",
- "name": "English (US)",
- "localeGroup": "lgr_alka38ajla301"
}
Push Templates are the Push templates found in your Dyspatch account. Only the published Template Draft is returned.
A typical integration will start with using the Templates list endpoint to iterate through and sync Templates.
Gets a list of Push Template Metadata objects for all published templates. Up to 25 results returned before results are paginated.
cursor | string A cursor value used to retrieve a specific page from a paginated result set. |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
A list of Push templates
Invalid request
Unauthenticated
Unauthorized
Rate limit exceeded
Server error
Server error
{- "cursor": {
- "next": "string",
- "hasMore": true
}, - "data": [
- {
- "id": "tem_g3L7Cw6Hp5wU",
- "name": "Template Name",
- "description": "Description of Template",
- "url": "/templates/tem_g3L7Cw6Hp5wUaf395LehwK",
- "path": "fdr_01gb8vd6pz/fdr_01gqjmdbq/fdr_01gqjmg1",
- "workspaceId": "fdr_01gb8vd6pz",
- "localizations": [
- {
- "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
- "name": "English (US)",
- "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
- "localeGroup": "lgr_alka38ajla301",
- "languages": [
- "fr-FR"
], - "updatedAt": "2024-10-31T17:55:57Z"
}
], - "createdAt": "2024-10-31T17:55:57Z",
- "updatedAt": "2024-10-31T17:55:57Z",
- "publishedDraftId": "tdft_g3L7Cw6Hp5wU"
}
]
}
Gets an Push template object with the matching ID. Templates without a published draft will result in an error.
templateId required | string A template ID |
pushTargetLanguage | string Enum: "push" "handlebars" "liquid" "django" "jinja" "handlebarsjava" The type of templating language to use when compiling the content. |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
A template object with the requested ID. Templates without a published draft will result in an error.
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
{- "id": "tem_g3L7Cw6Hp5wU",
- "name": "Template Name",
- "description": "Description of Template",
- "url": "/templates/tem_g3L7Cw6Hp5wUaf395LehwK",
- "compiled": {
- "content": [
- {
- "type": "Title",
- "value": "This is some text"
}
]
}, - "path": "fdr_01gb8vd6pz/fdr_01gqjmdbq/fdr_01gqjmg1",
- "workspaceId": "fdr_01gb8vd6pz",
- "createdAt": "2024-10-31T17:55:57Z",
- "updatedAt": "2024-10-31T17:55:57Z",
- "publishedDraftId": "tdft_g3L7Cw6Hp5wU",
- "localizations": [
- {
- "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
- "name": "English (US)",
- "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
- "localeGroup": "lgr_alka38ajla301",
- "languages": [
- "fr-FR"
], - "updatedAt": "2024-10-31T17:55:57Z"
}
]
}
Renders an Push template into HTML using the provided data.
templateId required | string A template ID |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
Rendered template contents incorporating the data passed in the request body.
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
{- "content": [
- {
- "type": "Title",
- "value": "This is some text"
}
]
}
Renders an Push template into HTML for the selected language using the provided data.
templateId required | string A template ID |
languageId required | string A language ID (eg: en-US) |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
Rendered template contents in the selected language, incorporating the data passed in the request body.
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
{- "content": [
- {
- "type": "Title",
- "value": "This is some text"
}
]
}
Push Drafts represent unpublished versions of templates that are still mutable. There could be many in progress drafts for a template.
Returns all Push drafts for your organization.
cursor | string A cursor value used to retrieve a specific page from a paginated result set. |
status | string Value: "awaitingTranslation" Filter the list of drafts by a particular status |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
Drafts
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
{- "cursor": {
- "next": "string",
- "hasMore": true
}, - "data": [
- {
- "id": "tdft_g3L7Cw6Hp5wU",
- "templateId": "tem_g3L7Cw6Hp5wU",
- "name": "Draft Name",
- "url": "/drafts/tdft_g3L7Cw6Hp5wUaf395LehwK/dft_g3L7Cw6Hp5wU",
- "path": "fdr_01gb8vd6pz/fdr_01gqjmdbq/fdr_01gqjmg1",
- "workspaceId": "fdr_01gb8vd6pz",
- "createdAt": "2024-10-31T17:55:57Z",
- "updatedAt": "2024-10-31T17:55:57Z",
- "status": "LOCKED_FOR_TRANSLATION",
- "templateName": "Template Name",
- "designApprovedDate": "2024-10-31T17:55:57Z"
}
]
}
Moves the Push draft into submitted state.
draftId required | string A draft ID |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
Successfully submitted
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
Gets an Push draft object with the matching ID. The "compiled" field will contain the template in the default, unlocalized form.
draftId required | string A draft ID |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
A draft object with the requested ID.
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
{- "id": "tdft_g3L7Cw6Hp5wU",
- "template": "tem_g3L7Cw6Hp5wU",
- "name": "Draft Name",
- "url": "/drafts/tdft_g3L7Cw6Hp5wUaf395LehwK/dft_g3L7Cw6Hp5wU",
- "path": "fdr_01gb8vd6pz/fdr_01gqjmdbq/fdr_01gqjmg1",
- "workspaceId": "fdr_01gb8vd6pz",
- "compiled": {
- "content": [
- {
- "type": "Title",
- "value": "This is some text"
}
]
}, - "createdAt": "2024-10-31T17:55:57Z",
- "updatedAt": "2024-10-31T17:55:57Z",
- "localizations": [
- {
- "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
- "name": "English (US)",
- "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
- "localeGroup": "lgr_alka38ajla301",
- "languages": [
- "fr-FR"
], - "updatedAt": "2024-10-31T17:55:57Z"
}
], - "status": "LOCKED_FOR_TRANSLATION",
- "templateName": "Template Name",
- "designApprovedDate": "2024-10-31T17:55:57Z"
}
Returns localization metadata for the Push draft
draftId required | string A draft ID |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
A list of localizations
Invalid request
[- {
- "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
- "name": "English (US)",
- "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
- "localeGroup": "lgr_alka38ajla301",
- "languages": [
- "fr-FR"
], - "updatedAt": "2024-10-31T17:55:57Z"
}
]
Inserts a localization or sets the name on an existing localization that already uses the languageId
draftId required | string A draft ID |
languageId required | string A language ID (eg: en-US) |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
name | string |
Successful upsert
Invalid request
{- "name": "English (US)"
}
Deletes the localization with the given language ID if it exists
draftId required | string A draft ID |
languageId required | string A language ID (eg: en-US) |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
Successful delete
Invalid request
Completely replaces any existing translations for the given language with those provided in request body. Variables embedded in keys or values are expected to be in the format %(my_variable)s
and will automatically convert to the correct Dyspatch format depending on the type of template. Accepts key/value pairs in JSON format or in gettext PO file format. For JSON set Content-Type
header to application/json
. For gettext PO format set Content-Type
header to text/x-gettext-translation
.
draftId required | string A draft ID |
languageId required | string A language ID (eg: en-US) |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
property name* | string |
Successful
Invalid request
Unauthorized
{- "Hello %(name)s": "Bonjour %(name)s",
- "Welcome": "Bienvenue"
}
Returns the list of values that need to be translated for the draft. Set the Accept
header to application/vnd.dyspatch.2024.11+json
to get a JSON object, or text/vnd.dyspatch.2024.11+x-gettext-translation
to get the POT file.
draftId required | string A draft ID |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
Localization keys
Invalid request
[- {
- "key": "string",
- "comment": "string"
}
]
Push Localization objects are the same as Template objects except they contain localized content.
If your account is using localizations then use this instead of the compiled Template object.
Returns the published Push content associated with the localization of the matching ID
localizationId required | string A localization ID |
pushTargetLanguage | string Enum: "push" "handlebars" "liquid" "django" "jinja" "handlebarsjava" The type of templating language to use when compiling the content. |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
A localization object with the requested ID
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
{- "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
- "languages": [
- "fr-FR"
], - "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
- "template": "tem_g3L7Cw6Hp5wU",
- "compiled": {
- "content": [
- {
- "type": "Title",
- "value": "This is some text"
}
]
}, - "createdAt": "2024-10-31T17:55:57Z",
- "updatedAt": "2024-10-31T17:55:57Z",
- "name": "English (US)",
- "localeGroup": "lgr_alka38ajla301"
}
Returns a specific localization object of the matching Push draft with a matching localization ID
draftId required | string A draft ID |
localizationId required | string A localization ID |
pushTargetLanguage | string Enum: "push" "handlebars" "liquid" "django" "jinja" "handlebarsjava" The type of templating language to use when compiling the content. |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
A localization object from the matching draft ID with the requested ID
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
{- "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
- "languages": [
- "fr-FR"
], - "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
- "template": "tem_g3L7Cw6Hp5wU",
- "compiled": {
- "content": [
- {
- "type": "Title",
- "value": "This is some text"
}
]
}, - "createdAt": "2024-10-31T17:55:57Z",
- "updatedAt": "2024-10-31T17:55:57Z",
- "name": "English (US)",
- "localeGroup": "lgr_alka38ajla301"
}
Voice Templates are the Voice templates found in your Dyspatch account. Only the published Template Draft is returned.
A typical integration will start with using the Templates list endpoint to iterate through and sync Templates.
Gets a list of Voice Template Metadata objects for all published templates. Up to 25 results returned before results are paginated.
cursor | string A cursor value used to retrieve a specific page from a paginated result set. |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
A list of Voice templates
Invalid request
Unauthenticated
Unauthorized
Rate limit exceeded
Server error
Server error
{- "cursor": {
- "next": "string",
- "hasMore": true
}, - "data": [
- {
- "id": "tem_g3L7Cw6Hp5wU",
- "name": "Template Name",
- "description": "Description of Template",
- "url": "/templates/tem_g3L7Cw6Hp5wUaf395LehwK",
- "path": "fdr_01gb8vd6pz/fdr_01gqjmdbq/fdr_01gqjmg1",
- "workspaceId": "fdr_01gb8vd6pz",
- "localizations": [
- {
- "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
- "name": "English (US)",
- "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
- "localeGroup": "lgr_alka38ajla301",
- "languages": [
- "fr-FR"
], - "updatedAt": "2024-10-31T17:55:57Z"
}
], - "createdAt": "2024-10-31T17:55:57Z",
- "updatedAt": "2024-10-31T17:55:57Z",
- "publishedDraftId": "tdft_g3L7Cw6Hp5wU"
}
]
}
Gets an Voice template object with the matching ID. Templates without a published draft will result in an error.
templateId required | string A template ID |
voiceTargetLanguage | string Enum: "voice" "handlebars" "liquid" "django" "jinja" "handlebarsjava" The type of templating language to use when compiling the content. |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
A template object with the requested ID. Templates without a published draft will result in an error.
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
{- "id": "tem_g3L7Cw6Hp5wU",
- "name": "Template Name",
- "description": "Description of Template",
- "url": "/templates/tem_g3L7Cw6Hp5wUaf395LehwK",
- "compiled": {
- "content": "This is some text content"
}, - "path": "fdr_01gb8vd6pz/fdr_01gqjmdbq/fdr_01gqjmg1",
- "workspaceId": "fdr_01gb8vd6pz",
- "createdAt": "2024-10-31T17:55:57Z",
- "updatedAt": "2024-10-31T17:55:57Z",
- "publishedDraftId": "tdft_g3L7Cw6Hp5wU",
- "localizations": [
- {
- "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
- "name": "English (US)",
- "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
- "localeGroup": "lgr_alka38ajla301",
- "languages": [
- "fr-FR"
], - "updatedAt": "2024-10-31T17:55:57Z"
}
]
}
Renders an Voice template into HTML using the provided data.
templateId required | string A template ID |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
Rendered template contents incorporating the data passed in the request body.
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
{- "content": "This is some text content"
}
Renders an Voice template into HTML for the selected language using the provided data.
templateId required | string A template ID |
languageId required | string A language ID (eg: en-US) |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
Rendered template contents in the selected language, incorporating the data passed in the request body.
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
{- "content": "This is some text content"
}
Voice Drafts represent unpublished versions of templates that are still mutable. There could be many in progress drafts for a template.
Returns all Voice drafts for your organization.
cursor | string A cursor value used to retrieve a specific page from a paginated result set. |
status | string Value: "awaitingTranslation" Filter the list of drafts by a particular status |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
Drafts
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
{- "cursor": {
- "next": "string",
- "hasMore": true
}, - "data": [
- {
- "id": "tdft_g3L7Cw6Hp5wU",
- "templateId": "tem_g3L7Cw6Hp5wU",
- "name": "Draft Name",
- "url": "/drafts/tdft_g3L7Cw6Hp5wUaf395LehwK/dft_g3L7Cw6Hp5wU",
- "path": "fdr_01gb8vd6pz/fdr_01gqjmdbq/fdr_01gqjmg1",
- "workspaceId": "fdr_01gb8vd6pz",
- "createdAt": "2024-10-31T17:55:57Z",
- "updatedAt": "2024-10-31T17:55:57Z",
- "status": "LOCKED_FOR_TRANSLATION",
- "templateName": "Template Name",
- "designApprovedDate": "2024-10-31T17:55:57Z"
}
]
}
Moves the Voice draft into submitted state.
draftId required | string A draft ID |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
Successfully submitted
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
Gets an Voice draft object with the matching ID. The "compiled" field will contain the template in the default, unlocalized form.
draftId required | string A draft ID |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
A draft object with the requested ID.
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
{- "id": "tdft_g3L7Cw6Hp5wU",
- "template": "tem_g3L7Cw6Hp5wU",
- "name": "Draft Name",
- "url": "/drafts/tdft_g3L7Cw6Hp5wUaf395LehwK/dft_g3L7Cw6Hp5wU",
- "path": "fdr_01gb8vd6pz/fdr_01gqjmdbq/fdr_01gqjmg1",
- "workspaceId": "fdr_01gb8vd6pz",
- "compiled": {
- "content": "This is some text content"
}, - "createdAt": "2024-10-31T17:55:57Z",
- "updatedAt": "2024-10-31T17:55:57Z",
- "localizations": [
- {
- "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
- "name": "English (US)",
- "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
- "localeGroup": "lgr_alka38ajla301",
- "languages": [
- "fr-FR"
], - "updatedAt": "2024-10-31T17:55:57Z"
}
], - "status": "LOCKED_FOR_TRANSLATION",
- "templateName": "Template Name",
- "designApprovedDate": "2024-10-31T17:55:57Z"
}
Returns localization metadata for the Voice draft
draftId required | string A draft ID |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
A list of localizations
Invalid request
[- {
- "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
- "name": "English (US)",
- "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
- "localeGroup": "lgr_alka38ajla301",
- "languages": [
- "fr-FR"
], - "updatedAt": "2024-10-31T17:55:57Z"
}
]
Inserts a localization or sets the name on an existing localization that already uses the languageId
draftId required | string A draft ID |
languageId required | string A language ID (eg: en-US) |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
name | string |
Successful upsert
Invalid request
{- "name": "English (US)"
}
Deletes the localization with the given language ID if it exists
draftId required | string A draft ID |
languageId required | string A language ID (eg: en-US) |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
Successful delete
Invalid request
Completely replaces any existing translations for the given language with those provided in request body. Variables embedded in keys or values are expected to be in the format %(my_variable)s
and will automatically convert to the correct Dyspatch format depending on the type of template. Accepts key/value pairs in JSON format or in gettext PO file format. For JSON set Content-Type
header to application/json
. For gettext PO format set Content-Type
header to text/x-gettext-translation
.
draftId required | string A draft ID |
languageId required | string A language ID (eg: en-US) |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
property name* | string |
Successful
Invalid request
Unauthorized
{- "Hello %(name)s": "Bonjour %(name)s",
- "Welcome": "Bienvenue"
}
Returns the list of values that need to be translated for the draft. Set the Accept
header to application/vnd.dyspatch.2024.11+json
to get a JSON object, or text/vnd.dyspatch.2024.11+x-gettext-translation
to get the POT file.
draftId required | string A draft ID |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
Localization keys
Invalid request
[- {
- "key": "string",
- "comment": "string"
}
]
Voice Localization objects are the same as Template objects except they contain localized content.
If your account is using localizations then use this instead of the compiled Template object.
Returns the published Voice content associated with the localization of the matching ID
localizationId required | string A localization ID |
voiceTargetLanguage | string Enum: "voice" "handlebars" "liquid" "django" "jinja" "handlebarsjava" The type of templating language to use when compiling the content. |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
A localization object with the requested ID
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
{- "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
- "languages": [
- "fr-FR"
], - "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
- "template": "tem_g3L7Cw6Hp5wU",
- "compiled": {
- "content": "This is some text content"
}, - "createdAt": "2024-10-31T17:55:57Z",
- "updatedAt": "2024-10-31T17:55:57Z",
- "name": "English (US)",
- "localeGroup": "lgr_alka38ajla301"
}
Returns a specific localization object of the matching Voice draft with a matching localization ID
draftId required | string A draft ID |
localizationId required | string A localization ID |
voiceTargetLanguage | string Enum: "voice" "handlebars" "liquid" "django" "jinja" "handlebarsjava" The type of templating language to use when compiling the content. |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
A localization object from the matching draft ID with the requested ID
Invalid request
Unauthenticated
Unauthorized
Resource not found
Rate limit exceeded
Server error
Server error
{- "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
- "languages": [
- "fr-FR"
], - "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
- "template": "tem_g3L7Cw6Hp5wU",
- "compiled": {
- "content": "This is some text content"
}, - "createdAt": "2024-10-31T17:55:57Z",
- "updatedAt": "2024-10-31T17:55:57Z",
- "name": "English (US)",
- "localeGroup": "lgr_alka38ajla301"
}
Gets a list of Workspace objects for all workspaces. Up to 25 results returned before results are paginated.
cursor | string A cursor value used to retrieve a specific page from a paginated result set. |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
A list of workspaces
Invalid request
Unauthenticated
Unauthorized
Rate limit exceeded
Server error
Server error
{- "cursor": {
- "next": "string",
- "hasMore": true
}, - "data": [
- {
- "id": "fdr_01g0z4d5aw",
- "name": "Name of Folder",
- "description": "Description of Folder",
- "url": "/workspaces/fdr_g3L7Cw6Hp5wUaf395LehwK",
- "createdAt": "2024-10-31T17:55:57Z",
- "updatedAt": "2024-10-31T17:55:57Z"
}
]
}
Gets a Folder with a list of its sub-folders for the provided id.
folderId required | string A workspace/folder ID |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
Folder
Invalid request
Unauthenticated
Unauthorized
Rate limit exceeded
Server error
Server error
{- "id": "fdr_01g0z4d5aw",
- "name": "Name of Folder",
- "description": "Description of Folder",
- "url": "/workspaces/fdr_g3L7Cw6Hp5wUaf395LehwK",
- "createdAt": "2024-10-31T17:55:57Z",
- "updatedAt": "2024-10-31T17:55:57Z",
- "subfolders": [
- {
- "id": "fdr_01g0z4d5aw",
- "name": "Name of Folder",
- "description": "Description of Folder",
- "url": "/workspaces/fdr_g3L7Cw6Hp5wUaf395LehwK",
- "createdAt": "2024-10-31T17:55:57Z",
- "updatedAt": "2024-10-31T17:55:57Z"
}
]
}
Gets a list of Blocks
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
A list of blocks
Invalid request
Unauthenticated
Unauthorized
Rate limit exceeded
Server error
Server error
{- "cursor": {
- "next": "string",
- "hasMore": true
}, - "data": [
- {
- "id": "blk_01gpe172x7p6aa1c9grr48efq8",
- "name": "Header Block",
- "description": "string",
- "createdAt": "2024-10-31T17:55:57Z",
- "updatedAt": "2024-10-31T17:55:57Z",
- "url": "/blocks/blk_01gpe172x7p6aa1c9grr48efq8"
}
]
}
Gets a block with the matching ID.
blockId required | string A block ID |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
A block
Invalid request
Unauthenticated
Unauthorized
Rate limit exceeded
Server error
Server error
{- "id": "blk_01gpe172x7p6aa1c9grr48efq8",
- "name": "Header Block",
- "description": "string",
- "createdAt": "2024-10-31T17:55:57Z",
- "updatedAt": "2024-10-31T17:55:57Z",
- "url": "/blocks/blk_01gpe172x7p6aa1c9grr48efq8"
}
Returns localization metadata for the block
blockId required | string A block ID |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
A list of localizations
Invalid request
Unauthenticated
Unauthorized
Rate limit exceeded
Server error
Server error
[- {
- "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
- "name": "English (US)",
- "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
- "localeGroup": "lgr_alka38ajla301",
- "languages": [
- "fr-FR"
], - "updatedAt": "2024-10-31T17:55:57Z"
}
]
Returns the list of values that need to be translated for the block.
blockId required | string A block ID |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
Localization keys
Invalid request
Unauthenticated
Unauthorized
Rate limit exceeded
Server error
Server error
[- {
- "key": "string",
- "comment": "string"
}
]
Inserts a localization or sets the name on an existing localization that already uses the languageId
blockId required | string A block ID |
languageId required | string A language ID (eg: en-US) |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
name | string |
Successful upsert
{- "name": "English (US)"
}
Deletes the localization with the given language ID if it exists
blockId required | string A block ID |
languageId required | string A language ID (eg: en-US) |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
Successful delete
Completely replaces any existing translations for the given language with those provided in request body. Variables embedded in keys or values are expected to be in the format %(my_variable)s
and will automatically convert to the correct Dyspatch format depending on the type of template. Accepts key/value pairs in JSON format.
blockId required | string A block ID |
languageId required | string A language ID (eg: en-US) |
Accept required | string A version of the API that should be used for the request. For example, to use version "2024.11", set the value to "application/vnd.dyspatch.2024.11+json" |
property name* | string |
Successful
Unauthorized
{- "Hello %(name)s": "Bonjour %(name)s",
- "Welcome": "Bienvenue"
}