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

# Turn an agent's inbound face on or off

> Gives one agent a separate inbound configuration. Enabling the first time deep-copies the agent into an inbound face; the face's name and project always track the parent and cannot be set independently.

Disabling is guarded: if numbers are linked or inbound campaigns are running, the request returns `409 CONFIRM_REQUIRED` with exactly what would break. Re-send with `confirm: true` to unlink those numbers and pause those campaigns.

This endpoint is rate-limited more tightly than the rest of the API.



## OpenAPI

````yaml /openapi.json patch /agent/{id}/inbound
openapi: 3.1.0
info:
  title: Vocobase API
  version: '2.0'
  description: >-
    API for managing voice AI agents, documents, and calls on the Vocobase
    platform.
servers:
  - url: https://api.vocobase.com/api/v2
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Config
    description: >-
      Read and update account configuration, webhook settings, and telephony
      credentials.
  - name: Agents
    description: Create, read, update, and delete voice AI agents.
  - name: Voices
    description: >-
      List voice tiers, available voices, and stream preview audio for agent
      configuration.
  - name: Documents
    description: Upload, manage, and delete knowledge base documents.
  - name: Agent Documents
    description: Link and unlink documents to agents for knowledge base integration.
  - name: Calls
    description: Initiate outbound calls and view call history.
  - name: Phone Numbers
    description: >-
      Import DIDs, assign agents for inbound routing, and re-sync carrier
      Application bindings.
  - name: Inbound Routing Policies
    description: >-
      Define pre-answer routing decisions for inbound calls before AI sessions
      are created.
  - name: Telephony Connections
    description: Create, list, rename, and disconnect named V2 telephony connections.
  - name: VoiceLink Management
    description: Manage VoiceLink reseller clients, DID mapping, and readiness sync.
  - name: Projects
    description: Organize agents into projects. Every agent belongs to exactly one project.
  - name: Dictionaries
    description: Speech-recognition dictionary CRUD and agent attachment.
  - name: Sessions
    description: Browser-initiated WebRTC voice sessions for in-app voice agents.
  - name: Campaigns
    description: Batch outbound calling.
  - name: Billing
    description: Balance, transactions, and usage summaries.
  - name: Custom Functions
    description: HTTP endpoints the agent can call mid-conversation.
  - name: Extraction Sets
    description: Reusable sets of post-call extraction fields.
  - name: Lifecycle Hooks
    description: Automatic pre-call and post-call integration steps.
  - name: Messaging
    description: Bring-your-own WhatsApp sending.
  - name: Integration Logs
    description: Audit trail for integration calls.
  - name: Connectors
    description: Catalog of tools an agent can be connected to.
  - name: Customers
    description: B2B2B sub-tenants and their tool connections.
  - name: Agent Tools
    description: Binding connectors and connections to an agent.
paths:
  /agent/{id}/inbound:
    patch:
      tags:
        - Agents
      summary: Turn an agent's inbound face on or off
      description: >-
        Gives one agent a separate inbound configuration. Enabling the first
        time deep-copies the agent into an inbound face; the face's name and
        project always track the parent and cannot be set independently.


        Disabling is guarded: if numbers are linked or inbound campaigns are
        running, the request returns `409 CONFIRM_REQUIRED` with exactly what
        would break. Re-send with `confirm: true` to unlink those numbers and
        pause those campaigns.


        This endpoint is rate-limited more tightly than the rest of the API.
      operationId: toggleAgentInbound
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: >-
            Agent ID. Always the parent — the face is not addressable by its own
            ID.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - enabled
              properties:
                enabled:
                  type: boolean
                confirm:
                  type: boolean
                  description: >-
                    Send `true` with `enabled: false` to accept the consequences
                    listed in a prior `409`.
            example:
              enabled: true
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    type: object
                    properties:
                      inbound:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                          created:
                            type: boolean
                            description: >-
                              `true` when this call created the face. Only
                              present when enabling.
                      unlinked_numbers:
                        type: integer
                        description: Only present when disabling.
                      paused_campaigns:
                        type: integer
                        description: Only present when disabling.
              example:
                success: true
                data:
                  inbound:
                    enabled: true
                    created: true
        '400':
          description: '`enabled` must be a boolean.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error:
                  code: VALIDATION_ERROR
                  message: enabled must be a boolean
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: >-
            Disabling would unlink numbers or pause campaigns. `details` lists
            them; re-send with `confirm: true`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    const: false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        const: CONFIRM_REQUIRED
                      message:
                        type: string
                  details:
                    type: object
                    properties:
                      linked_numbers:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                            phone_number:
                              type: string
                            friendly_name:
                              type: string
                              nullable: true
                      active_inbound_campaigns:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                            name:
                              type: string
                            type:
                              type: string
              example:
                success: false
                error:
                  code: CONFIRM_REQUIRED
                  message: >-
                    Turning inbound off will unlink the numbers below and pause
                    the campaigns below. Re-send with confirm: true.
                details:
                  linked_numbers:
                    - id: pn_1c2d3e4f-5a6b-7c8d-9e0f-1a2b3c4d5e6f
                      phone_number: '+918065480085'
                      friendly_name: Support line
                  active_inbound_campaigns: []
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          description: Inbound is switched off server-side. Retry later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error:
                  code: INBOUND_DISABLED
                  message: Inbound is currently disabled
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          const: false
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
            - message
      required:
        - success
        - error
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: UNAUTHORIZED
              message: Invalid or missing API key
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: NOT_FOUND
              message: Resource not found
    RateLimitExceeded:
      description: Per-account rate limit exceeded. Retry after a short backoff.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: RATE_LIMITED
              message: Rate limit exceeded. Retry after 60 seconds.
    InternalError:
      description: Unexpected server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: INTERNAL_ERROR
              message: An unexpected error occurred
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key in format: `rg_live_xxxx`. Pass as a Bearer token in the
        Authorization header.

````