GET
/
components
Fetch components
curl --request GET \
  --url https://api.dittowords.com/v2/components \
  --header 'Authorization: <api-key>'
[
  {
    "id": "component-item-dev-id",
    "text": "Base text",
    "status": "NONE",
    "notes": "base notes",
    "tags": [
      "baseTag1",
      "baseTag2"
    ],
    "variableIds": [],
    "folderId": "folder-dev-id",
    "variantId": null,
    "richText": "<strong>Base</strong> text"
  },
  {
    "id": "component-item-dev-id",
    "text": "French text",
    "status": "WIP",
    "notes": "base notes",
    "tags": [
      "baseTag1",
      "baseTag2"
    ],
    "variableIds": [
      "age",
      "name"
    ],
    "folderId": "folder-dev-id",
    "variantId": "french",
    "richText": "<em>French</em> text"
  },
  {
    "id": "component-item-dev-id-2",
    "text": "Some base text",
    "status": "FINAL",
    "notes": "base notes",
    "tags": [
      "baseTag1",
      "baseTag2"
    ],
    "variableIds": [
      "age",
      "name"
    ],
    "folderId": null,
    "variantId": null,
    "richText": "Some <strong>base</strong> text"
  }
]

Authorizations

Authorization
string
header
required

Query Parameters

filter
string

Stringified JSON filter object. Can filter by folders (array of folder IDs or 'root' for root-level components) and/or variants (array of variant IDs or 'all' or 'base'). By default, folder filters search for components in that folder and its folder children. To skip searching folder children for a given folder, set 'excludeNestedFolders' to 'true'. Example: {"folders":[{"id":"folder-id"}, {"id": "folder-id-2", "excludeNestedFolders": true}],"variants":[{"id":"french"}]}

richText
enum<string>

When set to 'html', includes HTML-formatted rich text in the response

Available options:
html

Response

200 - application/json

Returns an array of components matching the filter criteria

id
string
required

The Developer ID of the component

text
string
required

The plaintext content of the component. May be base or variant text depending on variantId

status
string
required

The current status of the base or variant text

notes
string
required

The notes on the component. Variants will have the base component's notes value

tags
string[]
required

Array of tags associated with the component. Variants will have the base component's tags value

variableIds
string[]
required

Array of Developer IDs of variables used in this base or variant text

variantId
string | null
required

The Developer ID of this variant, or null for base text

folderId
string | null
required

The Developer ID of the folder this component belongs to

richText
string

HTML-formatted version of the text content. Only included when richText=html query parameter is provided