WhatsApp Phone Numbers

Move a number to another profile

Changed on

Move a provisioned number to a different profile.

A number is not a single record. Alongside the number itself there are hidden telephony owner accounts (platform phone, plus sms when SMS is enabled) and, once WhatsApp is connected, the whatsapp account. They all carry a profileId and this endpoint moves them together.

Use this instead of PATCH /v1/accounts/{accountId}: that one moves the account only and leaves the number itself pinned to its original profile, which splits the number across two profiles. Connecting a Zernio-provisioned number from any profile but its own is rejected with a 409 (WHATSAPP_NUMBER_PINNED_TO_PROFILE). This endpoint is how you re-home the number first, so it can then be connected from the new profile.

id is the number record id from GET /v1/phone-numbers, not an account id.

The destination profile may already hold other numbers.

patch/v1/whatsapp/phone-numbers/{id}/profile

Request

  • Base URL: https://zernio.com/api
  • URL: https://zernio.com/api/v1/whatsapp/phone-numbers/{id}/profile
  • Auth: HTTP bearer

Path parameters

idstring required

WhatsAppPhoneNumber id.

Request body

profileIdstring required

Destination profile id. Must belong to the same team.

Response

Number moved, or already on that profile.

messagestring
profileIdstring

The profile the number is now on.

movedPlatformsstring[]

Platforms whose accounts travelled with the number (phone, sms, whatsapp). Absent when the number was already on the destination profile.

Changes

    • warning

      added the new account enum value to the / response property for the response status

    • warning

      added the new account enum value to the / response property for the response status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status