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

# Rollback Translation

> Rollback translations to a previous version. This will replace all files with what was available at the previous version.



## OpenAPI

````yaml POST /v1/{workspace}/translation/version/{version_no}/rollback/
openapi: 3.1.1
info:
  title: SuprSend API
  description: APIs supported on suprsend platform
  version: 1.2.2
servers:
  - url: https://hub.suprsend.com
security:
  - sec0: []
  - BearerAuth: []
paths:
  /v1/{workspace}/translation/version/{version_no}/rollback/:
    post:
      summary: Rollback Translation
      description: >-
        Rollback translations to a previous version. This will replace all files
        with what was available at the previous version.
      operationId: rollback-translation
      parameters:
        - in: path
          name: workspace
          required: true
          schema:
            type: string
          description: Workspace slug (staging, production, etc.)
        - in: path
          name: version_no
          required: true
          schema:
            type: integer
          description: Version number to rollback to
          example: 1
      responses:
        '200':
          description: Details of available translation files after rollback.
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      count:
                        type: integer
                        description: Total number of translation files
                      limit:
                        type: integer
                        description: Maximum number of results per page
                      offset:
                        type: integer
                        description: >-
                          Number of results to skip in case offset is passed in
                          the request
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        filename:
                          type: string
                          description: >-
                            Name of the translation file. Should be in the
                            format of <locale>.json or
                            <namespace>.<locale>.json.
                          example: en.json
                        locale:
                          type: string
                          description: >-
                            Locale code for the translation file. This would be
                            matched with user locale code to fetch translation.
                          example: en
                        locale_name:
                          type: string
                          description: Human-readable name of the locale
                          example: English
                        namespace:
                          type: string
                          nullable: true
                          description: >-
                            Namespace for the translation file, if any.
                            Namespace can be used to group translations by
                            feature or module.
                          example: task
                        action:
                          type: string
                          description: action done in the version compared to last commit.
                          enum:
                            - added
                            - updated
                            - deleted
                            - unchanged
                          example: added
                        updated_at:
                          type: string
                          format: date-time
                          description: When the translation file was last updated
              example:
                meta:
                  count: 2
                  limit: 10
                  offset: 0
                results:
                  - filename: en.json
                    locale: en
                    locale_name: English
                    namespace: null
                    action: unchanged
                    updated_at: '2025-10-30T12:23:50.380614Z'
                  - filename: fr.json
                    locale: fr
                    locale_name: French
                    namespace: null
                    action: added
                    updated_at: '2025-10-28T07:59:43.397124Z'
        '401':
          $ref: '#/components/responses/AuthenticationError'
          description: AuthenticationFailed - Invalid service token.
        '404':
          $ref: '#/components/responses/NotFoundError'
          description: Version or workspace not found
      security:
        - ServiceTokenAuth: []
      servers:
        - url: https://management-api.suprsend.com
      x-codeSamples:
        - lang: cURL
          label: Rollback Translation
          source: >
            curl -X POST
            "https://stagingapi.suprsend.com/v1/{workspace}/translation/version/{version_no}/rollback/"
            \
              --header 'Authorization: ServiceToken <token>'
components:
  responses:
    AuthenticationError:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 401
            error_code: authentication_failed
            type: AuthenticationFailed
            message: Invalid service token.
            detail: Invalid service token.
    NotFoundError:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 404
            error_code: not_found
            type: NotFound
            message: workspace 'demo' not found
            detail: workspace 'demo' not found
  schemas:
    ErrorResponse:
      type: object
      properties:
        code:
          type: integer
          description: HTTP status code
        error_code:
          type: string
          description: Specific error code identifier
        type:
          type: string
          description: Error type classification
        message:
          type: string
          description: Human-readable error message
        detail:
          type: string
          description: Additional error details
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where <token>
        is your auth token.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API_Key
      description: >-
        Pass as `Bearer <API_KEY>`. Get API Key from SuprSend dashboard
        Developers -> API Keys section.
    ServiceTokenAuth:
      type: apiKey
      in: header
      name: ServiceToken <token>
      description: >-
        You can get Service Token from [SuprSend dashboard -> Account Settings
        -> Service
        Tokens](https://app.suprsend.com/en/account-settings/service-tokens)
        section.

````