<!-- Generated from the canonical 99 Digital API documentation. Do not edit this file. -->

Canonical page: https://docs.99digital.co.il/partners-api/whatsapp/step-1-register-a-number/verify-number

# Verify a number

`POST https://partners.99digital.co.il/api/whatsapp/verifyNumber`

Part 2: you verify the code you received, and now the number is verified and belongs to you.

This API allows you to add a number to your account, in order to use the
[Step 2: Onboarding](https://docs.99digital.co.il/partners-api/whatsapp/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 2 of
[Step 1: Register a number](https://docs.99digital.co.il/partners-api/whatsapp/step-1-register-a-number).

This process is a two-part process:

- **Part 1:** you register the number by asking for the verification
  code. After submitting the
  [registerNumber](https://docs.99digital.co.il/partners-api/whatsapp/step-1-register-a-number/register-number)
  API, you will get an SMS or a phone call with a 6-digit verification
  code.
- **Part 2:** you verify the code you received (this page). Now the number
  is verified and belongs to you.

Registered phone numbers will wait in your account for 90 days, until
`expiration`. During this time you must create an account with that
number ([Step 2: Onboarding](https://docs.99digital.co.il/partners-api/whatsapp/step-2-onboarding)). If
you did not create an account with that phone number, after 90 days you
will have to register the number again.

## Settings

| Setting | Value |
| --- | --- |
| URL | `https://partners.99digital.co.il/api/whatsapp/verifyNumber` |
| Method | JSON via POST |
| Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. |

Requires the **Add new number** permission (Verified Numbers).

## Body

| Parameter | Description / Example | Maximum length | Remarks | Mandatory |
| --- | --- | --- | --- | --- |
| `whatsapp` | The same WhatsApp number you used to request the code with the [registerNumber](https://docs.99digital.co.il/partners-api/whatsapp/step-1-register-a-number/register-number) API | 20 | Use the country code and the number, digits only, without `+`. For example: `972501234567` | Yes |
| `code` | The 6-digit code | 6 | 6 digits, numbers only. Remove any hyphens if the code received by SMS contains any. You can try up to 3 times. | Yes |

## Response

```json
{
  "status": "OK",
  "whatsapp": "972501234567",
  "expiration": 1737109621,
  "reason": 1
}
```

## Response explained

| Parameter | Description |
| --- | --- |
| `status` | OK or FAIL. "OK" means the verification was successful. "FAIL" means error. |
| `whatsapp` | The WhatsApp number. |
| `expiration` | The expiration timestamp (Unix time, in seconds), 90 days from now. Create the WhatsApp account with this number before then. |
| `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](https://docs.99digital.co.il/partners-api/settings/access-token) API. |
| 4 | The WhatsApp number is empty or wrong (digits only, up to 20). |
| 7 | The number you are trying to verify has already been verified by you. |
| 10 | `code` is empty or not a 6-digit number. |
| 11 | The WhatsApp number you are trying to verify is not a number that is waiting to be verified (in your account). Please use the [registerNumber](https://docs.99digital.co.il/partners-api/whatsapp/step-1-register-a-number/register-number) API (part 1) first. |
| 12 | The code is wrong, please try again. You can try up to 3 times. |
| 15 | Unknown error, please contact support. Also returned when the request body is not valid JSON. |

## Authentication

`Authorization: Bearer <token>` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour.

## Request body

Content type: `application/json` (required)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `whatsapp` | string | Yes | The same WhatsApp number you used to request the code with [Register a number](https://docs.99digital.co.il/partners-api/whatsapp/step-1-register-a-number/register-number) (the registerNumber API). Use the country code and the number, digits only (up to 20), without `+`. For example: `972501234567`. Max length: 20. Pattern: `^[0-9]{1,20}$`. Example: `972501234567`. |
| `code` | string | Yes | The 6-digit code you received by SMS or phone call. 6 digits, numbers only: remove any hyphens if the code received by SMS contains any. You can try up to 3 times. Min length: 6. Max length: 6. Pattern: `^[0-9]{6}$`. Example: `123456`. |

### Example (generated from the schema)

```json
{
  "whatsapp": "972501234567",
  "code": "123456"
}
```

## Responses

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

Content type: `application/json`

| Field | Type | Description |
| --- | --- | --- |
| `status` | string | (one of: OK) OK means the verification was successful: the number is verified and belongs to you. Always `OK`. |
| `whatsapp` | string | (one of: OK) The WhatsApp number. Example: `972501234567`. |
| `expiration` | integer | (one of: OK) The expiration timestamp (Unix time, in seconds), 90 days from now. Create the WhatsApp account with this number before then; after it, you will have to register the number again. Example: `1737109621`. |
| `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. |
| `status` | string | (one of: FAIL) FAIL means error — the request was not carried out. `reason` says why. Always `FAIL`. |
| `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `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](https://docs.99digital.co.il/partners-api/settings/access-token) API; `4` — The WhatsApp number is empty or wrong: digits only, up to 20; `7` — The number you are trying to verify has already been verified by you; `10` — `code` is empty or not a 6-digit number; `11` — The WhatsApp number you are trying to verify is not a number that is waiting to be verified in your account. Please use the registerNumber API (Register a number, part 1) first; `12` — The code is wrong, please try again. You can try up to 3 times; `15` — Unknown error, please contact support. Also returned when the request body is not valid JSON. |

#### Example: OK

The number is verified and waits in your account for 90 days.

```json
{
  "status": "OK",
  "whatsapp": "972501234567",
  "expiration": 1737109621,
  "reason": 1
}
```

#### Example: Reason 11

The number is not waiting to be verified in your account — use Register a number first.

```json
{
  "status": "FAIL",
  "reason": 11
}
```

#### Example: Reason 12

The code is wrong, please try again.

```json
{
  "status": "FAIL",
  "reason": 12
}
```

### 403 — 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.

Content type: `application/json`

| Field | Type | Description |
| --- | --- | --- |
| `status` | string | FAIL — the request was not carried out. Always `FAIL`. |
| `reason` | integer | Always 403. Always `403`. |
| `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. |

#### Example

```json
{
  "status": "FAIL",
  "reason": 403,
  "error": "Permission denied"
}
```
