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

# Publish an assistant version

> Choose the version calls run. `version: "draft"` publishes your saved edits. A number points calls back at a version you published before, which is how you roll back. Neither touches the draft. Until the first publish every save goes live at once. After it, saves change the draft only, so publish again to put them on calls. Publishing what `prod` already runs changes nothing and still returns 200. See [Versions](/voice-agents/assistants/versions).



## OpenAPI

````yaml /voice-agents/api-reference/openapi.yaml post /realtime-assistants/{realtimeAssistantId}/publish
openapi: 3.1.0
info:
  title: UpliftAI Voice Agents API
  version: '1.0'
  description: >-
    Build voice assistants, start conversations on the web or the phone, run
    calling campaigns, and receive outcomes by webhook. All endpoints take a
    bearer API key unless noted otherwise.
servers:
  - url: https://api.upliftai.org/v1
security:
  - apiKey: []
tags:
  - name: Assistants
  - name: Authoring an assistant
  - name: Starting a conversation
  - name: Sessions & call records
  - name: Campaigns
  - name: Campaign outcomes
  - name: Contacts
  - name: Google Sheet sources
  - name: Integrations & delivery health
paths:
  /realtime-assistants/{realtimeAssistantId}/publish:
    post:
      tags:
        - Assistants
      summary: Publish an assistant version
      description: >-
        Choose the version calls run. `version: "draft"` publishes your saved
        edits. A number points calls back at a version you published before,
        which is how you roll back. Neither touches the draft. Until the first
        publish every save goes live at once. After it, saves change the draft
        only, so publish again to put them on calls. Publishing what `prod`
        already runs changes nothing and still returns 200. See
        [Versions](/voice-agents/assistants/versions).
      operationId: publishRealtimeAssistant
      parameters:
        - name: realtimeAssistantId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          example: 0f4a91d3-xxxx-xxxx-xxxx-xxxxxxxxxxxx
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublishAssistantRequest'
            examples:
              firstPublish:
                summary: Put the saved draft on calls
                value:
                  version: draft
                  message: Fee schedule for the October intake
              rollback:
                summary: Point calls back at an earlier version
                value:
                  version: 11
      responses:
        '200':
          description: Where `draft` and `prod` point now.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssistantPublishState'
              examples:
                firstPublish:
                  summary: The draft is now what calls run
                  value:
                    realtimeAssistantId: 0f4a91d3-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                    name: Edversity admissions follow-up
                    description: Calls warm leads about the cybersecurity programme
                    aliases:
                      draft:
                        version: 14
                        updatedAt: '2026-08-18T10:02:47.883Z'
                        updatedBy: d9164fbd-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                      prod:
                        version: 14
                        updatedAt: '2026-08-18T10:05:12.406Z'
                        updatedBy: d9164fbd-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                rollback:
                  summary: Calls run version 11 again, the draft stays at 14
                  value:
                    realtimeAssistantId: 0f4a91d3-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                    name: Edversity admissions follow-up
                    description: Calls warm leads about the cybersecurity programme
                    aliases:
                      draft:
                        version: 14
                        updatedAt: '2026-08-18T10:02:47.883Z'
                        updatedBy: d9164fbd-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                      prod:
                        version: 11
                        updatedAt: '2026-08-18T11:40:09.018Z'
                        updatedBy: d9164fbd-xxxx-xxxx-xxxx-xxxxxxxxxxxx
        '400':
          description: >-
            `version` is missing, `prod`, or a number sent as a string. Nothing
            was published.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                publishProd:
                  summary: '`prod` is where you publish to, not something to publish'
                  value:
                    message:
                      - version must be 'draft' or a published version number
                    error: Bad Request
                    statusCode: 400
                quotedNumber:
                  summary: The version sent as "11" instead of 11
                  value:
                    message:
                      - version must be 'draft' or a published version number
                    error: Bad Request
                    statusCode: 400
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: >-
            No such assistant in the API key's project, or no such published
            version to roll back to.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                unknownAssistant:
                  summary: No assistant with that id
                  value:
                    message: >-
                      Realtime assistant not found:
                      00000000-0000-4000-8000-000000000000
                    error: Not Found
                    statusCode: 404
                neverPublished:
                  summary: Rolling back to a number that was never published
                  value:
                    message: >-
                      Version 9 of realtime assistant
                      0f4a91d3-xxxx-xxxx-xxxx-xxxxxxxxxxxx was never published
                    error: Not Found
                    statusCode: 404
        '409':
          description: >-
            Nothing was published. Read the assistant again if a save landed,
            then retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                beingModified:
                  summary: A save, build or other publish holds the assistant
                  value:
                    message: >-
                      The realtime assistant is being modified, try again
                      shortly
                    error: Conflict
                    statusCode: 409
                changedMidPublish:
                  summary: A save or another publish landed while this one ran
                  value:
                    message: >-
                      The realtime assistant changed while it was being
                      published
                    error: Conflict
                    statusCode: 409
components:
  schemas:
    PublishAssistantRequest:
      type: object
      properties:
        version:
          oneOf:
            - type: string
              const: draft
            - type: integer
              minimum: 1
          description: >-
            `draft` publishes the saved draft under its current `version`
            number. A number rolls back to a version published before. Send it
            as a JSON number, not a string. `prod` is a 400.
        message:
          type: string
          maxLength: 280
          description: >-
            A note for the versions list, like a commit message. Kept once, when
            the version is first published. A rollback's message is not stored.
      required:
        - version
    AssistantPublishState:
      type: object
      properties:
        realtimeAssistantId:
          type: string
          format: uuid
        name:
          type: string
          description: The draft's name.
        description:
          type: string
        aliases:
          $ref: '#/components/schemas/AssistantAliases'
    Error:
      type: object
      properties:
        message:
          description: >-
            One message per failed field for validation errors, a single string
            otherwise.
          oneOf:
            - type: string
            - type: array
              items:
                type: string
        error:
          type: string
        statusCode:
          type: integer
    AssistantAliases:
      type: object
      properties:
        draft:
          allOf:
            - $ref: '#/components/schemas/AssistantAlias'
          description: The copy you edit. Every save moves it.
        prod:
          allOf:
            - $ref: '#/components/schemas/AssistantAlias'
          description: >-
            What calls run by default. Absent until the first publish, and until
            then calls run the draft.
      required:
        - draft
    AssistantAlias:
      type: object
      description: Where an alias points, and who last moved it.
      properties:
        version:
          type: integer
          minimum: 1
        updatedAt:
          type: string
          format: date-time
        updatedBy:
          type: string
          description: The API key or portal user that saved or published.
  responses:
    Unauthorized:
      description: A bearer key was sent but is not recognized.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: invalid authorization
            error: Unauthorized
            statusCode: 401
    Forbidden:
      description: No API key sent, or the key lacks permission for this resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: Forbidden resource
            error: Forbidden
            statusCode: 403
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: Project API key (`sk_api_…`).

````