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

# Update voice agent

> Update voice agent. See the request and response schemas for the complete public API contract. This operation can change workspace data or trigger an external side effect; review the request before sending it and do not retry blindly after a timeout.



## OpenAPI

````yaml /openapi.json patch /api/v1/public/voice-agents/{agent_id}
openapi: 3.1.0
info:
  description: >-
    Customer-facing API for managing outreach, leads, conversations, voice
    agents, knowledge bases, analytics, and webhooks.
  title: Sendora Public API
  version: 1.0.0
servers:
  - description: Production
    url: https://api.sendora.ai
security: []
tags:
  - description: Build, launch, pause and stop campaigns, and enroll leads.
    name: Campaigns
  - description: Create, update, tag, enrich and import leads.
    name: Leads
  - description: Group leads into reusable lists.
    name: Lead lists
  - description: Find new prospects and research existing leads.
    name: Prospecting
  - description: Read conversations and send messages to leads.
    name: Inbox
  - description: Manage workspace-wide suppressions.
    name: Do not contact
  - description: Manage the content your agents answer from.
    name: Knowledge bases
  - description: Create, configure, test and publish voice agents.
    name: Voice agents
  - description: Give agents actions such as booking, lookups and transfers.
    name: Agent tools
  - description: Embed a voice agent on your website.
    name: Voice widgets
  - description: Start voice calls and read call results.
    name: Calls
  - description: Browse and preview the voices an agent can use.
    name: Voices
  - description: List numbers, bring your own, and route calls.
    name: Phone numbers
  - description: List the channel accounts connected to the workspace.
    name: Connected accounts
  - description: Register endpoints and review deliveries.
    name: Webhooks
  - description: Drive the workspace assistant programmatically.
    name: Copilot
  - description: Read workspace and campaign performance.
    name: Analytics
  - description: Track asynchronous operations.
    name: Jobs
  - description: Manage client workspaces, plans and branding.
    name: Agency
paths:
  /api/v1/public/voice-agents/{agent_id}:
    patch:
      tags:
        - Voice agents
      summary: Update voice agent
      description: >-
        Update voice agent. See the request and response schemas for the
        complete public API contract. This operation can change workspace data
        or trigger an external side effect; review the request before sending it
        and do not retry blindly after a timeout.
      operationId: public_update_voice_agent_api_v1_public_voice_agents__agent_id__patch
      parameters:
        - description: >-
            The voice agent's id: the `id` from List voice agents. It is also
            the last part of that page's address in the app.
          in: path
          name: agent_id
          required: true
          schema:
            title: Agent Id
            type: string
        - in: header
          name: X-API-Key
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
        - in: header
          name: Authorization
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentUpdate'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicVoiceAgentOut'
          description: Successful Response
        '401':
          description: The X-API-Key header is missing, invalid, expired, or revoked.
        '402':
          description: >-
            The workspace is suspended for billing, or the request would exceed
            a plan or usage limit.
        '403':
          description: >-
            The key is valid but lacks the required scope, or the workspace has
            no active plan, lacks the entitlement, or has this feature turned
            off or view-only.
        '404':
          description: >-
            The resource does not exist or is not owned by the authenticated
            workspace.
        '410':
          description: The workspace behind this key has been deleted.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        '500':
          description: >-
            An unexpected Sendora error occurred. Retry only if the operation is
            safe to repeat.
        '503':
          description: >-
            An entitlement or billing check is temporarily unavailable. Retry
            after the Retry-After interval.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - label: cURL
          lang: bash
          source: >-
            curl -X PATCH
            'https://api.sendora.ai/api/v1/public/voice-agents/YOUR_ID' -H
            "X-API-Key: $SENDORA_API_KEY" -H "Content-Type: application/json" \
              -d '{"avatar_url":"example","avatar_video_url":"example","custom_voice_ref":"example"}'
        - label: Python
          lang: python
          source: >-
            import requests


            url = 'https://api.sendora.ai/api/v1/public/voice-agents/YOUR_ID'

            headers = {'X-API-Key': '$SENDORA_API_KEY'}

            response = requests.patch(url, headers=headers, json={'avatar_url':
            'example', 'avatar_video_url': 'example', 'custom_voice_ref':
            'example'})

            response.raise_for_status()

            print(response.json())
        - label: JavaScript
          lang: javascript
          source: >-
            const response = await
            fetch("https://api.sendora.ai/api/v1/public/voice-agents/YOUR_ID", {
              method: "PATCH",
              headers: { 'X-API-Key': process.env.SENDORA_API_KEY, 'Content-Type': 'application/json' },
              body: JSON.stringify({"avatar_url": "example", "avatar_video_url": "example", "custom_voice_ref": "example"}),
            });

            if (!response.ok) throw new Error(await response.text());

            console.log(await response.json());
        - label: Go
          lang: go
          source: >-
            req, err := http.NewRequest("PATCH",
            "https://api.sendora.ai/api/v1/public/voice-agents/YOUR_ID",
            bytes.NewBufferString(`{"avatar_url": "example", "avatar_video_url":
            "example", "custom_voice_ref": "example"}`))

            if err != nil { log.Fatal(err) }

            req.Header.Set("X-API-Key", os.Getenv("SENDORA_API_KEY"))

            req.Header.Set("Content-Type", "application/json")

            resp, err := http.DefaultClient.Do(req)

            if err != nil { log.Fatal(err) }

            defer resp.Body.Close()
