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

# Update a version

> Renames the version, or writes `config` fields into its draft. With no draft, one is made from the latest commit first, with everything it holds; fields you leave out stay as they are.



## OpenAPI

````yaml /api-reference/openapi.json patch /agents/{id}/versions/{vid}
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}:
    patch:
      tags:
        - Agents (public)
      summary: Update a version
      description: >-
        Renames the version, or writes `config` fields into its draft. With no
        draft, one is made from the latest commit first, with everything it
        holds; fields you leave out stay as they are.
      operationId: updateAgentVersion
      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: >-
            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
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                config:
                  additionalProperties: false
                  description: >-
                    Goes into this version's draft, made from its latest commit
                    if there is none.
                  properties:
                    call_handling:
                      additionalProperties: false
                      properties:
                        greeting_interruptible:
                          description: Can the caller talk over the greeting.
                          type: boolean
                        idle_reminder:
                          additionalProperties: false
                          description: What the agent says when the caller goes quiet.
                          properties:
                            after_seconds:
                              maximum: 600
                              minimum: 1
                              type: integer
                            enabled:
                              type: boolean
                            message:
                              maxLength: 500
                              nullable: true
                              type: string
                          type: object
                        max_duration_seconds:
                          description: >-
                            Longest a call may run, in whole minutes as seconds.
                            0 means no limit.
                          maximum: 14400
                          minimum: 0
                          multipleOf: 60
                          type: integer
                        silence_timeout_seconds:
                          description: Hang up after this much silence.
                          maximum: 600
                          minimum: 1
                          type: integer
                      type: object
                    greeting:
                      description: >-
                        The first thing the agent says when a call connects.
                        null lets the agent open on its own.
                      maxLength: 2000
                      nullable: true
                      type: string
                    instructions:
                      description: >-
                        How the agent should behave: who it is, what it handles
                        and what it must never do.
                      maxLength: 100000
                      nullable: true
                      type: string
                    languages:
                      description: >-
                        Languages the agent speaks, main one first, for example
                        ["en", "es"].
                      items:
                        maxLength: 16
                        minLength: 2
                        type: string
                      maxItems: 10
                      minItems: 1
                      type: array
                    model:
                      additionalProperties: false
                      properties:
                        id:
                          description: Language model id.
                          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: string
                      required:
                        - id
                      type: object
                    recording:
                      additionalProperties: false
                      properties:
                        consent:
                          additionalProperties: false
                          properties:
                            prompt:
                              maxLength: 2000
                              nullable: true
                              type: string
                            type:
                              description: verbal asks the caller before recording.
                              enum:
                                - none
                                - verbal
                              type: string
                          type: object
                        enabled:
                          type: boolean
                        transcript_enabled:
                          type: boolean
                      type: object
                    timezone:
                      maxLength: 64
                      type: string
                    transcriber:
                      additionalProperties: false
                      properties:
                        id:
                          description: Speech to text model id.
                          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: string
                      required:
                        - id
                      type: object
                    voice:
                      additionalProperties: false
                      properties:
                        id:
                          description: Voice id.
                          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: string
                        speaking_rate:
                          anyOf:
                            - enum:
                                - 0.8
                              type: number
                            - enum:
                                - 1
                              type: number
                            - enum:
                                - 1.2
                              type: number
                          description: 0.8 slow, 1 normal, 1.2 fast.
                      type: object
                    voicemail:
                      additionalProperties: false
                      properties:
                        behavior:
                          enum:
                            - hang_up
                            - leave_message
                          type: string
                        message:
                          maxLength: 2000
                          nullable: true
                          type: string
                      type: object
                  type: object
                description:
                  description: A short note for people. null clears it.
                  maxLength: 2000
                  nullable: true
                  type: string
                name:
                  maxLength: 255
                  minLength: 1
                  type: string
              type: object
        required: true
      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: ''
        '400':
          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: validation_failed
        '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
      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.