Skip to main content

Register a number

POST 

/whatsapp/registerNumber

This API allows you to add a number to your account, in order to use the Step 2: Onboarding API.

In order to use the number, we must verify the number. You can request the verification code by SMS or by a phone call. This is part 1 of Step 1: Register a number; part 2 is Verify a number.

Important remarks

  • The number you wish to register must not be installed on any WhatsApp phone: it must be a new number. If you wish to onboard a number as coexistence (meaning you want to keep using the WhatsApp mobile app, and not register it as a new number), jump to Step 2: Onboarding.
  • Do not attempt to request a code more than 3 times, or Facebook might block the request for 1 hour to avoid abuse (reason 24).
  • If you want to use a phone call, please make sure you are able to dial the number yourself and that the number does not have an IVR operator. Make sure that a call can go through smoothly and that you are able to answer the phone call. The phone call will be received from a foreign country code or an unknown number: make sure those numbers are not blocked on your phone.
  • Registered phone numbers will wait in your account for 90 days. During this time you must create an account with that number. If you did not create an account with that phone number, after 90 days you will have to register the number again.
  • You can register and keep up to 500 numbers in your account waiting to be connected.

This process is a two-part process:

  • Part 1: you register the number by asking for the verification code. After submitting the registerNumber API (this page), you will get an SMS or a phone call with a 6-digit verification code.
  • Part 2: you verify the code you received with Verify a number. Now the number is verified and belongs to you.

Settings​

SettingValue
URLhttps://partners.99digital.co.il/api/whatsapp/registerNumber
MethodJSON via POST
HeaderAuthorization: Bearer {{access_token}} — the access token can be received from the Access Token API.

Requires the Add new number permission (Verified Numbers).

Body​

ParameterDescription / ExampleMaximum lengthRemarksMandatory
whatsappThe WhatsApp number you wish to register20Use the country code and the number, digits only, without +. For example: 972501234567Yes
method1 for SMS; 2 for a phone call (a number, not a string)1If both options are available for your number, we recommend using SMS, as it is a more stable way and not based on answering a phone call.Yes
languageThe language code — see the language table below (a number, not a string)1The language of the SMS / voice call that brings the verification code. (For SMS, in some cases, the code will be sent in English regardless of what was selected in language.)Yes
commentA free text for you to use along with the number registration. You get it back as comment in Get Registered numbers.100Numbers and letters only (spaces, hyphens, underscores and parentheses are accepted too).No

language values:

Language nameCode to use
Hebrew1
English2
Arabic3
Russian4
Spanish5
Chinese6
Hindi7
Thai8
French9

Response​

{
"status": "OK",
"whatsapp": "972501234567",
"reason": 1
}

Response explained​

ParameterDescription
statusOK or FAIL. "OK" means the SMS or phone call has been sent. "FAIL" means error.
whatsappThe WhatsApp number.
reasonThe status explanation — see the table below.
ReasonExplanation
1Not FAIL: the status is OK.
2Wrong credentials: the Authorization header is missing or not Bearer <token>, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected).
3The access token does not exist or has expired. Please generate another one with the Access Token API.
4The WhatsApp number is empty or wrong (digits only, up to 20).
5method is empty or wrong (1 or 2).
6language is empty or wrong (1 to 9).
7The number you are trying to verify has already been verified by you.
8The number you are trying to verify is not a new WhatsApp number. The number might be used by another WhatsApp API business or by the WhatsApp app, or the number you provided is not a valid phone number.
9Error trying to send the verification code, please try again later.
15Unknown error, please contact support. Also returned when the request body is not valid JSON.
24You requested the code too many times. Please try again in 1 hour.
27The comment length is too long, or the comment is invalid.

Request​

Responses​

The request was processed. Both a successful and a failed request answer with HTTP 200 — check status, and reason when it is FAIL.