Skip to main content
GET
/
textItems
Fetch text items
curl --request GET \
  --url https://api.dittowords.com/v2/textItems \
  --header 'Authorization: <api-key>'
import requests

url = "https://api.dittowords.com/v2/textItems"

headers = {"Authorization": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: '<api-key>'}};

fetch('https://api.dittowords.com/v2/textItems', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dittowords.com/v2/textItems",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.dittowords.com/v2/textItems"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.dittowords.com/v2/textItems")
.header("Authorization", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.dittowords.com/v2/textItems")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'

response = http.request(request)
puts response.read_body
[
  {
    "id": "text-item-dev-id",
    "text": "Base text",
    "status": "NONE",
    "notes": "base notes",
    "tags": [
      "baseTag1",
      "baseTag2"
    ],
    "assignee": "john@example.com",
    "integrated": true,
    "variableIds": [],
    "projectId": "project-dev-id",
    "variantId": null,
    "blockName": "block name",
    "richText": "<strong>Base</strong> text"
  },
  {
    "id": "text-item-dev-id",
    "text": "French text",
    "status": "WIP",
    "notes": "base notes",
    "tags": [
      "baseTag1",
      "baseTag2"
    ],
    "assignee": "john@example.com",
    "integrated": true,
    "variableIds": [
      "age",
      "name"
    ],
    "projectId": "project-dev-id",
    "variantId": "french",
    "blockName": "block name",
    "richText": "<em>French</em> text"
  },
  {
    "id": "another-text-item",
    "text": "Some base text",
    "status": "FINAL",
    "notes": "base notes",
    "tags": [
      "baseTag1",
      "baseTag2"
    ],
    "assignee": null,
    "integrated": false,
    "variableIds": [
      "age",
      "name"
    ],
    "projectId": "another-project",
    "variantId": null,
    "blockName": null,
    "richText": "Some <strong>base</strong> text"
  }
]

Authorizations

Authorization
string
header
required

Query Parameters

filter
string

Stringified JSON filter object. Supports the following filter fields:

  • projects: array of objects with id (project developer ID)
  • variants: array of objects with id (variant developer ID, base, or all)
  • statuses: array of status strings (NONE, WIP, REVIEW, FINAL)
  • tags: object with values (array of tag strings) and optional operator (AND or OR, defaults to OR)
  • assignee: email string to match assigned text items, or null for unassigned
  • integrated: boolean value to filter by items that are or are not integrated into development

By default, only base text will be returned. Provide a variants filter to specify which variants of the filtered base text items to include.

When pairing variants with a status or assignee filter, variant data will only be returned if both the base and variant status/assignee match the filter.

Example: {"projects":[{"id":"project-id"}], "variants":[{"id":"french"}], "statuses":["NONE","WIP","FINAL","REVIEW"], "tags":{"values":["tag-1","tag-2"],"operator":"AND"}, "assignee":"user@example.com", "integrated":true}

sort
enum<string>

Sort order for the returned text items (default: id):

  • id sorts all items alphabetically by developer ID.
  • project_order groups items by project, returned alphabetically by project developer ID, then sorts within projects based on the custom sort order set up in the web app.
Available options:
id,
project_order
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 text items matching the filter criteria

id
string
required

The Developer ID of the text item

text
string
required

The plaintext content of the text item. Returns the variant's text when variantId is not null.

status
string
required

The status of the text item. Returns the variant's status when variantId is not null.

assignee
string<email> | null
required

The email of the user assigned to this text item, or null if unassigned. Returns the variant's assignee when variantId is not null.

notes
string
required

The notes on the text item. Returns the variant's notes when variantId is not null.

characterLimit
number | null
required

The character limit set on this text item, or null if no limit is set. Returns the variant's character limit when variantId is not null.

tags
string[]
required

Array of tags associated with the text item. Returns the base tags value in all responses; variants do not have their own tags.

integrated
boolean
required

Whether this text item has been marked as integrated into development

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

pluralForm
enum<string> | null
required
Available options:
one,
two,
few,
many,
zero,
other,
null
projectId
string
required

The Developer ID of the project this text item belongs to

blockName
string | null
required

The name of the block this text item belongs to, or null if it is not in a block

richText
string

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

Example:
[
{
"id": "text-item-dev-id",
"text": "Base text",
"status": "NONE",
"notes": "base notes",
"tags": ["baseTag1", "baseTag2"],
"assignee": "john@example.com",
"integrated": true,
"variableIds": [],
"projectId": "project-dev-id",
"variantId": null,
"blockName": "block name",
"richText": "<strong>Base</strong> text"
},
{
"id": "text-item-dev-id",
"text": "French text",
"status": "WIP",
"notes": "base notes",
"tags": ["baseTag1", "baseTag2"],
"assignee": "john@example.com",
"integrated": true,
"variableIds": ["age", "name"],
"projectId": "project-dev-id",
"variantId": "french",
"blockName": "block name",
"richText": "<em>French</em> text"
},
{
"id": "another-text-item",
"text": "Some base text",
"status": "FINAL",
"notes": "base notes",
"tags": ["baseTag1", "baseTag2"],
"assignee": null,
"integrated": false,
"variableIds": ["age", "name"],
"projectId": "another-project",
"variantId": null,
"blockName": null,
"richText": "Some <strong>base</strong> text"
}
]