Call a Customer

Place a call from a team member to a customer, on WhatsApp or on a phone line.

Places a call from a team member to a customer, on WhatsApp or on a phone line.

  • WHATSAPP · VOIP: the reply carries credentials. Your app joins with them within 30 seconds, then the customer's WhatsApp rings.
  • PSTN · DIRECT: no credentials. The team member's own phone rings first; when they pick up, the customer is dialled and the two are connected.

🚧

Not available yet

PSTN · VOIP and WHATSAPP · DIRECT are not available yet: 400 MODE_NOT_SUPPORTED.

Endpoint

POST https://public.doubletick.io/v1/call/person

Authentication

Include your API key in the Authorization header.

HeaderValue
Authorization<your-api-key>
Content-Typeapplication/json

📘

NOTE

If you do not have your DoubleTick API Key, you can obtain it by following this guide link.


Request Body

FieldRequiredNotes
channelyesWHATSAPP or PSTN (upper case).
modeyesVOIP or DIRECT.
fromyesYour WhatsApp business number (WHATSAPP) or your phone-line number (PSTN).
toyesThe customer. They must already be a contact in your DoubleTick account.
agentNumberyesThe team member who talks. They need permission to call from the from number.
whatsappNumberno, PSTN onlyThe WhatsApp number whose chat the call is logged in. Defaults to the one mapped to the phone line. Refused on WHATSAPP.

Example Request

A WhatsApp call:

curl -X POST https://public.doubletick.io/v1/call/person \
  -H 'Authorization: <your-api-key>' \
  -H 'Content-Type: application/json' \
  -d '{"channel": "WHATSAPP", "mode": "VOIP", "from": "<your WhatsApp number>", "to": "<customer number>", "agentNumber": "<team member number>"}'

A phone-line call:

curl -X POST https://public.doubletick.io/v1/call/person \
  -H 'Authorization: <your-api-key>' \
  -H 'Content-Type: application/json' \
  -d '{"channel": "PSTN", "mode": "DIRECT", "from": "<your phone-line number>", "to": "<customer number>", "agentNumber": "<team member number>"}'

Example Response

{
  "success": true,
  "message": "Call initiated",
  "data": { ...the call... },
  "credentials": { ...WhatsApp VOIP only... }
}

data is the call. Keep its callId for the other routes.


Error Responses

StatusreasonMessageWhen
401UNAUTHORIZEDYour organization does not have a calling license or add-on. Please contact [email protected]A WhatsApp call, and WhatsApp calling is not on your plan.
422—Your number configuration is not valid. Please contact support at [email protected]The from number is not a connected number of your organization. A number that cannot place calls gets its own message.
400CALLING_NOT_SUPPORTEDCalling is not supported on this number.WhatsApp calling is not available on the from number.
403AGENT_NOT_PERMITTEDThis team member cannot place calls from this number.The team member has no calling permission on the from number.
422 · 403—whatsappNumber is not a connected WhatsApp number of your organization · This team member does not have access to WhatsApp channel <id>PSTN: the whatsappNumber.
403FORBIDDENPSTN calling is not enabled for this organizationPSTN calling is not on your plan.
422—Customer not found, and the customer and account checksThe customer is not a contact, is blocked, has not allowed calls (WhatsApp), or a messaging-tier or wallet limit.
422—User is already on a call · A call is already being placedThe team member is on a call, or another call for them is being placed.
422—WhatsApp calls cannot be joined right nowTemporary. Retry later.
429TOO_MANY_REQUESTSPSTN channel capacity reached for this organizationAll your phone lines are busy.

Rate Limit

60 a minute per organization. A PSTN call also counts in /v1/call/agent's limit of 10 a minute.


Did this page help you?