> ## 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: update contact fields mid-call

> Server tool webhook called by the ElevenLabs voice agent mid-call to correct or enrich a caller's contact record — typically when the caller spells their name or gives a new email. Identifies the contact by `phone_number` within the org scoped from the tool secret; at least one of `first_name`/`last_name`/`email` must be supplied. Phone number itself is intentionally NOT updatable here (would require de-dupe + verification flow). New emails are appended to the contact's `email[]` array (preserving history) and become primary if no primary exists yet. Per ElevenLabs convention, recoverable problems (missing fields, contact not found) return HTTP 200 with `success:false` so the agent can speak the error to the caller. Authenticated via Bearer token (per-org `elevenlabsToolSecret`).



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/webhook/elevenlabs/tools/update-contact
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/update-contact:
    post:
      tags:
        - Webhooks
      summary: 'ElevenLabs tool: update contact fields mid-call'
      description: >-
        Server tool webhook called by the ElevenLabs voice agent mid-call to
        correct or enrich a caller's contact record — typically when the caller
        spells their name or gives a new email. Identifies the contact by
        `phone_number` within the org scoped from the tool secret; at least one
        of `first_name`/`last_name`/`email` must be supplied. Phone number
        itself is intentionally NOT updatable here (would require de-dupe +
        verification flow). New emails are appended to the contact's `email[]`
        array (preserving history) and become primary if no primary exists yet.
        Per ElevenLabs convention, recoverable problems (missing fields, contact
        not found) return HTTP 200 with `success:false` so the agent can speak
        the error to the caller. Authenticated via Bearer token (per-org
        `elevenlabsToolSecret`).
      operationId: post_webhook_elevenlabs_tools_update_contact
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ElevenLabsUpdateContactRequest'
      responses:
        '200':
          description: >-
            Update result. Inspect `success` to disambiguate applied update vs.
            recoverable error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ElevenLabsUpdateContactResponse'
        '401':
          description: Unauthorized — missing or invalid tool secret
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookErrorResponse'
components:
  schemas:
    ElevenLabsUpdateContactRequest:
      type: object
      description: >-
        ElevenLabs update-contact tool args. `phone_number` identifies the
        contact; at least one of `first_name`/`last_name`/`email` must be set.
        Phone numbers themselves cannot be changed via this endpoint.
      properties:
        phone_number:
          type: string
          description: Contact phone number (E.164 preferred).
        first_name:
          type: string
        last_name:
          type: string
        email:
          type: string
          format: email
          description: >-
            Appended to the contact's email[] (history preserved); becomes
            primary if none is set.
        called_id:
          type: string
          description: >-
            Twilio/Sinch called number — used by ElevenLabs to route auth
            context.
        called_number:
          type: string
          description: Alternative key for called_id.
      required:
        - phone_number
      additionalProperties: true
      example:
        phone_number: '+14165550100'
        first_name: Alex
        last_name: Morgan
        email: alex.morgan@example.com
        called_id: '+12362320246'
    ElevenLabsUpdateContactResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        updated_fields:
          type: array
          items:
            type: string
          description: >-
            Mongo field paths that were $set (e.g. `firstName`, `lastName`,
            `email`).
        error:
          type: string
          description: Present when `success` is false.
      required:
        - success
      additionalProperties: true
      example:
        success: true
        message: Contact updated
        updated_fields:
          - firstName
          - lastName
          - email
    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

````