Dyspatch API (2024.12)

Download OpenAPI specification:Download

Introduction

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.

API Client Libraries

Dyspatch provides API Clients for popular languages and web frameworks.

Templates

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.

List Templates

Gets a list of Template Metadata objects for all published templates. Up to 25 results returned before results are paginated.

Authorizations:
Bearer
query Parameters
cursor
string

A cursor value used to retrieve a specific page from a paginated result set.

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "cursor": {
    },
  • "data": [
    ]
}

Get Template by ID

Gets a template object with the matching ID. Templates without a published draft will result in an error.

Authorizations:
Bearer
path Parameters
templateId
required
string

A template ID

query Parameters
targetLanguage
required
string
Enum: "html" "handlebars" "ampscript" "freemarker" "cheetah" "jinja" "liquid" "mandrillhandlebars" "handlebarsjava"

The type of templating language to use when compiling the content.

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "id": "tem_g3L7Cw6Hp5wU",
  • "name": "Template Name",
  • "description": "Description of Template",
  • "url": "/templates/tem_g3L7Cw6Hp5wUaf395LehwK",
  • "compiled": {
    },
  • "path": "fdr_01gb8vd6pz/fdr_01gqjmdbq/fdr_01gqjmg1",
  • "workspaceId": "fdr_01gb8vd6pz",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "publishedDraftId": "tdft_g3L7Cw6Hp5wU",
  • "localizations": [
    ]
}

Render Template by ID

Renders a template into HTML using the provided data.

Authorizations:
Bearer
path Parameters
templateId
required
string

A template ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "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"
}

Render Localized Template by ID

Renders a template into HTML for the selected language using the provided data.

Authorizations:
Bearer
path Parameters
templateId
required
string

A template ID

languageId
required
string

A language ID (eg: en-US)

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "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

Drafts represent unpublished versions of templates that are still mutable. There could be many in progress drafts for a template.

List Drafts

Returns all Email drafts for your organization.

Authorizations:
Bearer
query Parameters
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

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "cursor": {
    },
  • "data": [
    ]
}

Submit Draft for Approval

Moves the Email draft into submitted state.

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Approve Draft

Approves an Email draft that is in Design or Publish review.

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Request Body schema: text/plain
optional

Optional Feedback for the approval

string

Responses

Approve Draft For All Reviewers

Approves an Email draft that is in Design or Publish review for all reviewers.

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Request Body schema: text/plain
optional

Optional Feedback for the approval

string

Responses

Reject Draft

Rejects an Email draft that is in Design or Publish review.

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Request Body schema: text/plain
optional

Optional Feedback for the rejection

string

Responses

Get Draft by ID

Gets a Email draft object with the matching ID. The "compiled" field will contain the template in the default, unlocalized form.

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

query Parameters
targetLanguage
required
string
Enum: "html" "handlebars" "ampscript" "freemarker" "cheetah" "jinja" "liquid" "mandrillhandlebars" "handlebarsjava"

The type of templating language to use when compiling the content.

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "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": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "localizations": [
    ],
  • "status": "LOCKED_FOR_TRANSLATION",
  • "templateName": "Template Name",
  • "designApprovedDate": "2019-08-24T14:15:22Z"
}

Get Localizations on a Draft

Returns localization metadata for the Email draft

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
[
  • {
    }
]

Create or Update a Localization

Inserts a localization or sets the name on an existing localization that already uses the languageId

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

languageId
required
string

A language ID (eg: en-US)

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Request Body schema: application/json
required
name
string

Responses

Request samples

Content type
application/json
{
  • "name": "English (US)"
}

Remove a Localization from Draft

Deletes the localization with the given language ID if it exists

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

languageId
required
string

A language ID (eg: en-US)

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Set Draft Translations for Language

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.

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

languageId
required
string

A language ID (eg: en-US)

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Request Body schema: application/json
required
property name*
additional property
string

Responses

Request samples

