Sync a call
Refresh a call from the calling service and retrieve its latest saved state.
Content reviewed · Maintained by Cleo Powered · Report a documentation issue · Verification basis
/v1/calls/{call_id}/syncParameters
- Name
call_id- Location
- Path · required
- Description
- The UUID returned when the call was created.
- Name
Authorization- Location
- Header · required
- Description
Bearer <API_KEY>, from the same Agent Project as the call.
| Name | Location | Description |
|---|---|---|
call_id | Path · required | The UUID returned when the call was created. |
Authorization | Header · required | Bearer <API_KEY>, from the same Agent Project as the call. |
No request body or idempotency key is needed for this operation.
Example request
For cURL, use Bash and set these variables in the same terminal. CALL_ID is the call UUID returned by create, not the idempotency key. The Python tab prompts for both inputs itself.
read -rsp "Cleo API key: " CLEO_API_KEY; echo
export CLEO_API_KEY
read -rp "Call ID returned by create: " CALL_ID
export CALL_IDcurl --fail-with-body -X POST \
"https://api.cleolabs.com/v1/calls/$CALL_ID/sync" \
-H "Authorization: Bearer $CLEO_API_KEY" \
-H "User-Agent: CleoDocs/1.0"Polling
Call this endpoint every few seconds while a call is active. The Python test script waits three seconds between requests. Refreshing also saves the latest call progress and results for the platform.
Stop when the state is completed, failed, or cancelled. On 429, wait at least the Retry-After number of seconds before another request.
A polling error does not mean the call ended. Keep its call ID and resume syncing, or request cancellation. Do not create a replacement call just because a status refresh failed.
Response
Returns 200 OK with the call object. If the call does not exist or belongs to a different Agent Project, the API returns 404 call_not_found.