POST
/
api
/
v1
/
custom-use-cases
/
{agentId}
/
create-phone-call
curl --request POST \
  --url https://api.fleetworks.ai/api/v1/custom-use-cases/{agentId}/create-phone-call \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "toPhone": "+15551234567"
}'
{
  "status": "success",
  "call": {
    "id": 12345,
    "fromPhone": "+15551234567",
    "toPhone": "+15559876543",
    "status": "IN_PROGRESS",
    "conversationId": 67890,
    "createdAt": "2024-03-15T14:30:00.000Z",
    "updatedAt": "2024-03-15T14:35:00.000Z"
  }
}

Authorizations

Authorization
string
header
required

An authentication token that identifies the organization associated with the event. You can reach out to FleetWorks team to request a token.

Path Parameters

agentId
string
required

Body

application/json
toPhone
string
required

Phone number to call in E.164 format. Must include country code with + prefix (e.g., +15551234567). For extensions, append ;ext= followed by the extension number (e.g., +15551234567;ext=123).

Example:

"+15551234567"

dynamicVariables
object

Dynamic variables to be injected into the prompt.

Example:
{
  "loadId": "123456",
  "pickupLocation": "Chicago, IL",
  "deliveryLocation": "New York, NY",
  "rate": "2500"
}

Response

Success

status
string
Example:

"success"

call
object

Call details for the initiated call.