Content type
application/json
{
  • "Hello %(name)s": "Bonjour %(name)s",
  • "Welcome": "Bienvenue"
}

Get Draft Localization Keys

Returns the list of values that need to be translated for the draft. Set the Accept header to application/vnd.dyspatch.2024.12+json to get a JSON object, or text/vnd.dyspatch.2024.12+x-gettext-translation to get the POT file.

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
[
  • {
    }
]

Localizations

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.

Get Localization Object by ID

Returns the published content associated with the localization of the matching ID

Authorizations:
Bearer
path Parameters
localizationId
required
string

A localization ID

query Parameters
targetLanguage
required
string
Enum: "html" "handlebars" "ampscript" "freemarker" "cheetah" "jinja" "liquid" "mandrillhandlebars" "handlebarsjava"

The type of templating language to use when compiling the content.

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
  • "languages": [
    ],
  • "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
  • "template": "tem_g3L7Cw6Hp5wU",
  • "compiled": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "name": "English (US)",
  • "localeGroup": "lgr_alka38ajla301"
}

Get Draft Localization Object by ID

Returns a specific localization object of the matching draft with a matching localization ID

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

localizationId
required
string

A localization ID

query Parameters
targetLanguage
required
string
Enum: "html" "handlebars" "ampscript" "freemarker" "cheetah" "jinja" "liquid" "mandrillhandlebars" "handlebarsjava"

The type of templating language to use when compiling the content.

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
  • "languages": [
    ],
  • "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
  • "template": "tem_g3L7Cw6Hp5wU",
  • "compiled": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "name": "English (US)",
  • "localeGroup": "lgr_alka38ajla301"
}

SMS Templates

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.

List SMS Templates

Gets a list of SMS Template Metadata objects for all published templates. Up to 25 results returned before results are paginated.

Authorizations:
Bearer
query Parameters
cursor
string

A cursor value used to retrieve a specific page from a paginated result set.

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "cursor": {
    },
  • "data": [
    ]
}

Get SMS Template by ID

Gets an SMS template object with the matching ID. Templates without a published draft will result in an error.

Authorizations:
Bearer
path Parameters
templateId
required
string

A template ID

query Parameters
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.

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "id": "tem_g3L7Cw6Hp5wU",
  • "name": "Template Name",
  • "description": "Description of Template",
  • "url": "/templates/tem_g3L7Cw6Hp5wUaf395LehwK",
  • "compiled": {
    },
  • "path": "fdr_01gb8vd6pz/fdr_01gqjmdbq/fdr_01gqjmg1",
  • "workspaceId": "fdr_01gb8vd6pz",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "publishedDraftId": "tdft_g3L7Cw6Hp5wU",
  • "localizations": [
    ]
}

Render SMS Template by ID

Renders an SMS template into HTML using the provided data.

Authorizations:
Bearer
path Parameters
templateId
required
string

A template ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "sender": "John Doe",
  • "phone": "123-456-7890",
  • "content": [
    ]
}

Render Localized SMS Template by ID

Renders an SMS template into HTML for the selected language using the provided data.

Authorizations:
Bearer
path Parameters
templateId
required
string

A template ID

languageId
required
string

A language ID (eg: en-US)

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "sender": "John Doe",
  • "phone": "123-456-7890",
  • "content": [
    ]
}

SMS Drafts

SMS Drafts represent unpublished versions of templates that are still mutable. There could be many in progress drafts for a template.

List SMS Drafts

Returns all SMS drafts for your organization.

Authorizations:
Bearer
query Parameters
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

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "cursor": {
    },
  • "data": [
    ]
}

Submit SMS Draft for Approval

Moves the SMS draft into submitted state.

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Approve SMS Draft

Approves an SMS draft that is in Design or Publish review.

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Request Body schema: text/plain
optional

Optional Feedback for the approval

string

Responses

Approve SMS Draft For All Reviewers

Approves an SMS draft that is in Design or Publish review for all reviewers.

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Request Body schema: text/plain
optional

Optional Feedback for the approval

