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

# Publish a version

> Commits the draft. On the live version callers hear it on their next call, and the previous commit moves to history. With no draft nothing changes (warning `nothing_to_publish`).



## OpenAPI

````yaml /api-reference/openapi.json post /agents/{id}/versions/{vid}/publish
openapi: 3.0.0
info:
  contact: {}
  description: >-
    Public REST API for Brilo. Authenticate by sending your API key as a Bearer
    token in the `Authorization` header.
  title: Brilo API
  version: '2025-03-02'
servers:
  - description: Production
    url: https://api.brilo.ai/v1
security: []
tags: []
paths:
  /agents/{id}/versions/{vid}/publish:
    post:
      tags:
        - Agents (public)
      summary: Publish a version
      description: >-
        Commits the draft. On the live version callers hear it on their next
        call, and the previous commit moves to history. With no draft nothing
        changes (warning `nothing_to_publish`).
      operationId: publishAgentVersion
      parameters:
        - description: Agent id (UUID).
          in: path
          name: id
          required: true
          schema:
            type: string
        - description: Version id (UUID).
          in: path
          name: vid
          required: true
          schema:
            type: string
        - description: >-
            Optional. A retry with the same key and body returns the first
            response instead of doing the work twice.
          in: header
          name: Idempotency-Key
          required: false
          schema:
            type: string
        - description: >-
            The revision from your last read or write. If the object changed
            since, you get 409 stale_revision with the current object.
          in: header
          name: If-Match
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  agent_id:
                    type: string
                  changed_fields:
                    items:
                      type: string
                    type: array
                  created_at:
                    type: string
                  description:
                    nullable: true
                    type: string
                  draft:
                    additionalProperties: false
                    nullable: true
                    properties:
                      config:
                        additionalProperties: false
                        properties:
                          call_handling:
                            additionalProperties: false
                            properties:
                              greeting_interruptible:
                                type: boolean
                              idle_reminder:
                                additionalProperties: false
                                properties:
                                  after_seconds:
                                    maximum: 9007199254740991
                                    minimum: -9007199254740991
                                    nullable: true
                                    type: integer
                                  enabled:
                                    type: boolean
                                  message:
                                    nullable: true
                                    type: string
                                required:
                                  - enabled
                                  - after_seconds
                                  - message
                                type: object
                              max_duration_seconds:
                                maximum: 9007199254740991
                                minimum: -9007199254740991
                                type: integer
                              silence_timeout_seconds:
                                maximum: 9007199254740991
                                minimum: -9007199254740991
                                nullable: true
                                type: integer
                            required:
                              - max_duration_seconds
                              - silence_timeout_seconds
                              - idle_reminder
                              - greeting_interruptible
                            type: object
                          greeting:
                            nullable: true
                            type: string
                          instructions:
                            nullable: true
                            type: string
                          languages:
                            items:
                              type: string
                            type: array
                          model:
                            additionalProperties: false
                            properties:
                              id:
                                nullable: true
                                type: string
                            required:
                              - id
                            type: object
                          recording:
                            additionalProperties: false
                            properties:
                              consent:
                                additionalProperties: false
                                properties:
                                  prompt:
                                    nullable: true
                                    type: string
                                  type:
                                    type: string
                                required:
                                  - type
                                  - prompt
                                type: object
                              enabled:
                                type: boolean
                              transcript_enabled:
                                type: boolean
                            required:
                              - enabled
                              - consent
                              - transcript_enabled
                            type: object
                          timezone:
                            nullable: true
                            type: string
                          transcriber:
                            additionalProperties: false
                            properties:
                              id:
                                nullable: true
                                type: string
                            required:
                              - id
                            type: object
                          voice:
                            additionalProperties: false
                            properties:
                              id:
                                nullable: true
                                type: string
                              speaking_rate:
                                type: number
                            required:
                              - id
                              - speaking_rate
                            type: object
                          voicemail:
                            additionalProperties: false
                            properties:
                              behavior:
                                nullable: true
                                type: string
                              message:
                                nullable: true
                                type: string
                            required:
                              - behavior
                              - message
                            type: object
                        required:
                          - greeting
                          - instructions
                          - voice
                          - model
                          - transcriber
                          - languages
                          - timezone
                          - call_handling
                          - voicemail
                          - recording
                        type: object
                      id:
                        type: string
                      updated_at:
                        type: string
                    required:
                      - id
                      - config
                      - updated_at
                    type: object
                  draft_pending:
                    type: boolean
                  head_commit:
                    additionalProperties: false
                    nullable: true
                    properties:
                      committed_at:
                        nullable: true
                        type: string
                      config:
                        additionalProperties: false
                        properties:
                          call_handling:
                            additionalProperties: false
                            properties:
                              greeting_interruptible:
                                type: boolean
                              idle_reminder:
                                additionalProperties: false
                                properties:
                                  after_seconds:
                                    maximum: 9007199254740991
                                    minimum: -9007199254740991
                                    nullable: true
                                    type: integer
                                  enabled:
                                    type: boolean
                                  message:
                                    nullable: true
                                    type: string
                                required:
                                  - enabled
                                  - after_seconds
                                  - message
                                type: object
                              max_duration_seconds:
                                maximum: 9007199254740991
                                minimum: -9007199254740991
                                type: integer
                              silence_timeout_seconds:
                                maximum: 9007199254740991
                                minimum: -9007199254740991
                                nullable: true
                                type: integer
                            required:
                              - max_duration_seconds
                              - silence_timeout_seconds
                              - idle_reminder
                              - greeting_interruptible
                            type: object
                          greeting:
                            nullable: true
                            type: string
                          instructions:
                            nullable: true
                            type: string
                          languages:
                            items:
                              type: string
                            type: array
                          model:
                            additionalProperties: false
                            properties:
                              id:
                                nullable: true
                                type: string
                            required:
                              - id
                            type: object
                          recording:
                            additionalProperties: false
                            properties:
                              consent:
                                additionalProperties: false
                                properties:
                                  prompt:
                                    nullable: true
                                    type: string
                                  type:
                                    type: string
                                required:
                                  - type
                                  - prompt
                                type: object
                              enabled:
                                type: boolean
                              transcript_enabled:
                                type: boolean
                            required:
                              - enabled
                              - consent
                              - transcript_enabled
                            type: object
                          timezone:
                            nullable: true
                            type: string
                          transcriber:
                            additionalProperties: false
                            properties:
                              id:
                                nullable: true
                                type: string
                            required:
                              - id
                            type: object
                          voice:
                            additionalProperties: false
                            properties:
                              id:
                                nullable: true
                                type: string
                              speaking_rate:
                                type: number
                            required:
                              - id
                              - speaking_rate
                            type: object
                          voicemail:
                            additionalProperties: false
                            properties:
                              behavior:
                                nullable: true
                                type: string
                              message:
                                nullable: true
                                type: string
                            required:
                              - behavior
                              - message
                            type: object
                        required:
                          - greeting
                          - instructions
                          - voice
                          - model
                          - transcriber
                          - languages
                          - timezone
                          - call_handling
                          - voicemail
                          - recording
                        type: object
                      id:
                        type: string
                      made_live_at:
                        nullable: true
                        type: string
                      status:
                        enum:
                          - live
                          - published
                          - history
                        type: string
                    required:
                      - id
                      - status
                      - committed_at
                      - made_live_at
                      - config
                    type: object
                  id:
                    type: string
                  is_live:
                    type: boolean
                  name:
                    type: string
                  next_action:
                    additionalProperties: false
                    properties:
                      body:
                        additionalProperties: {}
                        type: object
                      method:
                        type: string
                      path:
                        type: string
                      tool:
                        type: string
                    required:
                      - tool
                      - method
                      - path
                    type: object
                  revision:
                    nullable: true
                    type: string
                  status:
                    type: string
                  try_it:
                    additionalProperties: false
                    description: >-
                      Ways to hear the live agent now. Left out when nothing is
                      callable.
                    properties:
                      phone_numbers:
                        items:
                          type: string
                        type: array
                      ring_me:
                        additionalProperties: false
                        properties:
                          ask_owner_first:
                            type: string
                          body:
                            additionalProperties: false
                            properties:
                              agent_id:
                                type: string
                              to:
                                type: string
                            required:
                              - agent_id
                              - to
                            type: object
                          method:
                            enum:
                              - POST
                            type: string
                          path:
                            enum:
                              - /v1/call
                            type: string
                          tool:
                            description: >-
                              No MCP tool places a call; use the REST route in
                              method and path.
                            enum:
                              - null
                            nullable: true
                            type: string
                          warnings:
                            items:
                              additionalProperties: false
                              properties:
                                code:
                                  type: string
                                message:
                                  type: string
                              required:
                                - code
                                - message
                              type: object
                            type: array
                        required:
                          - tool
                          - method
                          - path
                          - body
                          - ask_owner_first
                        type: object
                      web_link:
                        type: string
                      web_link_serves:
                        enum:
                          - live
                        type: string
                    required:
                      - phone_numbers
                      - ring_me
                    type: object
                  warnings:
                    items:
                      additionalProperties: false
                      properties:
                        code:
                          type: string
                        message:
                          type: string
                      required:
                        - code
                        - message
                      type: object
                    type: array
                required:
                  - id
                  - agent_id
                  - name
                  - description
                  - is_live
                  - status
                  - head_commit
                  - draft_pending
                  - revision
                  - created_at
                type: object
          description: ''
        '404':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  details:
                    additionalProperties: {}
                    type: object
                  error_code:
                    type: string
                  errors:
                    items:
                      additionalProperties: false
                      properties:
                        error_code:
                          type: string
                        field:
                          type: string
                        message:
                          type: string
                      required:
                        - field
                        - error_code
                        - message
                      type: object
                    type: array
                  hint:
                    type: string
                  message:
                    type: string
                  next_action:
                    additionalProperties: false
                    properties:
                      body:
                        additionalProperties: {}
                        type: object
                      method:
                        type: string
                      path:
                        type: string
                      tool:
                        type: string
                    required:
                      - tool
                      - method
                      - path
                    type: object
                  status:
                    maximum: 9007199254740991
                    minimum: -9007199254740991
                    type: integer
                required:
                  - status
                  - error_code
                  - message
                type: object
          description: agent_not_found, version_not_found
        '409':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  details:
                    additionalProperties: {}
                    type: object
                  error_code:
                    type: string
                  errors:
                    items:
                      additionalProperties: false
                      properties:
                        error_code:
                          type: string
                        field:
                          type: string
                        message:
                          type: string
                      required:
                        - field
                        - error_code
                        - message
                      type: object
                    type: array
                  hint:
                    type: string
                  message:
                    type: string
                  next_action:
                    additionalProperties: false
                    properties:
                      body:
                        additionalProperties: {}
                        type: object
                      method:
                        type: string
                      path:
                        type: string
                      tool:
                        type: string
                    required:
                      - tool
                      - method
                      - path
                    type: object
                  status:
                    maximum: 9007199254740991
                    minimum: -9007199254740991
                    type: integer
                required:
                  - status
                  - error_code
                  - message
                type: object
          description: stale_revision, ab_test_active, idempotency_key_in_flight
        '422':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  details:
                    additionalProperties: {}
                    type: object
                  error_code:
                    type: string
                  errors:
                    items:
                      additionalProperties: false
                      properties:
                        error_code:
                          type: string
                        field:
                          type: string
                        message:
                          type: string
                      required:
                        - field
                        - error_code
                        - message
                      type: object
                    type: array
                  hint:
                    type: string
                  message:
                    type: string
                  next_action:
                    additionalProperties: false
                    properties:
                      body:
                        additionalProperties: {}
                        type: object
                      method:
                        type: string
                      path:
                        type: string
                      tool:
                        type: string
                    required:
                      - tool
                      - method
                      - path
                    type: object
                  status:
                    maximum: 9007199254740991
                    minimum: -9007199254740991
                    type: integer
                required:
                  - status
                  - error_code
                  - message
                type: object
          description: >-
            idempotency_key_mismatch: this Idempotency-Key was used with a
            different body
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: Enter your API key (Bearer token)
      scheme: bearer
      type: http

````

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