Answer a Call

Answer a WhatsApp call ringing for the team member.

Answers a WhatsApp call ringing for the team member. The reply carries credentials: join with them within 30 seconds (see Joining a VOIP call in the Overview).

Endpoint

POST https://public.doubletick.io/v1/call/person/{callId}/accept

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
agentNumberyesThe team member, by the phone number on their DoubleTick profile.
modenoVOIP, the default and the only one available. DIRECT is refused with 400 MODE_NOT_SUPPORTED.

Example Request

curl -X POST https://public.doubletick.io/v1/call/person/{callId}/accept \
  -H 'Authorization: <your-api-key>' \
  -H 'Content-Type: application/json' \
  -d '{ "agentNumber": "<team member number>" }'

Example Response

{
  "success": true,
  "message": "Call accepted",
  "data": { ...the call... },
  "credentials": { ...join details... }
}

Things to Know

  • Works while the call rings: ringExpiresAt on the call says until when (60 seconds from the first ring).
  • If two team members accept, the first wins; the other gets 409 Someone else took this call.
  • A team member already on a call cannot accept another one.
  • Incoming phone (PSTN) calls are answered on the team member's phone, not here.

Error Responses

Besides the errors on every route (see Errors in the Overview):

StatusreasonMessageWhen
404NOT_FOUNDCall not foundNo such team-member call in your organization.
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.
400ANSWERED_ON_PHONEThis call is on the agent's phone: answer, decline or rejoin it there.A PSTN call.
400CALLING_NOT_SUPPORTEDCalling is not supported on this number.The call's number no longer supports API calling.
403AGENT_NOT_PERMITTEDThis team member cannot answer this call.The team member has no access to the call's chat.
403FORBIDDENThis call did not ring for youThe call did not ring this team member.
409CONFLICTThe call is no longer ringing · Someone else took this callThe call ended, its ring closed, or another team member took it.
422—User is already on a call · Call is already in progressThe team member is on another call.

Rate Limit

60 a minute per organization and team member.


What’s Next

Join with the returned credentials. If the connection drops, rejoin; when the conversation is over, hang up.

Did this page help you?