string

Responses

Reject SMS Draft

Rejects an SMS draft that is in Design or Publish review.

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Request Body schema: text/plain
optional

Optional Feedback for the rejection

string

Responses

Get SMS Draft by ID

Gets an SMS draft object with the matching ID. The "compiled" field will contain the template in the default, unlocalized form.

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "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": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "localizations": [
    ],
  • "status": "LOCKED_FOR_TRANSLATION",
  • "templateName": "Template Name",
  • "designApprovedDate": "2019-08-24T14:15:22Z"
}

Get Localizations on an SMS Draft

Returns localization metadata for the SMS draft

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
[
  • {
    }
]

Create or Update an SMS Localization

Inserts a localization or sets the name on an existing localization that already uses the languageId

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

languageId
required
string

A language ID (eg: en-US)

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Request Body schema: application/json
required
name
string

Responses

Request samples

Content type
application/json
{
  • "name": "English (US)"
}

Remove a Localization from SMS Draft

Deletes the localization with the given language ID if it exists

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

languageId
required
string

A language ID (eg: en-US)

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Set SMS Draft Translations for Language

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.

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

languageId
required
string

A language ID (eg: en-US)

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Request Body schema: application/json
required
property name*
additional property
string

Responses

Request samples

Content type
application/json
{
  • "Hello %(name)s": "Bonjour %(name)s",
  • "Welcome": "Bienvenue"
}

Get SMS Draft Localization Keys

Returns the list of values that need to be translated for the draft. Set the Accept header to application/vnd.dyspatch.2024.12+json to get a JSON object, or text/vnd.dyspatch.2024.12+x-gettext-translation to get the POT file.

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
[
  • {
    }
]

SMS Localizations

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.

Get SMS Localization Object by ID

Returns the published SMS content associated with the localization of the matching ID

Authorizations:
Bearer
path Parameters
localizationId
required
string

A localization ID

query Parameters
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.

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
  • "languages": [
    ],
  • "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
  • "template": "tem_g3L7Cw6Hp5wU",
  • "compiled": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "name": "English (US)",
  • "localeGroup": "lgr_alka38ajla301"
}

Get SMS Draft Localization Object by ID

Returns a specific localization object of the matching SMS draft with a matching localization ID

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

localizationId
required
string

A localization ID

query Parameters
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.

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
  • "languages": [
    ],
  • "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
  • "template": "tem_g3L7Cw6Hp5wU",
  • "compiled": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "name": "English (US)",
  • "localeGroup": "lgr_alka38ajla301"
}

Push Templates

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.

List Push Templates

Gets a list of Push Template Metadata objects for all published templates. Up to 25 results returned before results are paginated.

Authorizations:
Bearer
query Parameters
cursor
string

A cursor value used to retrieve a specific page from a paginated result set.

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "cursor": {
    },
  • "data": [
    ]
}

Get Push Template by ID

Gets a Push template object with the matching ID. Templates without a published draft will result in an error.

Authorizations:
Bearer
path Parameters
templateId
required
string

A template ID

query Parameters
pushTargetLanguage
string
Enum: "push" "handlebars" "liquid" "django" "jinja" "handlebarsjava"

The type of templating language to use when compiling the content.

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "id": "tem_g3L7Cw6Hp5wU",
  • "name": "Template Name",
  • "description": "Description of Template",
  • "url": "/templates/tem_g3L7Cw6Hp5wUaf395LehwK",
  • "compiled": {
    },
  • "path": "fdr_01gb8vd6pz/fdr_01gqjmdbq/fdr_01gqjmg1",
  • "workspaceId": "fdr_01gb8vd6pz",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "publishedDraftId": "tdft_g3L7Cw6Hp5wU",
  • "localizations": [
    ]
}

Render Push Template by ID

Renders a Push template into HTML using the provided data.

Authorizations:
Bearer
path Parameters
templateId
required
string

A template ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "content": [
    ]
}

Render Localized Push Template by ID

