> ## 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 component text variant

> Used for updating the text and status fields for components in the workspace of the requesting user.

-> Currently only supports updating variant text or status on components via the variant query parameter (an error will be thrown if the variant param is not specified)

-> Currently only available for teams on team or enterprise plans



## OpenAPI

````yaml openapi-legacy.json put /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/v1
security: []
paths:
  /components:
    put:
      tags:
        - Components
      summary: Update component text variant
      description: >-
        Used for updating the text and status fields for components in the
        workspace of the requesting user.


        -> Currently only supports updating variant text or status on components
        via the variant query parameter (an error will be thrown if the variant
        param is not specified)


        -> Currently only available for teams on team or enterprise plans
      parameters:
        - schema:
            type: string
            description: The API ID of the variant.
            example: french
          required: true
          description: The API ID of the variant.
          name: variant
          in: query
        - schema:
            type: string
            enum:
              - flat
              - structured
              - nested
            example: structured
            description: >-
              Optional parameter to specify the format of the request body.
              Passing in this query parameter will validate the request body
              against the specified format preventing unexpected results if an
              invalid payload is provided.
          required: false
          description: >-
            Optional parameter to specify the format of the request body.
            Passing in this query parameter will validate the request body
            against the specified format preventing unexpected results if an
            invalid payload is provided.
          name: format
          in: query
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  additionalProperties:
                    type: object
                    properties:
                      text:
                        type: string
                        description: The component variant's text.
                        example: Nom d'utilisateur
                      status:
                        type: string
                        enum:
                          - NONE
                          - WIP
                          - REVIEW
                          - FINAL
                        example: FINAL
                      notes:
                        type: string
                      tags:
                        type: array
                        items:
                          type: string
                      plurals:
                        type: array
                        items:
                          type: object
                          properties:
                            text:
                              type: string
                            form:
                              type: string
                              enum:
                                - one
                                - two
                                - zero
                                - few
                                - many
                                - other
                          required:
                            - text
                            - form
                    required:
                      - text
                  description: Object that maps component API IDs to their new attributes.
                  example:
                    signup_username:
                      text: Nom d'utilisateur
                      status: FINAL
              required:
                - data
            examples:
              update_components_example:
                value:
                  data:
                    signup_username:
                      text: Nom d'utilisateur
                      status: FINAL
                    signup_password:
                      text: Mot de passe
                    signup_register:
                      text: S'inscrire
      responses:
        '200':
          description: Update/skip counts
          content:
            application/json:
              schema:
                type: object
                properties:
                  componentsUpdated:
                    type: number
                  componentsSkipped:
                    type: number
                required:
                  - componentsUpdated
                  - componentsSkipped
                example:
                  componentsUpdated: 1
                  componentsSkipped: 0
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````