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

# ElevenLabs tool: check human agent availability

> Server tool webhook called by the ElevenLabs voice agent mid-call to check whether any human agents in the organization are currently online and chat-available. Authenticated via Bearer token (per-org `elevenlabsToolSecret`).



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/webhook/elevenlabs/tools/check-availability
openapi: 3.0.3
info:
  title: Tether Relay and Tether API
  version: 1.0.0
  description: >-
    Route-derived OpenAPI contract generated from tether-relay backend sources.
    Regenerate with scripts/sync-openapi-from-backend.mjs.
servers:
  - url: https://your-instance.example.com
    description: Production
  - url: http://localhost:2212
    description: Local API service
security: []
tags:
  - name: AI
  - name: Applications
  - name: Approval
  - name: Auth
  - name: Automations
  - name: Calls
  - name: Campaigns
  - name: Contact Analytics
  - name: Contact Metrics
  - name: Contact Notes
  - name: Contacts
  - name: Conversation Monitor
  - name: Conversations
  - name: Departments
  - name: Email
  - name: Escalation Dashboard
  - name: Event Logs
  - name: Google Sheets
  - name: Marketplace
  - name: Messages
  - name: Notification Sounds
  - name: Notifications
  - name: Org Snapshots
  - name: Organizations
  - name: Outreach
  - name: Outreach Metrics
  - name: Outreach Sources
  - name: Pipelines
  - name: Processes
  - name: Prompts
  - name: Reminders
  - name: Sms
  - name: Templates
  - name: Traces
  - name: Training
  - name: Upload
  - name: User Snapshots
  - name: Users
  - name: Vertical
  - name: Webchats
  - name: Webhook
paths:
  /api/webhook/elevenlabs/tools/check-availability:
    post:
      tags:
        - Webhooks
      summary: 'ElevenLabs tool: check human agent availability'
      description: >-
        Server tool webhook called by the ElevenLabs voice agent mid-call to
        check whether any human agents in the organization are currently online
        and chat-available. Authenticated via Bearer token (per-org
        `elevenlabsToolSecret`).
      operationId: post_webhook_elevenlabs_tools_check_availability
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ElevenLabsToolCallRequest'
      responses:
        '200':
          description: Agent availability
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ElevenLabsCheckAvailabilityResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookErrorResponse'
components:
  schemas:
    ElevenLabsToolCallRequest:
      type: object
      description: >-
        Common shape ElevenLabs uses to invoke a server tool mid-call.
        `called_id`/`called_number` lets the handler resolve the user inside the
        calling org.
      properties:
        conversation_id:
          type: string
          description: >-
            ElevenLabs conversation id; used to correlate with the cached
            personalization context.
        agent_id:
          type: string
          description: ElevenLabs agent id that is invoking the tool.
        caller_id:
          type: string
          description: External caller phone number.
        called_id:
          type: string
          description: >-
            Tether AI-enabled number that was called; used to resolve owning
            org/user.
        called_number:
          type: string
          description: >-
            Alternate key for `called_id` (older ElevenLabs payloads use this
            name).
      additionalProperties: true
      example:
        conversation_id: conv_8f3d1b9c2e7a4f0b9a4d2c1e6e2f8c01
        agent_id: agent_a8d3c4e09b2f4e1ab3c45f6a7b8c9d01
        caller_id: '+14165550100'
        called_id: '+12362320246'
        called_number: '+12362320246'
    ElevenLabsCheckAvailabilityResponse:
      type: object
      properties:
        agents_available:
          type: boolean
        available_count:
          type: integer
        online_count:
          type: integer
      required:
        - agents_available
      additionalProperties: true
      example:
        agents_available: true
        available_count: 2
        online_count: 4
    WebhookErrorResponse:
      type: object
      description: >-
        Error envelope used across provider webhook routes. Most failures only
        carry `error`; a few (ElevenLabs tool errors, ingress validation) add
        `success:false`, `message`, or a `code`. Many of these endpoints respond
        200 with `success:false` for recoverable cases (especially the
        ElevenLabs server tools) — only hard failures use 4xx/5xx.
      properties:
        error:
          type: string
        message:
          type: string
        success:
          type: boolean
          enum:
            - false
        code:
          type: string
        details:
          description: Optional diagnostic detail (stack snippet, validation issues, etc.).
      additionalProperties: true
      example:
        error: Webhook processing failed

````