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

Canonical page: https://docs.99digital.co.il/whatsapp-api/black-list-block/block

# Block

`POST https://api.99digital.co.il/whatsapp/v2/block`

This endpoint allows you to block a number.

The user cannot contact your WhatsApp number at all (they will see 1 grey
check mark), and you can't message that user either: if you try to send, you
will get an error. You can only block users that have messaged you in the last
24 hours, and the maximum is 64,000 numbers in your block list. See
[Black List (Block)](https://docs.99digital.co.il/whatsapp-api/black-list-block) for how it works and when
to use it.

## Settings

| Setting | Value |
| --- | --- |
| URL | `https://api.99digital.co.il/whatsapp/v2/block` |
| Method | JSON via POST |

| Key | Value |
| --- | --- |
| apiKey | Your API key for the service |

## Body

| Parameter | Description / Example | Mandatory |
| --- | --- | --- |
| from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes |
| whatsapp | The number you want to block, in international format, digits only. For example: `972501234567` | yes |

## Response

```json
{
  "status": "OK",
  "from": "972771234567",
  "whatsapp": "972501234567",
  "reason": 1
}
```

## Response-Explain

| Parameter | Description |
| --- | --- |
| status | `OK` or `FAIL` |
| from | Your WhatsApp account |
| whatsapp | The number that you blocked |
| reason | The status explanation — see the table below. |

| reason | Description |
| --- | --- |
| 1 | Not FAIL. The status is OK. |
| 2 | `from` is missing, or JSON syntax error |
| 3 | Wrong apiKey, or the "from" number is not registered with us |
| 4 | `whatsapp` is either empty or wrong number format |
| 6 | Error blocking the number, please try again |
| 7 | You are trying to block a number, but it has been more than 24 hours since the user sent you a message. You need to wait for their next message. |
| 8 | The 64,000 block limit has been reached |

## Authentication

`apiKey` in the header — Your API key for the service.

## Request body

Content type: `application/json` (required)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. |
| `whatsapp` | string | Yes | The number you want to block, in international format, digits only. Example: `972501234567`. |

### Example (generated from the schema)

```json
{
  "from": "972771234567",
  "whatsapp": "972501234567"
}
```

## 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 — the number is blocked. Always `OK`. |
| `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. |
| `whatsapp` | string | (one of: OK) The number that you blocked. Example: `972501234567`. |
| `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. |
| `status` | string | (one of: FAIL) FAIL — 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` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'whatsapp' is either empty or wrong number format; `6` — Error blocking the number, please try again; `7` — You are trying to block a number, but it has been more than 24 hours since the user sent you a message. You need to wait for their next message; `8` — The 64,000 block limit has been reached. |

#### Example: OK

The number is blocked.

```json
{
  "status": "OK",
  "from": "972771234567",
  "whatsapp": "972501234567",
  "reason": 1
}
```

#### Example: Reason 7

The user hasn't messaged you in the last 24 hours.

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