Checks whether the given numbers are on the blacklist. Returns a map of number → `true`/`false`.

## API URL

The URL used to send the HTTP requests:

```url
https://portal.bulkgate.com/api/1.0/black-list/is-black-listed
```

> [!NOTE]
> If the request does not reach its destination, repeat it on the [backup server](https://www.bulkgate.com/en/docs/api-administration-tokens/api-backup-server/) `backup1.bulkgate.com`.

## Supported HTTP methods

- `POST` - `application/json`

```http
POST /api/1.0/black-list/is-black-listed HTTP/1.1
Host: portal.bulkgate.com
Content-Type: application/json
```

> [!NOTE]
> The API has a quota of `20` requests per minute.

## Parameters table

| PARAMETER NAME    | VALUE                                                   | MANDATORY | DEFAULT VALUE  |
|:------------------|:---------------------------------------------------------|:----------|:---------------|
| application_id    | [Application ID](https://www.bulkgate.com/en/docs/api-administration-tokens/api-administration/)           | **Yes**   | -              | 
| application_token | [Application authentication token](https://www.bulkgate.com/en/docs/api-administration-tokens/api-tokens/)	 | **Yes**   | -              |
| numbers           | Numbers to check — an array, or a comma-separated string | **Yes**  | -              |
| wallet            | Wallet on which to check the numbers                    | No        | Default wallet |
| route             | The route the block is evaluated for — `promotional`, `transactional` or `all` | No | `promotional` |

## Request example

```http-json
POST /api/1.0/black-list/is-black-listed HTTP/1.1
Host: portal.bulkgate.com
Content-Type: application/json

{
  "application_id": 451,
  "application_token": "NKN02TWE6NfBkfl-your-secret-token-Wf05GaqLIWLW4aBj",
  "numbers": ["420123456789", "420987654321"],
  "wallet": "bg1905014138000023"
}
```

## Response

**In case of success:**

```json
{
    "data": {
        "420123456789": true,
        "420987654321": false
    }
}
```

Where:

- the **key** is the phone number you sent
- the **value** is `true` when the number is on the blacklist, otherwise `false`

Invalid numbers do not return an error — they are in the response with the value `false`.

**In case of error:**

```json
{
    "type": "invalid_wallet",
    "code": 400,
    "error": "Invalid wallet",
    "detail": null
}
```

```json
{
    "type": "minute_quota_exceeded",
    "code": 400,
    "error": "Minute quota exceeded",
    "detail": null
}
```

Where:

- **type** and **error** (description of the error) can be found in the [error types table](https://www.bulkgate.com/en/docs/api-administration-tokens/api-error-types/)
- **code** is the HTTP error code
- **detail** is additional information about the error

### Blacklist API error types

Besides the [general types](https://www.bulkgate.com/en/docs/api-administration-tokens/api-error-types/), the Blacklist API returns its own:

| TYPE                    | WHEN IT HAPPENS                                      |
|:------------------------|:--------------------------------------------------------|
| `invalid_wallet`        | The given wallet does not exist or you have no access to it. |
| `minute_quota_exceeded` | The quota of 20 requests per minute is used up.      |
