> ## 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 inbound call settings

> Update inbound call settings. 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 put /api/v1/public/voice-agents/{agent_id}/inbound/config
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}/inbound/config:
    put:
      tags:
        - Voice agents
      summary: Update inbound call settings
      description: >-
        Update inbound call settings. 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: >-
        update_inbound_config_api_v1_public_voice_agents__agent_id__inbound_config_put
      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/InboundConfigUpdate'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InboundConfigOut'
          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 PUT
            'https://api.sendora.ai/api/v1/public/voice-agents/YOUR_ID/inbound/config'
            -H "X-API-Key: $SENDORA_API_KEY" -H "Content-Type: application/json"
            \
              -d '{"after_hours":{"behaviour":"example","enabled":true},"capture_leads":true,"lead_defaults":{"pipeline_stage":"example","source":"example","tags":["example"]}}'
        - label: Python
          lang: python
          source: >-
            import requests


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

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

            response = requests.put(url, headers=headers, json={'after_hours':
            {'behaviour': 'example', 'enabled': True}, 'capture_leads': True,
            'lead_defaults': {'pipeline_stage': 'example', 'source': 'example',
            'tags': ['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/inbound/config",
            {
              method: "PUT",
              headers: { 'X-API-Key': process.env.SENDORA_API_KEY, 'Content-Type': 'application/json' },
              body: JSON.stringify({"after_hours": {"behaviour": "example", "enabled": true}, "capture_leads": true, "lead_defaults": {"pipeline_stage": "example", "source": "example", "tags": ["example"]}}),
            });

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

            console.log(await response.json());
        - label: Go
          lang: go
          source: >-
            req, err := http.NewRequest("PUT",
            "https://api.sendora.ai/api/v1/public/voice-agents/YOUR_ID/inbound/config",
            bytes.NewBufferString(`{"after_hours": {"behaviour": "example",
            "enabled": true}, "capture_leads": true, "lead_defaults":
            {"pipeline_stage": "example", "source": "example", "tags":
            ["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:
    InboundConfigUpdate:
      properties:
        after_hours:
          anyOf:
            - $ref: '#/components/schemas/AfterHours'
            - type: 'null'
          description: After hours returned by the Sendora API.
        capture_leads:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Capture leads returned by the Sendora API.
          title: Capture Leads
        lead_defaults:
          anyOf:
            - $ref: '#/components/schemas/LeadDefaults'
            - type: 'null'
          description: Lead defaults returned by the Sendora API.
      required: []
      title: InboundConfigUpdate
      type: object
    InboundConfigOut:
      properties:
        after_hours:
          additionalProperties: true
          description: After hours returned by the Sendora API.
          title: After Hours
          type: object
        campaign_public_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The id of the campaign behind this inbound agent: pass it to Get
            campaign.
          title: Campaign Public Id
        capture_leads:
          description: Capture leads returned by the Sendora API.
          title: Capture Leads
          type: boolean
        direction:
          description: Direction returned by the Sendora API.
          title: Direction
          type: string
        lead_defaults:
          additionalProperties: true
          description: Lead defaults returned by the Sendora API.
          title: Lead Defaults
          type: object
      required:
        - direction
        - capture_leads
        - lead_defaults
        - after_hours
      title: InboundConfigOut
      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
    AfterHours:
      properties:
        behaviour:
          anyOf:
            - pattern: ^(queue|notify_only)$
              type: string
            - type: 'null'
          description: Behaviour returned by the Sendora API.
          title: Behaviour
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Enabled returned by the Sendora API.
          title: Enabled
      required: []
      title: AfterHours
      type: object
    LeadDefaults:
      properties:
        pipeline_stage:
          anyOf:
            - maxLength: 64
              type: string
            - type: 'null'
          description: Pipeline stage returned by the Sendora API.
          title: Pipeline Stage
        source:
          anyOf:
            - maxLength: 64
              type: string
            - type: 'null'
          description: Source returned by the Sendora API.
          title: Source
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: Tags returned by the Sendora API.
          title: Tags
      required: []
      title: LeadDefaults
      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.