API Calls

View as MarkdownOpen in Claude

API Calls let your agent interact with external systems during conversations — fetch customer data, book appointments, update CRMs, process payments.


API Call Types

TypeWhen It RunsUse Case
Pre-CallBefore conversation startsLoad customer context
Mid-CallDuring conversationCheck status, take action
Post-CallAfter conversation endsLog to CRM, create tickets

Configuration

FieldDescription
URLAPI endpoint
MethodGET, POST, PUT, DELETE
HeadersAuthorization, Content-Type
BodyRequest payload (JSON)
Response MappingExtract data to variables

Example

Request:

GET https://api.example.com/customers/{{caller_phone}}

Response:

1{
2 "name": "Jane Smith",
3 "tier": "premium"
4}

Use in prompt:

Hello {{customer_name}}! I see you're a {{tier}} member.

Implementation

API calls are configured differently in each agent type.