Text Items

Create text items

Creates a set of text items in a project.

Supports plural forms, variant text, variable placeholders, notes, character limits, tags, status, assignee, and placing the item inside a block.

post/textItems

Request

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

Request body

projectIdstring required

Developer ID of the project the new text items will be added to

richText'html'

When set to 'html', all text values in this request (including plural and variant text) are parsed as HTML and saved as rich text. Supported formatting: <strong>/<b>, <em>/<i>, <u>, <s>, and <br> for line breaks. <sup> and <sub> are only supported for workspaces with superscript and subscript enabled. Unsupported markup (for example links, lists, or headings) is dropped and its text content kept.

Note: Fully-bolded strings will have that bold styling stripped, as Figma does not support bolding an entire text layer this way.

When omitted, text is saved as plaintext and any markup is stored literally.

Example request

{
  "projectId": "project-id",
  "textItems": [
    {
      "text": "Hello world"
    },
    {
      "developerId": "custom-dev-id",
      "text": "Custom ID example",
      "notes": "Shown on the welcome screen",
      "characterLimit": 80
    },
    {
      "text": "{{count}} items in your cart",
      "variables": [
        "count"
      ],
      "plurals": [
        {
          "form": "one",
          "text": "{{count}} item in your cart"
        },
        {
          "form": "other",
          "text": "{{count}} items in your cart"
        }
      ]
    },
    {
      "text": "Hello world",
      "developerId": "localized-greeting",
      "variants": [
        {
          "variantId": "french",
          "text": "Bonjour le monde"
        }
      ]
    },
    {
      "text": "Welcome to the homepage",
      "blockId": "header"
    }
  ]
}

Response

Returns the developer IDs of the created text items

developerIdsstring[] required

Array of developer IDs for the created text items

Example response

{
  "developerIds": [
    "hello-world",
    "custom-dev-id"
  ]
}

Changes

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