curl --request PATCH \
--url https://app.phonely.ai/api/calls/{agentId}/{callIdOrPhone} \
--header 'Content-Type: application/json' \
--header 'X-Authorization: <api-key>' \
--data '
{
"custom_call_outcome": "<string>",
"custom_call_outcome_value": 123,
"custom_call_metadata": {}
}
'{
"success": true,
"call_id": "<string>",
"agent_id": "<string>",
"phone": "<string>",
"preference": "<string>",
"updated_fields": [
"<string>"
]
}Set custom call outcome fields for a call using the public frontend API.
curl --request PATCH \
--url https://app.phonely.ai/api/calls/{agentId}/{callIdOrPhone} \
--header 'Content-Type: application/json' \
--header 'X-Authorization: <api-key>' \
--data '
{
"custom_call_outcome": "<string>",
"custom_call_outcome_value": 123,
"custom_call_metadata": {}
}
'{
"success": true,
"call_id": "<string>",
"agent_id": "<string>",
"phone": "<string>",
"preference": "<string>",
"updated_fields": [
"<string>"
]
}PATCH /api/calls/{agent_id}/{call_id}PATCH /api/calls/{agent_id}/{e164_number}?preference=first|lastX-Authorization header (for batch jobs)curl -X PATCH "https://app.phonely.ai/api/calls/agent123/call456" \
-H "X-Authorization: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"custom_call_outcome": "Sold",
"custom_call_outcome_value": 299,
"custom_call_metadata": {
"campaign": "spring_2026",
"rep_id": "12345",
"notes": "Customer was very interested"
}
}'
curl -X PATCH "https://app.phonely.ai/api/calls/agent123/+14155551234" \
-H "X-Authorization: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"custom_call_outcome": "No Sale",
"custom_call_outcome_value": 0,
"custom_call_metadata": {
"reason": "Price too high",
"follow_up": true
}
}'
curl -X PATCH "https://app.phonely.ai/api/calls/agent123/+14155551234?preference=first" \
-H "X-Authorization: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"custom_call_outcome": "Sold",
"custom_call_outcome_value": 499,
"custom_call_metadata": {
"attribution": "first_touch",
"campaign": "spring_2026"
}
}'
curl -X PATCH "https://app.phonely.ai/api/calls/agent123/call456" \
-H "X-Authorization: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"custom_call_outcome": "Follow Up Required"
}'
+14155551234). The + sign can be included directly in the URL path.first: Updates the earliest call with the given phone numberlast: Updates the most recent call (default)custom_call_outcome (string)custom_call_outcome_value (number)custom_call_metadata (object)The ID of the agent
The ID of the call or the E.164 phone number
first: first time that someone called in, last: latest call from someone
first, last