> ## Documentation Index
> Fetch the complete documentation index at: https://developer.dittowords.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update text items

> Updates a set of text items' base or variant text, plural forms, tags, status, assignee, notes, character limit, integrated and variables. Each text item is identified by its developer ID. Only provided fields are modified — omitted fields remain unchanged. Currently, if `variantId` is passed, then `assignee` will be ignored, as you cannot yet have an assignee for a variant.



## OpenAPI

````yaml openapi.json patch /textItems
openapi: 3.0.0
info:
  version: 1.0.0
  title: Ditto API
  description: Programmatically read and write data in your Ditto workspace.
servers:
  - url: https://api.dittowords.com/v2
security: []
paths:
  /textItems:
    patch:
      tags:
        - Text Items
      summary: Update text items
      description: >-
        Updates a set of text items' base or variant text, plural forms, tags,
        status, assignee, notes, character limit, integrated and variables. Each
        text item is identified by its developer ID. Only provided fields are
        modified — omitted fields remain unchanged. Currently, if `variantId` is
        passed, then `assignee` will be ignored, as you cannot yet have an
        assignee for a variant.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                variantId:
                  type: string
                  description: >-
                    Developer ID of the target variant. If a text item does not
                    already have the target variant, it will be added. Omit if
                    targeting base text
                forceVariantCreation:
                  type: boolean
                  description: >-
                    If true, and the provided variantId is not found, create the
                    variant. A variant name will be generated based on the
                    passed in ID.
                updates:
                  type: array
                  items:
                    type: object
                    properties:
                      developerId:
                        type: string
                        description: The text item's developer ID
                      text:
                        type: string
                        description: >-
                          The text the text item will be updated to. Text will
                          remain unchanged if unset. **Note:** Cannot be
                          combined with plurals in the same update object. To
                          update both the display text and other plural forms at
                          once, include the first plural form in the plurals
                          upsert array instead.
                      tags:
                        type: array
                        items:
                          type: string
                        description: >-
                          The set of tags that will be set on this text item.
                          Other tags will be removed. If unset tags will remain
                          unchanged.
                      status:
                        type: string
                        description: >-
                          The status to set on this text item (for example:
                          'NONE', 'WIP', 'REVIEW', 'FINAL'). If not provided,
                          status will remain unchanged.
                      assignee:
                        type: string
                        nullable: true
                        format: email
                        description: >-
                          The email of the user to assign to the text item. If
                          null the assignee will be removed. If not provided,
                          assignee will remain unchanged.
                      integrated:
                        type: boolean
                        description: >-
                          Mark the text item as integrated or not integrated
                          into development. If not provided, integration status
                          will remain unchanged.
                      notes:
                        type: string
                        nullable: true
                        description: >-
                          Notes for the text item. Use null or empty string to
                          clear notes. If not provided, notes will remain
                          unchanged.
                      characterLimit:
                        type: number
                        nullable: true
                        minimum: 1
                        description: >-
                          Character limit for the text item. Use null to remove
                          the limit. If not provided, character limit will
                          remain unchanged.
                      variables:
                        type: array
                        items:
                          type: string
                        description: >-
                          Developer IDs of variables (the `id` field from GET
                          /v2/variables) used in this update's text or plurals.
                          Text fields support `{{variable_name}}` placeholders
                          that will be resolved using the variables listed here.
                          Placeholders whose names are not in this list are kept
                          as literal text.
                      plurals:
                        type: object
                        properties:
                          upsert:
                            type: array
                            items:
                              type: object
                              properties:
                                form:
                                  type: string
                                  enum:
                                    - one
                                    - two
                                    - few
                                    - many
                                    - zero
                                    - other
                                  description: The plural form
                                text:
                                  type: string
                                  description: The text for this plural form
                              required:
                                - form
                                - text
                            description: >-
                              Array of plural forms to create or update. If a
                              plural with the given form already exists, its
                              text will be updated. Otherwise, a new plural will
                              be created. Each form may only appear once in the
                              array.
                          remove:
                            type: array
                            items:
                              type: string
                              enum:
                                - one
                                - two
                                - few
                                - many
                                - zero
                                - other
                            description: >-
                              Array of plural forms to remove from the text
                              item. Each form may only appear once. A form
                              cannot appear in both upsert and remove.
                        description: >-
                          Optional plural form updates. Existing plural forms
                          not mentioned in either upsert or remove are
                          preserved. The order of plurals matters: the first
                          plural form is the 'master' value whose text is used
                          as the text item's display text. New plurals are
                          appended after existing ones. If you need to change
                          which plural is first, remove and re-add them in the
                          desired order.
                    required:
                      - developerId
                  description: Array of updates to text items.
              required:
                - updates
              example:
                variantId: french
                updates:
                  - developerId: greeting
                    text: Bonjour!
                    status: FINAL
                    assignee: john@example.com
            examples:
              update_base_text:
                summary: Update base text
                value:
                  updates:
                    - developerId: greeting
                      text: Hello!
              update_variant_text:
                summary: Update variant text
                value:
                  variantId: french
                  updates:
                    - developerId: greeting
                      text: Bonjour!
              update_with_variables:
                summary: Update text with variable placeholders
                description: >-
                  Use `{{variable_name}}` placeholders in the text and list the
                  variable developer IDs in `variables`. Variables not in the
                  list are kept as literal text.
                value:
                  updates:
                    - developerId: greeting
                      text: Hello, {{user_name}}!
                      variables:
                        - user_name
              update_status:
                summary: Update status
                value:
                  updates:
                    - developerId: greeting
                      status: FINAL
                    - developerId: welcome-message
                      status: REVIEW
              update_notes_and_limit:
                summary: Update notes and character limit
                value:
                  updates:
                    - developerId: greeting
                      notes: Keep this short
                      characterLimit: 40
              update_assignee:
                summary: Update assignee
                value:
                  updates:
                    - developerId: greeting
                      assignee: john@example.com
                    - developerId: welcome-message
                      assignee: null
              add_plurals:
                summary: Add plural forms to a text item
                description: >-
                  Creates plural forms on a text item. New forms are appended
                  after any existing plurals.
                value:
                  updates:
                    - developerId: item-count
                      plurals:
                        upsert:
                          - form: one
                            text: item
                          - form: other
                            text: items
              update_and_remove_plurals:
                summary: Update and remove plural forms
                description: >-
                  Updates existing plural forms and removes others in a single
                  request. A form cannot appear in both upsert and remove. Forms
                  in remove must exist on the text item.
                value:
                  updates:
                    - developerId: item-count
                      plurals:
                        upsert:
                          - form: one
                            text: updated item
                        remove:
                          - many
              update_variant_plurals:
                summary: Update plural forms on a variant
                description: >-
                  Plural forms can also be managed on variants by providing a
                  variantId.
                value:
                  variantId: french
                  updates:
                    - developerId: item-count
                      plurals:
                        upsert:
                          - form: one
                            text: élément
                          - form: other
                            text: éléments
      responses:
        '200':
          description: Returns success status of the update operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Indicates whether the update was successful
                required:
                  - success
                example:
                  success: true
        '400':
          description: >-
            Returned when the request body fails validation. Common causes
            include: a developer ID that does not match any existing text item,
            a variant ID that does not exist (when forceVariantCreation is not
            set), a variable name not found in the workspace, duplicate plural
            forms in the upsert array, a form appearing in both upsert and
            remove, attempting to remove a plural form that does not exist on
            the text item, or providing both `text` and `plurals` in the same
            update object.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message describing the validation failure
                  details:
                    type: object
                    description: Optional additional error details
                required:
                  - message
              example:
                message: >-
                  Cannot remove plural forms that do not exist on text item
                  "item-count": many
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````