Skip to main content
POST
/
call
Initiate call
curl --request POST \
  --url https://app2.freyavoice.ai/api/v2/call \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "dest": "<string>",
  "from": "<string>",
  "agentExt": "<string>",
  "gateway": "<string>",
  "phoneNumber": "<string>",
  "campaignId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "properties": {},
  "assistantId": "<string>"
}
'
{
  "success": true,
  "data": {
    "message": "<string>",
    "result": {
      "success": true,
      "callId": "<string>",
      "jobUuid": "<string>",
      "job_uuid": "<string>",
      "message": "<string>",
      "error": "<string>"
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
dest
string

Destination phone number

from
string

Caller ID phone number

agentExt
string

Optional agent extension for click-to-dial

gateway
string

FusionPBX gateway (required when agentExt is not provided)

phoneNumber
string

Customer phone number (for campaign calls)

campaignId
string<uuid>

Campaign ID (for campaign calls)

workspaceId
string<uuid>

Workspace ID

properties
object

Custom properties to pass to the agent

assistantId
string

Override campaign assistant ID

Response

Call initiated

success
enum<boolean>
required
Available options:
true,
false
data
object
required