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

# Restore

> Restore a previously published version, or pass null for the original site design. The request must identify the currently live revision.

A restore compares the reviewed version with the current live design. If it would lose search reporting or helpfulness votes, the response is `422` with code `theme_tracking_confirmation_required` and a `tracking_losses` list. After the editor explicitly accepts the losses, repeat the same restore with those values in `confirmed_tracking_losses`. Restoring tracking requires no confirmation.

Restoring a saved revision checks its templates against current content in each language. A `400` with code `theme_page_check_failed` includes the affected title, `locale`, localized preview path (`page`), template, and reason in `issue`. Repair a private draft based on that revision, preview the affected page, then publish the repaired draft. You can restore the site's original design by passing `null`.

If the response is `400` and names a conditional control, the comparison could not verify that version. You can choose another published version or publish a draft with the affected search or feedback control outside the condition.


## OpenAPI

````yaml post /hc/{id}/themes/restore
openapi: 3.1.0
info:
  title: OpenCX API
  description: >

    OpenCX is an AI-powered, all-in-one platform for customer support and
    outbound communications.


    Use this API to manage your OpenCX organization's AI agents, actions,
    conversations, contacts, and more.


    To get started, generate a new API key from the dashboard.


    ## Authentication

    All API endpoints require authentication using a Bearer token. You can
    generate an API key from your OpenCX dashboard.


    ## Rate Limiting

    API requests are rate limited to ensure fair usage. The current limits are:

    - 100 requests per minute for standard endpoints

    - 1000 requests per minute for streaming endpoints


    ## Error Handling

    The API uses standard HTTP status codes and returns detailed error messages
    in the response body.
  version: 1.0-beta
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: http://localhost:8080
    description: Development
  - url: https://api.open.cx
    description: Production
security:
  - bearerAuth: []
paths:
  /hc/{id}/themes/restore:
    post:
      summary: Restore a published theme or the original
      description: >-
        Check a previously published revision against current content and
        activate it, or restore the original design. A 422 names tracking the
        restored version would remove from the live site.
      operationId: restoreHelpCenterTheme
      parameters:
        - schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          in: path
          name: id
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RestoreHcThemeDesignDto'
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HcThemeActivationDto'
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/HcThemePageCheckFailureDto'
                  - type: object
                    properties:
                      statusCode:
                        type: number
                        enum:
                          - 400
                      message:
                        type: string
                    required:
                      - statusCode
                      - message
                    additionalProperties: {}
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HcThemeTrackingConfirmationDto'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
components:
  schemas:
    RestoreHcThemeDesignDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/RestoreHcThemeDesignDtoInput'
      type: object
      properties:
        revision_id:
          anyOf:
            - type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            - type: 'null'
          description: A previously published revision, or null for the original design.
        expected_live_revision_id:
          anyOf:
            - type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            - type: 'null'
        confirmed_tracking_losses:
          description: >-
            On explicit approval, repeat the exact tracking_losses returned by
            the 422 for the reviewed revisions. Omit on the first attempt.
          maxItems: 2
          type: array
          items:
            type: string
            enum:
              - search_results
              - article_feedback
      required:
        - revision_id
        - expected_live_revision_id
    HcThemeActivationDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/HcThemeActivationDto'
      type: object
      properties:
        live_revision_id:
          anyOf:
            - type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            - type: 'null'
      required:
        - live_revision_id
      additionalProperties: false
    HcThemePageCheckFailureDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/HcThemePageCheckFailureDto'
      type: object
      properties:
        statusCode:
          type: number
          const: 400
        code:
          type: string
          const: theme_page_check_failed
        message:
          type: string
        issue:
          type: object
          properties:
            reason:
              type: string
              enum:
                - missing_article_body
                - render_failed
            template:
              type: string
            page:
              type: string
              description: >-
                Language-prefixed path for reviewing the failed page in a
                private draft.
            locale:
              type: string
            title:
              type: string
          required:
            - reason
            - template
            - page
            - locale
            - title
          additionalProperties: false
      required:
        - statusCode
        - code
        - message
        - issue
      additionalProperties: false
    HcThemeTrackingConfirmationDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/HcThemeTrackingConfirmationDto'
      type: object
      properties:
        statusCode:
          type: number
          const: 422
        code:
          type: string
          const: theme_tracking_confirmation_required
        message:
          type: string
        tracking_losses:
          type: array
          items:
            type: string
            enum:
              - search_results
              - article_feedback
      required:
        - statusCode
        - code
        - message
        - tracking_losses
      additionalProperties: false
    ErrorDto:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.