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
| Setting | Value |
|---|---|
| URL | https://partners.99digital.co.il/api/whatsapp/registerNumber |
| Method | JSON via POST |
| Header | Authorization: Bearer {{access_token}} — the access token can be received from the Access Token API. |
Requires the Add new number permission (Verified Numbers).
Body
| Parameter | Description / Example | Maximum length | Remarks | Mandatory |
|---|---|---|---|---|
whatsapp | The WhatsApp number you wish to register | 20 | Use the country code and the number, digits only, without +. For example: 972501234567 | Yes |
method | 1 for SMS; 2 for a phone call (a number, not a string) | 1 | If 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 |
language | The language code — see the language table below (a number, not a string) | 1 | The 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 |
comment | A free text for you to use along with the number registration. You get it back as comment in Get Registered numbers. | 100 | Numbers and letters only (spaces, hyphens, underscores and parentheses are accepted too). | No |
language values:
| Language name | Code to use |
|---|---|
| Hebrew | 1 |
| English | 2 |
| Arabic | 3 |
| Russian | 4 |
| Spanish | 5 |
| Chinese | 6 |
| Hindi | 7 |
| Thai | 8 |
| French | 9 |
Response
{
"status": "OK",
"whatsapp": "972501234567",
"reason": 1
}
Response explained
| Parameter | Description |
|---|---|
status | OK or FAIL. "OK" means the SMS or phone call has been sent. "FAIL" means error. |
whatsapp | The WhatsApp number. |
reason | The status explanation — see the table below. |
| Reason | Explanation |
|---|---|
| 1 | Not FAIL: the status is OK. |
| 2 | Wrong 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). |
| 3 | The access token does not exist or has expired. Please generate another one with the Access Token API. |
| 4 | The WhatsApp number is empty or wrong (digits only, up to 20). |
| 5 | method is empty or wrong (1 or 2). |
| 6 | language is empty or wrong (1 to 9). |
| 7 | The number you are trying to verify has already been verified by you. |
| 8 | The 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. |
| 9 | Error trying to send the verification code, please try again later. |
| 15 | Unknown error, please contact support. Also returned when the request body is not valid JSON. |
| 24 | You requested the code too many times. Please try again in 1 hour. |
| 27 | The comment length is too long, or the comment is invalid. |
Request
Responses
- 200
- 403
The request was processed. Both a successful and a failed request answer with HTTP 200 — check status, and reason when it is FAIL.
Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions.