Calls

Record an outbound SDK call (browser to phone)

POST
/api/calls/sdk/initiate

Persists a Call record (and conversation, if a contact is resolved) for a browser-initiated outbound call placed via the active voice provider's SDK. Either contactId or phoneNumber must be provided; if both are absent the request is rejected. Emits the call_initiated socket event to the calling user only, plus an org-wide call_activity refresh event (contactId/conversationId only) when a contact is resolved.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

At least one of contactId or phoneNumber must be provided.

At least one of contactId or phoneNumber must be provided.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/api/calls/sdk/initiate" \  -H "Content-Type: application/json" \  -d '{    "contactId": "64f0a1b2c3d4e5f6a7b8c9d0",    "phoneNumber": "+14165550199"  }'
{  "success": true,  "call": {    "_id": "64f0a1b2c3d4e5f6a7b8cb00",    "callId": "64f0a1b2c3d4e5f6a7b8cb00",    "provider": "sinch",    "direction": "outbound",    "status": "initiated",    "from": "+14165550100",    "to": "+14165550199"  },  "message": "Call recorded"}