> ## 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 components

> Updates a set of components' base or variant text, plural forms, tags, status, assignee, notes, character limit, integrated and variables. Each component is identified by its developer ID. Only provided fields are modified — omitted fields remain unchanged.



## OpenAPI

````yaml openapi.json patch /components
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:
  /components:
    patch:
      tags:
        - Components
      summary: Update components
      description: >-
        Updates a set of components' base or variant text, plural forms, tags,
        status, assignee, notes, character limit, integrated and variables. Each
        component is identified by its developer ID. Only provided fields are
        modified — omitted fields remain unchanged.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                variantId:
                  type: string
                  description: >-
                    Developer ID of the target variant. If a component 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 component's developer ID
                      text:
                        type: string
                        description: >-
                          The text the component 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 component.
                          Other tags will be removed. If unset tags will remain
                          unchanged.
                      status:
                        type: string
                        description: >-
                          The status to set on this component (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 component. If
                          null the assignee will be removed. If not provided,
                          assignee will remain unchanged.
                      integrated:
                        type: boolean
                        description: >-
                          Mark the component as integrated or not integrated
                          into development. If not provided, integration status
                          will remain unchanged.
                      notes:
                        type: string
                        nullable: true
                        description: >-
                          Notes for the component. 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 component. 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.
                      folderId:
                        type: string
                        nullable: true
                        description: >-
                          The developer ID of the folder to move this component
                          into. Provide null or "root" to move it to the library
                          root (All Components). Omit to leave the component's
                          folder unchanged.
                    required:
                      - developerId
                  minItems: 1
                  description: Array of updates to components.
              required:
                - updates
              example:
                variantId: french
                updates:
                  - developerId: component-id-1
                    text: Updated text
                    status: REVIEW
            examples:
              update_base_text:
                summary: Update base text
                value:
                  updates:
                    - developerId: component-id-1
                      text: Hello!
              update_variant_text:
                summary: Update variant text
                value:
                  variantId: french
                  updates:
                    - developerId: component-id-1
                      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: component-id-1
                      text: Hello, {{user_name}}!
                      variables:
                        - user_name
              update_status:
                summary: Update status
                value:
                  updates:
                    - developerId: component-id-1
                      status: FINAL
                    - developerId: component-id-2
                      status: REVIEW
              update_notes_and_limit:
                summary: Update notes and character limit
                value:
                  updates:
                    - developerId: component-id-1
                      notes: Keep this under the character limit
                      characterLimit: 60
              update_assignee:
                summary: Update assignee
                value:
                  updates:
                    - developerId: component-id-1
                      assignee: john@example.com
                    - developerId: component-id-2
                      assignee: null
              update_tags:
                summary: Update tags
                value:
                  updates:
                    - developerId: component-id-1
                      tags:
                        - tag-1
                        - tag-2
              add_plurals:
                summary: Add plural forms
                value:
                  updates:
                    - developerId: component-id-1
                      plurals:
                        upsert:
                          - form: one
                            text: item
                          - form: other
                            text: items
      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 component,
            a variant ID that does not exist (when forceVariantCreation is not
            set), an assignee email that does not correspond to a workspace
            member, a variable name not found in the workspace, 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: Component with developer ID "component-id-1" not found
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````