Renders a Push template into HTML for the selected language using the provided data.

Authorizations:
Bearer
path Parameters
templateId
required
string

A template ID

languageId
required
string

A language ID (eg: en-US)

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "content": [
    ]
}

Push Drafts

Push Drafts represent unpublished versions of templates that are still mutable. There could be many in progress drafts for a template.

List Push Drafts

Returns all Push drafts for your organization.

Authorizations:
Bearer
query Parameters
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

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "cursor": {
    },
  • "data": [
    ]
}

Submit Push Draft for Approval

Moves the Push draft into submitted state.

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Approve Push Draft

Approves a Push draft that is in Design or Publish review.

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Request Body schema: text/plain
optional

Optional Feedback for the approval

string

Responses

Approve Push Draft For All Reviewers

Approves a Push draft that is in Design or Publish review for all reviewers.

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Request Body schema: text/plain
optional

Optional Feedback for the approval

string

Responses

Reject Push Draft

Rejects a Push draft that is in Design or Publish review.

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Request Body schema: text/plain
optional

Optional Feedback for the rejection

string

Responses

Get Push Draft by ID

Gets a Push draft object with the matching ID. The "compiled" field will contain the template in the default, unlocalized form.

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "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": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "localizations": [
    ],
  • "status": "LOCKED_FOR_TRANSLATION",
  • "templateName": "Template Name",
  • "designApprovedDate": "2019-08-24T14:15:22Z"
}

Get Localizations on a Push Draft

Returns localization metadata for the Push draft

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
[
  • {
    }
]

Create or Update a Push Localization

Inserts a localization or sets the name on an existing localization that already uses the languageId

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

languageId
required
string

A language ID (eg: en-US)

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Request Body schema: application/json
required
name
string

Responses

Request samples

Content type
application/json
{
  • "name": "English (US)"
}

Remove a Localization from Push Draft

Deletes the localization with the given language ID if it exists

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

languageId
required
string

A language ID (eg: en-US)

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Set Push Draft Translations for Language

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.

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

languageId
required
string

A language ID (eg: en-US)

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Request Body schema: application/json
required
property name*
additional property
string

Responses

Request samples

Content type
application/json
{
  • "Hello %(name)s": "Bonjour %(name)s",
  • "Welcome": "Bienvenue"
}

Get Push Draft Localization Keys

Returns the list of values that need to be translated for the draft. Set the Accept header to application/vnd.dyspatch.2024.12+json to get a JSON object, or text/vnd.dyspatch.2024.12+x-gettext-translation to get the POT file.

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
[
  • {
    }
]

Push Localizations

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.

Get Push Localization Object by ID

Returns the published Push content associated with the localization of the matching ID

Authorizations:
Bearer
path Parameters
localizationId
required
string

A localization ID

query Parameters
pushTargetLanguage
string
Enum: "push" "handlebars" "liquid" "django" "jinja" "handlebarsjava"

The type of templating language to use when compiling the content.

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
  • "languages": [
    ],
  • "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
  • "template": "tem_g3L7Cw6Hp5wU",
  • "compiled": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "name": "English (US)",
  • "localeGroup": "lgr_alka38ajla301"
}

Get Push Draft Localization Object by ID

Returns a specific localization object of the matching Push draft with a matching localization ID

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

localizationId
required
string

A localization ID

query Parameters
pushTargetLanguage
string
Enum: "push" "handlebars" "liquid" "django" "jinja" "handlebarsjava"

The type of templating language to use when compiling the content.

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
  • "languages": [
    ],
  • "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
  • "template": "tem_g3L7Cw6Hp5wU",
  • "compiled": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "name": "English (US)",
  • "localeGroup": "lgr_alka38ajla301"
}

Voice Templates

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.

List Voice Templates

Gets a list of Voice Template Metadata objects for all published templates. Up to 25 results returned before results are paginated.

Authorizations:
Bearer
query Parameters
cursor
string

