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

> Replace the whole help center content tree in one call, deleting anything you omit. Use when your articles live in git or a CMS and you push every change.

# Sync help center content

<Warning>
  This is a full replace, not an upsert. Every category or article that exists in the help center but is missing from the tree you send is **permanently deleted**, together with its version history and AI knowledge. There is no dry run, confirmation, or rollback. Always send the complete intended tree; use [Export content](./export) to fetch the current one first.
</Warning>

## What is atomic

Structural changes (categories, articles, publish state, deletions) are applied in a single database transaction: either the whole tree is reconciled or nothing changes. Synced articles are published as part of that transaction.

AI knowledge updates and translations run **after** the commit. If one of them fails, the structural change is kept and the failure is reported as an error event in the SSE stream. The plain JSON response only returns change counts, so send `Accept: text/event-stream` when you need to know about these failures. Re-run the sync, or retranslate the affected article, to retry.


## OpenAPI

````yaml post /hc/{id}/sync
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}/sync:
    post:
      summary: Sync help center content
      description: >-
        Replace the help center content tree with the provided tree. Diffs and
        applies changes atomically. Supports SSE streaming via Accept:
        text/event-stream.
      operationId: syncHelpCenterContent
      parameters:
        - schema:
            type: string
          in: path
          name: id
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SyncContentTreeDto'
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SyncResultDto'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
components:
  schemas:
    SyncContentTreeDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/SyncContentTreeDtoInput'
      type: object
      properties:
        categories:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              slug:
                type: string
              description:
                anyOf:
                  - type: string
                  - type: 'null'
              icon:
                anyOf:
                  - type: string
                  - type: 'null'
              articles:
                type: array
                items:
                  type: object
                  properties:
                    title:
                      type: string
                    slug:
                      type: string
                    content_markdown:
                      anyOf:
                        - type: string
                        - type: 'null'
                    meta_title:
                      anyOf:
                        - type: string
                        - type: 'null'
                    meta_description:
                      anyOf:
                        - type: string
                        - type: 'null'
                  required:
                    - title
                    - slug
              categories:
                type: array
                items:
                  type: object
                  properties:
                    name:
                      type: string
                    slug:
                      type: string
                    description:
                      anyOf:
                        - type: string
                        - type: 'null'
                    icon:
                      anyOf:
                        - type: string
                        - type: 'null'
                    articles:
                      type: array
                      items:
                        type: object
                        properties:
                          title:
                            type: string
                          slug:
                            type: string
                          content_markdown:
                            anyOf:
                              - type: string
                              - type: 'null'
                          meta_title:
                            anyOf:
                              - type: string
                              - type: 'null'
                          meta_description:
                            anyOf:
                              - type: string
                              - type: 'null'
                        required:
                          - title
                          - slug
                    categories:
                      type: array
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                          slug:
                            type: string
                          description:
                            anyOf:
                              - type: string
                              - type: 'null'
                          icon:
                            anyOf:
                              - type: string
                              - type: 'null'
                          articles:
                            type: array
                            items:
                              type: object
                              properties:
                                title:
                                  type: string
                                slug:
                                  type: string
                                content_markdown:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                meta_title:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                meta_description:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                              required:
                                - title
                                - slug
                          categories:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                slug:
                                  type: string
                                description:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                icon:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                articles:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      title:
                                        type: string
                                      slug:
                                        type: string
                                      content_markdown:
                                        anyOf:
                                          - type: string
                                          - type: 'null'
                                      meta_title:
                                        anyOf:
                                          - type: string
                                          - type: 'null'
                                      meta_description:
                                        anyOf:
                                          - type: string
                                          - type: 'null'
                                    required:
                                      - title
                                      - slug
                                categories:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      name:
                                        type: string
                                      slug:
                                        type: string
                                      description:
                                        anyOf:
                                          - type: string
                                          - type: 'null'
                                      icon:
                                        anyOf:
                                          - type: string
                                          - type: 'null'
                                      articles:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            title:
                                              type: string
                                            slug:
                                              type: string
                                            content_markdown:
                                              anyOf:
                                                - type: string
                                                - type: 'null'
                                            meta_title:
                                              anyOf:
                                                - type: string
                                                - type: 'null'
                                            meta_description:
                                              anyOf:
                                                - type: string
                                                - type: 'null'
                                          required:
                                            - title
                                            - slug
                                      categories:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            name:
                                              type: string
                                            slug:
                                              type: string
                                            description:
                                              anyOf:
                                                - type: string
                                                - type: 'null'
                                            icon:
                                              anyOf:
                                                - type: string
                                                - type: 'null'
                                            articles:
                                              type: array
                                              items:
                                                type: object
                                                properties:
                                                  title:
                                                    type: string
                                                  slug:
                                                    type: string
                                                  content_markdown:
                                                    anyOf:
                                                      - type: string
                                                      - type: 'null'
                                                  meta_title:
                                                    anyOf:
                                                      - type: string
                                                      - type: 'null'
                                                  meta_description:
                                                    anyOf:
                                                      - type: string
                                                      - type: 'null'
                                                required:
                                                  - title
                                                  - slug
                                          required:
                                            - name
                                            - slug
                                            - articles
                                    required:
                                      - name
                                      - slug
                                      - articles
                              required:
                                - name
                                - slug
                                - articles
                        required:
                          - name
                          - slug
                          - articles
                  required:
                    - name
                    - slug
                    - articles
            required:
              - name
              - slug
              - articles
        openapi_spec:
          type: string
      required:
        - categories
    SyncResultDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/SyncResultDto'
      type: object
      properties:
        changes:
          type: object
          properties:
            categories:
              type: object
              properties:
                added:
                  type: number
                modified:
                  type: number
                removed:
                  type: number
              required:
                - added
                - modified
                - removed
              additionalProperties: false
            articles:
              type: object
              properties:
                added:
                  type: number
                modified:
                  type: number
                removed:
                  type: number
              required:
                - added
                - modified
                - removed
              additionalProperties: false
          required:
            - categories
            - articles
          additionalProperties: false
      required:
        - changes
      additionalProperties: false
    ErrorDto:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````