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

# Publish

> Make the reviewed revision of a Help Center design live. Supply the current live revision and the latest saved revision of the selected design.

Omit `confirmed_tracking_losses` on the first call. A `422` with code `theme_tracking_confirmation_required` leaves the current version live and lists the affected features in `tracking_losses`. Values are `search_results` for submitted search results and their clicks, and `article_feedback` for helpfulness votes. After the editor explicitly accepts the losses, repeat the request for the same revisions with that exact list in `confirmed_tracking_losses`.

A `400` naming a conditional search or feedback control means the comparison could not determine whether tracking is preserved. Simplify the condition around that control in the named template, preview the draft, and publish the new revision.

Publishing checks sample pages against the site's current content in each language. A `400` with code `theme_page_check_failed` includes the page title, language (`locale`), localized preview path (`page`), template, and reason in `issue`. The reason is `missing_article_body` or `render_failed`. Correct the draft, preview that path, then publish the new revision.


## OpenAPI

````yaml post /hc/{id}/themes/publish
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/publish:
    post:
      summary: Publish a help center theme design
      description: >-
        Check sample pages in each site language and activate the reviewed
        draft. A 400 identifies a broken page or missing article body. A 422
        names live search or feedback tracking the draft would remove. Keep the
        controls or explicitly confirm those losses for the same revisions.
      operationId: publishHelpCenterTheme
      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/PublishHcThemeDesignDto'
      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:
    PublishHcThemeDesignDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/PublishHcThemeDesignDtoInput'
      type: object
      properties:
        design_id:
          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)$
        revision_id:
          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)$
        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:
        - design_id
        - 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.