Skip to content

POST /v1/projects/{id}/platforms/whatsapp-business/account/senders

Registers an active, SMS-capable Photon VoIP line on this project's connected WhatsApp Business Account. The account is resolved server-side; callers never select a WABA. The platform creates or reuses the Meta number, requests and consumes the SMS ownership code internally, verifies it, and registers the sender. displayName is optional; when omitted the project agent profile name is snapshotted before acceptance. The VoIP line remains a separate resource and never receives the whatsapp_business ability. If the operation fails, its error is the problem of one of these codes: WHATSAPP_AUTHORIZATION_REVOKED, WHATSAPP_DISPLAY_NAME_CONFLICT, WHATSAPP_NUMBER_ADD_REFUSED, WHATSAPP_NUMBER_LOOKUP_FAILED, WHATSAPP_REGISTRATION_REFUSED, WHATSAPP_VERIFICATION_REFUSED, WHATSAPP_VERIFICATION_REQUEST_REFUSED, WHATSAPP_VERIFICATION_TIMED_OUT.

photon.projects.platforms.createWhatsappVoipSender(input: CreateWhatsappVoipSenderInput, options?: RequestOptions): Promise<CreateWhatsappVoipSenderOutput>
import { Photon } from "@photon-ai/api";

const photon = new Photon({
  headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.projects.platforms.createWhatsappVoipSender({
  path: {
    id: "id",
  },
  headers: {
    idempotencyKey: "idempotencyKey",
  },
  body: {
    voipResourceId: "voipResourceId",
  },
});
{
  "cancellable": true,
  "createdAt": "2026-01-01T00:00:00.000Z",
  "detail": {},
  "endedAt": "2026-01-01T00:00:00.000Z",
  "error": {
    "code": "CHARGE_REFUSED",
    "remediation": {
      "action": "Check the payment method in Billing, then request the purchase again."
    },
    "status": 402,
    "title": "Charge Refused",
    "type": "https://photon.codes/docs/problems/charge-refused"
  },
  "operationId": "string",
  "projectId": "string",
  "reason": "charge_refused",
  "resourceId": "string",
  "resourceType": "string",
  "startedAt": "2026-01-01T00:00:00.000Z",
  "state": "pending",
  "type": "resource.provision",
  "updatedAt": "2026-01-01T00:00:00.000Z"
}

Parameters

Photon-VersionPhotonVersion

Selects the API contract date. Without it, the request is served as 2026-07-01.

Idempotency-Keystringrequired

Identifies one logical mutation across retries.

idstringrequired

Body

displayNamestring
voipResourceIdstringrequired

Returns

202 The sender provision was accepted. Poll the Location after Retry-After until the operation is terminal. Operation

Headers: Location, Photon-Version. The raw response carries these headers; see Raw responses.

cancellablebooleanrequired
createdAtstring (date-time)required
detailobject
endedAtstring (date-time)
errorOperationError

Why the operation failed: the problem of its code, the same object the endpoint returns when it rejects a request, with the status that rejection would have had (the poll itself answers 200). Every code an operation can end with is a branch below, and the endpoint that starts the operation lists its codes. Branch on code, never on status, and keep a default: a code added after your client was generated arrives as a generic problem with type: about:blank and status: 500. That 500 means this document does not describe the code yet, not that the request failed on our side or that retrying will help.

operationIdstringrequired
projectIdstringrequired
reasonOperationReason
resourceIdstring
resourceTypestringrequired
startedAtstring (date-time)
stateOperationStaterequired
typeOperationTyperequired
updatedAtstring (date-time)required