A cursor value used to retrieve a specific page from a paginated result set.

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "cursor": {
    },
  • "data": [
    ]
}

Get Voice Template by ID

Gets an Voice template object with the matching ID. Templates without a published draft will result in an error.

Authorizations:
Bearer
path Parameters
templateId
required
string

A template ID

query Parameters
voiceTargetLanguage
string
Enum: "voice" "handlebars" "liquid" "django" "jinja" "handlebarsjava"

The type of templating language to use when compiling the content.

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "id": "tem_g3L7Cw6Hp5wU",
  • "name": "Template Name",
  • "description": "Description of Template",
  • "url": "/templates/tem_g3L7Cw6Hp5wUaf395LehwK",
  • "compiled": {
    },
  • "path": "fdr_01gb8vd6pz/fdr_01gqjmdbq/fdr_01gqjmg1",
  • "workspaceId": "fdr_01gb8vd6pz",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "publishedDraftId": "tdft_g3L7Cw6Hp5wU",
  • "localizations": [
    ]
}

Render Voice Template by ID

Renders an Voice template into HTML using the provided data.

Authorizations:
Bearer
path Parameters
templateId
required
string

A template ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "content": "This is some text content"
}

Render Localized Voice Template by ID

Renders an Voice template into HTML for the selected language using the provided data.

Authorizations:
Bearer
path Parameters
templateId
required
string

A template ID

languageId
required
string

A language ID (eg: en-US)

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "content": "This is some text content"
}

Voice Drafts

Voice Drafts represent unpublished versions of templates that are still mutable. There could be many in progress drafts for a template.

List Voice Drafts

Returns all Voice drafts for your organization.

Authorizations:
Bearer
query Parameters
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

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "cursor": {
    },
  • "data": [
    ]
}

Submit Voice Draft for Approval

Moves the Voice draft into submitted state.

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Approve Voice Draft

Approves a Voice draft that is in Design or Publish review.

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Request Body schema: text/plain
optional

Optional Feedback for the approval

string

Responses

Approve Voice Draft For All Reviewers

Approves a Voice draft that is in Design or Publish review for all reviewers.

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Request Body schema: text/plain
optional

Optional Feedback for the approval

string

Responses

Reject Voice Draft

Rejects a Voice draft that is in Design or Publish review.

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Request Body schema: text/plain
optional

Optional Feedback for the rejection

string

Responses

Get Voice Draft by ID

Gets an Voice draft object with the matching ID. The "compiled" field will contain the template in the default, unlocalized form.

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "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": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "localizations": [
    ],
  • "status": "LOCKED_FOR_TRANSLATION",
  • "templateName": "Template Name",
  • "designApprovedDate": "2019-08-24T14:15:22Z"
}

Get Localizations on an Voice Draft

Returns localization metadata for the Voice draft

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
[
  • {
    }
]

Create or Update an Voice Localization

Inserts a localization or sets the name on an existing localization that already uses the languageId

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

languageId
required
string

A language ID (eg: en-US)

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Request Body schema: application/json
required
name
string

Responses

Request samples

Content type
application/json
{
  • "name": "English (US)"
}

Remove a Localization from Voice Draft

Deletes the localization with the given language ID if it exists

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

languageId
required
string

A language ID (eg: en-US)

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Set Voice Draft Translations for Language

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.

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

languageId
required
string

A language ID (eg: en-US)

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Request Body schema: application/json
required
property name*
additional property
string

Responses

Request samples

Content type
application/json
{
  • "Hello %(name)s": "Bonjour %(name)s",
  • "Welcome": "Bienvenue"
}

Get Voice Draft Localization Keys

Returns the list of values that need to be translated for the draft. Set the Accept header to application/vnd.dyspatch.2024.12+json to get a JSON object, or text/vnd.dyspatch.2024.12+x-gettext-translation to get the POT file.

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
[
  • {
    }
]

Voice Localizations

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.

Get Voice Localization Object by ID

Returns the published Voice content associated with the localization of the matching ID

