Variants

Create variants

Creates one or more variants in the workspace.

A variant is a named alternative that text items and library components can each have their own text for — most often a locale to translate into, but also a tone or brand variation. Creating a variant adds no text on its own; use the text item endpoints to set a text item's text for that variant.

Read the developer IDs off the response rather than assuming them — a developer ID you don't specify is generated from the name.

post/variants

Request

  • Base URL: https://api.dittowords.com/v2
  • URL: https://api.dittowords.com/v2/variants
  • Auth: API key in header Authorization

Request body

Example request

{
  "variants": [
    {
      "name": "Spanish",
      "localeCode": "es"
    },
    {
      "name": "Canadian French",
      "developerId": "fr-ca",
      "description": "French translations for Canada"
    }
  ]
}

Response

Returns the developer IDs of the created variants, in request order

developerIdsstring[] required

Array of developer IDs for the created variants, in request order

Example response

{
  "developerIds": [
    "spanish",
    "fr-ca"
  ]
}

Changes

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