WhatsApp

Route a WhatsApp number to an agent

Bind (or unbind with agent_id: null) the Omni agent that answers inbound WhatsApp calls to this number and is the default for outbound calls from it. Requires the telephony:manage scope.

post/v1/whatsapp/numbers/{id}/assign

Request

  • Base URL: https://api.pyai.com
  • URL: https://api.pyai.com/v1/whatsapp/numbers/{id}/assign
  • Auth: one of:
    • HTTP bearer
    • API key in header x-api-key

Path parameters

idstring required

Request body

agent_idstring nullable

Agent to bind, or null to unassign.

Response

Updated

objectstring
idstring
waba_idstring

WhatsApp Business Account id.

phone_number_idstring

Meta's id for the business number (what the webhook carries).

phone_numberstring

E.164.

app_idstring nullable
agent_idstring nullable

Agent that answers inbound WhatsApp calls.

calling_enabledboolean
calling_settingsobject

Last calling settings pushed to Meta.

status'active' | 'released'
created_atinteger

Unix ms.

updated_atinteger

Unix ms.

released_atinteger nullable

Unix ms.

Example response

{
  "object": "whatsapp.number",
  "id": "wan_...",
  "phone_number": "+14155550123"
}

Changes

No recorded changes to this operation across all 2 revisions of this API.