Authorizations:
Bearer
path Parameters
localizationId
required
string

A localization ID

query Parameters
voiceTargetLanguage
string
Enum: "voice" "handlebars" "liquid" "django" "jinja" "handlebarsjava"

The type of templating language to use when compiling the content.

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
  • "languages": [
    ],
  • "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
  • "template": "tem_g3L7Cw6Hp5wU",
  • "compiled": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "name": "English (US)",
  • "localeGroup": "lgr_alka38ajla301"
}

Get Voice Draft Localization Object by ID

Returns a specific localization object of the matching Voice draft with a matching localization ID

Authorizations:
Bearer
path Parameters
draftId
required
string

A draft ID

localizationId
required
string

A localization ID

query Parameters
voiceTargetLanguage
string
Enum: "voice" "handlebars" "liquid" "django" "jinja" "handlebarsjava"

The type of templating language to use when compiling the content.

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "id": "loc_g3L7Cw6Hp5wUaf395LehwK",
  • "languages": [
    ],
  • "url": "/localizations/loc_g3L7Cw6Hp5wUaf395LehwK",
  • "template": "tem_g3L7Cw6Hp5wU",
  • "compiled": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "name": "English (US)",
  • "localeGroup": "lgr_alka38ajla301"
}

Workspaces

List Workspaces

Gets a list of Workspace objects for all workspaces. Up to 25 results returned before results are paginated.

Authorizations:
Bearer
query Parameters
cursor
string

A cursor value used to retrieve a specific page from a paginated result set.

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "cursor": {
    },
  • "data": [
    ]
}

List Folder

Gets a Folder with a list of its sub-folders for the provided id.

Authorizations:
Bearer
path Parameters
folderId
required
string

A workspace/folder ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "id": "fdr_01g0z4d5aw",
  • "name": "Name of Folder",
  • "description": "Description of Folder",
  • "url": "/workspaces/fdr_g3L7Cw6Hp5wUaf395LehwK",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "subfolders": [
    ]
}

Blocks

List Blocks

Gets a list of Blocks

Authorizations:
Bearer
header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "cursor": {
    },
  • "data": [
    ]
}

Get Block by ID

Gets a block with the matching ID.

Authorizations:
Bearer
path Parameters
blockId
required
string

A block ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
{
  • "id": "blk_01gpe172x7p6aa1c9grr48efq8",
  • "name": "Header Block",
  • "description": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "url": "/blocks/blk_01gpe172x7p6aa1c9grr48efq8"
}

Get localizations on a block

Returns localization metadata for the block

Authorizations:
Bearer
path Parameters
blockId
required
string

A block ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
[
  • {
    }
]

Get localization keys

Returns the list of values that need to be translated for the block.

Authorizations:
Bearer
path Parameters
blockId
required
string

A block ID

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Response samples

Content type
application/vnd.dyspatch.2024.12+json
[
  • {
    }
]

Create or update a block localization

Inserts a localization or sets the name on an existing localization that already uses the languageId

Authorizations:
Bearer
path Parameters
blockId
required
string

A block ID

languageId
required
string

A language ID (eg: en-US)

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Request Body schema: application/json
required
name
string

Responses

Request samples

Content type
application/json
{
  • "name": "English (US)"
}

Remove a localization

Deletes the localization with the given language ID if it exists

Authorizations:
Bearer
path Parameters
blockId
required
string

A block ID

languageId
required
string

A language ID (eg: en-US)

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Responses

Set translations for language

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.

Authorizations:
Bearer
path Parameters
blockId
required
string

A block ID

languageId
required
string

A language ID (eg: en-US)

header Parameters
Accept
required
string

A version of the API that should be used for the request. For example, to use version "2024.12", set the value to "application/vnd.dyspatch.2024.12+json"

Request Body schema: application/json
required
property name*
additional property
string

Responses

Request samples

Content type
application/json
{
  • "Hello %(name)s": "Bonjour %(name)s",
  • "Welcome": "Bienvenue"
}