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

# Export components

> Returns components in your workspace in the provided format.



## OpenAPI

````yaml openapi.json get /components/export
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/export:
    get:
      tags:
        - Components
      summary: Export components
      description: Returns components in your workspace in the provided format.
      parameters:
        - schema:
            type: string
            description: >-
              Stringified JSON filter object. Supports the following filter
              fields:

              - `folders`: array of objects with `id` (folder developer ID or
              `root` for root-level components) and optional
              `excludeNestedFolders` (boolean)

              - `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 components, or `null`
              for unassigned

              - `integrated`: boolean value to filter by components that are or
              are not marked as integrated into development


              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}],
              "statuses":["NONE","WIP","FINAL","REVIEW"],
              "tags":{"values":["tag-1"],"operator":"OR"},
              "assignee":"user@example.com", "integrated":true}`
          required: false
          description: >-
            Stringified JSON filter object. Supports the following filter
            fields:

            - `folders`: array of objects with `id` (folder developer ID or
            `root` for root-level components) and optional
            `excludeNestedFolders` (boolean)

            - `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 components, or `null`
            for unassigned

            - `integrated`: boolean value to filter by components that are or
            are not marked as integrated into development


            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}],
            "statuses":["NONE","WIP","FINAL","REVIEW"],
            "tags":{"values":["tag-1"],"operator":"OR"},
            "assignee":"user@example.com", "integrated":true}`
          name: filter
          in: query
        - schema:
            type: string
            enum:
              - html
            description: >-
              When set to 'html', includes HTML-formatted rich text in the
              response
          required: false
          description: >-
            When set to 'html', includes HTML-formatted rich text in the
            response
          name: richText
          in: query
        - schema:
            type: string
            description: |2-

                    By default, base text will be returned. Provide a variant parameter to specify which variant of the filtered base text items to return.
                    
          required: false
          description: |2-

                  By default, base text will be returned. Provide a variant parameter to specify which variant of the filtered base text items to return.
                  
          name: variantId
          in: query
        - schema:
            type: string
            enum:
              - json_icu
              - json_i18next
              - json_vue_i18n
              - ios-strings
              - ios-stringsdict
              - android
            description: Output format for exported components.
          required: true
          description: Output format for exported components.
          name: format
          in: query
      responses:
        '200':
          description: >-
            Returns components matching the filter criteria in the provided
            format
          content:
            application/json:
              schema:
                type: object
                description: >-
                  For `json_icu`, `json_i18next`, `json_vue_i18n` formats.
                  Object keys are developer-ids (strings) and values are text
                  (strings).
                additionalProperties:
                  type: string
                  description: The text value for the developer-id key
                example:
                  component-item-dev-id: <em>Some other</em> text
                  component-item-dev-id-2: Some <strong>base</strong> text
            text/plain:
              schema:
                type: string
                description: For iOS .strings format
                example: '"component-dev-id-continue" = "Continue";'
            text/xml:
              schema:
                type: string
                description: For Android .xml and iOS .stringsdict formats
                example: >-
                  <string name="continue-dev-id"
                  ditto_api_id="continue-dev-id">Continue</string>
        '400':
          description: >-
            Error for when variantId is not found, format is incorrect, or one
            or more filters are invalid
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message indicating incorrect parameters
                  details:
                    type: object
                    description: Optional additional error details
                required:
                  - message
              example:
                message: Variant with id "<variantId>" not found
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````