# 1. Capture lead info
curl -X POST https://api.oneinbox.ai/v1/tools \
-H "Authorization: Bearer <api_key>" \
-H "Content-Type: application/json" \
-d '{
"name": "capture_lead",
"type": "extract_information",
"description": "Extract lead qualification data once the caller has answered the qualifying questions.",
"extraction_schema": {
"fields": [
{ "name": "company_name", "type": "string", "required": true, "description": "Name of their company" },
{ "name": "team_size", "type": "string", "description": "Number of people in their team" },
{ "name": "pain_point", "type": "string", "description": "Their main challenge or pain point" }
]
}
}'
# 2. Book a demo
curl -X POST https://api.oneinbox.ai/v1/tools \
-H "Authorization: Bearer <api_key>" \
-H "Content-Type: application/json" \
-d '{
"name": "book_demo",
"type": "schedule_calendar_event",
"description": "Book a 30-minute demo when the caller agrees to a meeting.",
"calendar_config": {
"calendar_id": "primary",
"duration_minutes": 30,
"timezone": "America/New_York"
}
}'
# 3. Transfer to human
curl -X POST https://api.oneinbox.ai/v1/tools \
-H "Authorization: Bearer <api_key>" \
-H "Content-Type: application/json" \
-d '{
"name": "transfer_to_human",
"type": "transfer_call",
"description": "Transfer to a human agent when the caller asks to speak to a person.",
"transfer_to": "+15105550100"
}'
# 4. End call cleanly
curl -X POST https://api.oneinbox.ai/v1/tools \
-H "Authorization: Bearer <api_key>" \
-H "Content-Type: application/json" \
-d '{
"name": "end_call",
"type": "end_call",
"description": "End the call after the task is done or the caller says goodbye."
}'