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

# Publish Agent

> Make a version live for new calls. With an empty body the current saved draft becomes the live version and is recorded as a `published` entry in the version history (who published, when). With `{ "revision": N }` an existing version becomes live without changing the draft. In `auto` publish mode every save is already live, so this only records a version. In `manual` mode calls keep using the published version until you publish again.



## OpenAPI

````yaml POST /agents/{id}/publish
openapi: 3.1.0
info:
  title: RevRing Voice AI API
  description: >-
    RevRing Voice AI platform API for managing AI voice agents, phone calls, SIP
    trunks, and analytics. Build intelligent voice applications that can handle
    inbound and outbound phone calls with AI-powered conversational agents.
  version: 1.0.0
  contact:
    name: RevRing Support
    url: https://revring.ai
servers:
  - url: https://api.revring.ai/v1
    description: Production API
security:
  - apiKeyAuth: []
tags:
  - name: Messaging Connections
    description: Connect messaging providers so agents can send text messages
  - name: Messages
    description: Send text messages and read your message log
  - name: Conversations
    description: List and clear managed conversation threads
  - name: SIP Trunks
    description: Manage SIP trunks for connecting agents to the phone network
  - name: Agents
    description: Manage AI voice agents and their configuration
  - name: Agent Folders
    description: Organize agents into folders for dashboard navigation
  - name: Calls
    description: Manage and query phone calls
  - name: Analytics
    description: Get analytics and metrics about your calls
  - name: Knowledge Bases
    description: >-
      Manage knowledge bases and sources for agent retrieval-augmented
      generation
  - name: Test Suites
    description: Manage test suites, test cases, and test runs for agent evaluation
  - name: Voices
    description: Browse the voices available to your organization for agent speech
  - name: Webhooks
    description: Webhook delivery settings for your organization
paths:
  /agents/{id}/publish:
    post:
      tags:
        - Agents
      summary: Publish Agent
      description: >-
        Make a version live for new calls. With an empty body the current saved
        draft becomes the live version and is recorded as a `published` entry in
        the version history (who published, when). With `{ "revision": N }` an
        existing version becomes live without changing the draft. In `auto`
        publish mode every save is already live, so this only records a version.
        In `manual` mode calls keep using the published version until you
        publish again.
      parameters: []
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                revision:
                  type: integer
                  minimum: 1
                  description: >-
                    Existing version to make live. Omit to publish the current
                    draft
      responses:
        '200':
          description: Live version updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      revision:
                        type: integer
                        description: Version calls now run on
                      publishMode:
                        type: string
                        enum:
                          - auto
                          - manual
                      unchanged:
                        type: boolean
                        description: >-
                          true when nothing new was written: the draft was
                          already live, or an existing version was selected
        '400':
          description: The version could not be applied
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - restore_invalid
                      - restore_failed
                  message:
                    type: string
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
components:
  responses:
    UnauthorizedError:
      description: Authentication required or API key invalid
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: unauthorized
    NotFoundError:
      description: Resource not found
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: not_found
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. Generate API keys from the RevRing
        dashboard.

````

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