Skip to main content
PATCH
Update the custom metadata associated with a call. This allows you to attach arbitrary data to call records for tracking, analytics, or integration with your systems.
Merge Behavior: New metadata is merged with existing metadata. To remove a field, set its value to null.

Use Cases

  • CRM Integration: Link calls to customer records, tickets, or opportunities
  • Campaign Tracking: Tag calls with campaign IDs for attribution
  • Custom Analytics: Add business-specific data for reporting
  • Outcome Tracking: Record call outcomes like “appointment_booked” or “sale_completed”

Path Parameters

Request Body

Request Example

Response

Returns the updated call object with the merged metadata.

Error Responses

404 Not Found

422 Unprocessable Entity

Examples

Python - Add Customer Info

Python - Record Call Outcome

Node.js - Campaign Attribution

Webhook Integration

A common pattern is to update call metadata from your webhook handler:

Best Practices

  1. Use Consistent Keys: Establish naming conventions for your metadata fields (e.g., customer_id vs customerId)
  2. Keep Values Simple: Store IDs and references rather than large objects. Use your own systems for detailed data.
  3. Timestamp Important Updates: Include timestamps when recording outcomes or status changes.
  4. Don’t Store Sensitive Data: Avoid storing PII, credentials, or other sensitive information in call metadata.

Notes

  • Metadata is stored as JSON and supports nested objects
  • There is no size limit enforced, but keep metadata concise
  • Metadata is included in call exports and analytics
  • Use the List Calls endpoint to filter calls by supported top-level metadata fields such as customer phone, assistant, status, dates, and call SID.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

call_id
integer
required

Body

application/json

Request model for updating call metadata.

metadata
Metadata · object
required

Response

Successful Response

Schema for call response.

call_sid
string
required
to_phone_number
string
required
customer_phone_number
string
required
id
integer
required
assistant_id
integer
required
status
string
required
call_meta
Call Meta · object | null
assistant_name
string | null
flow_name
string | null
duration
integer | null
started_at
string<date-time> | null
ended_at
string<date-time> | null
total_cost
number | null
llm_cost
number | null
tts_cost
number | null
stt_cost
number | null
telephony_cost
number | null
cost_currency
string | null