components:
  schemas:
    AgentUpdate:
      properties:
        avatar_url:
          anyOf:
            - maxLength: 500
              type: string
            - type: 'null'
          description: Avatar url returned by the Sendora API.
          title: Avatar Url
        avatar_video_url:
          anyOf:
            - maxLength: 500
              type: string
            - type: 'null'
          description: Avatar video url returned by the Sendora API.
          title: Avatar Video Url
        custom_voice_ref:
          anyOf:
            - type: string
            - type: 'null'
          description: Custom voice ref returned by the Sendora API.
          title: Custom Voice Ref
        display_name:
          anyOf:
            - maxLength: 200
              type: string
            - type: 'null'
          description: Display name returned by the Sendora API.
          title: Display Name
        first_message:
          anyOf:
            - maxLength: 2000
              type: string
            - type: 'null'
          description: First message returned by the Sendora API.
          title: First Message
        first_message_delay_seconds:
          anyOf:
            - type: number
            - type: 'null'
          description: First message delay seconds returned by the Sendora API.
          title: First Message Delay Seconds
        first_speaker:
          anyOf:
            - type: string
            - type: 'null'
          description: First speaker returned by the Sendora API.
          title: First Speaker
        inactivity_messages:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          description: Inactivity messages returned by the Sendora API.
          title: Inactivity Messages
        is_active:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Is active returned by the Sendora API.
          title: Is Active
        join_timeout_seconds:
          anyOf:
            - type: integer
            - type: 'null'
          description: Join timeout seconds returned by the Sendora API.
          title: Join Timeout Seconds
        language_hint:
          anyOf:
            - maxLength: 16
              type: string
            - type: 'null'
          description: Language hint returned by the Sendora API.
          title: Language Hint
        max_duration_seconds:
          anyOf:
            - type: integer
            - type: 'null'
          description: Max duration seconds returned by the Sendora API.
          title: Max Duration Seconds
        model:
          anyOf:
            - type: string
            - type: 'null'
          description: Model returned by the Sendora API.
          title: Model
        name:
          anyOf:
            - maxLength: 200
              type: string
            - type: 'null'
          description: Name returned by the Sendora API.
          title: Name
        output_medium:
          anyOf:
            - type: string
            - type: 'null'
          description: Output medium returned by the Sendora API.
          title: Output Medium
        recording_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Recording enabled returned by the Sendora API.
          title: Recording Enabled
        system_prompt:
          anyOf:
            - maxLength: 20000
              type: string
            - type: 'null'
          description: System prompt returned by the Sendora API.
          title: System Prompt
        temperature:
          anyOf:
            - type: number
            - type: 'null'
          description: Temperature returned by the Sendora API.
          title: Temperature
        time_exceeded_message:
          anyOf:
            - type: string
            - type: 'null'
          description: Time exceeded message returned by the Sendora API.
          title: Time Exceeded Message
        tools:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          description: Tools returned by the Sendora API.
          title: Tools
        uninterruptible:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Uninterruptible returned by the Sendora API.
          title: Uninterruptible
        voice_asset_id:
          anyOf:
            - maxLength: 160
              type: string
            - type: 'null'
          description: >-
            The voice to use: the `asset_id` of a voice in List agent voice
            choices.
          title: Voice Asset Id
        voice_id:
          anyOf:
            - maxLength: 128
              type: string
            - type: 'null'
          description: 'A voice''s id: the `id` from List available voices.'
          title: Voice Id
        voice_model:
          anyOf:
            - type: string
            - type: 'null'
          description: Voice model returned by the Sendora API.
          title: Voice Model
        voice_speed:
          anyOf:
            - type: number
            - type: 'null'
          description: Voice speed returned by the Sendora API.
          title: Voice Speed
        voicemail_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Voicemail enabled returned by the Sendora API.
          title: Voicemail Enabled
        voicemail_script:
          anyOf:
            - maxLength: 600
              type: string
            - type: 'null'
          description: Voicemail script returned by the Sendora API.
          title: Voicemail Script
      required: []
      title: AgentUpdate
      type: object
    PublicVoiceAgentOut:
      description: >-
        Deliberately minimal public representation of a voice agent.


        The authenticated operator API returns the full configuration, but
        public

        API keys must not receive system prompts, tool definitions, tenant IDs,
        or

        connected service resource identifiers as an incidental side effect of
        listing an

        agent. Configuration is accepted on write requests but is never echoed.
      properties:
        created_at:
          description: Created at returned by the Sendora API.
          format: date-time
          title: Created At
          type: string
        direction:
          default: outbound
          description: Direction returned by the Sendora API.
          title: Direction
          type: string
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          description: Display name returned by the Sendora API.
          title: Display Name
        first_message:
          default: ''
          description: First message returned by the Sendora API.
          title: First Message
          type: string
        id:
          description: The voice agent's id. Pass it to any endpoint that takes `agent_id`.
          title: Id
          type: string
        is_active:
          default: false
          description: Is active returned by the Sendora API.
          title: Is Active
          type: boolean
        name:
          description: Name returned by the Sendora API.
          title: Name
          type: string
        ready:
          default: false
          description: Ready returned by the Sendora API.
          title: Ready
          type: boolean
        updated_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Updated at returned by the Sendora API.
          title: Updated At
      required:
        - id
        - name
        - created_at
      title: PublicVoiceAgentOut
      type: object
    HTTPValidationError:
      properties:
        detail:
          description: Detail returned by the Sendora API.
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      required: []
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          description: Loc returned by the Sendora API.
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          description: Msg returned by the Sendora API.
          title: Message
          type: string
        type:
          description: Type returned by the Sendora API.
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    ApiKeyAuth:
      description: Customer API key created in the Sendora dashboard.
      in: header
      name: X-API-Key
      type: apiKey

````

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