---
title: "Create blocklists"
method: POST
path: "/platform/1/blocklists"
tags: ["platform", "blocklist"]
---

# Create blocklists

`POST /platform/1/blocklists`

## Request

- Base URL: `https://api.infobip.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.infobip.com/platform/1/blocklists`
- Auth: one of:
  - OAuth 2
    - Client credentials
    - Token URL: `https://api.infobip.com/auth/1/oauth2/token`
  - API key in header `Authorization`
  - API key in header `Authorization`
  - HTTP basic

This method allows you to add someone to blocklist. It accepts create request with blocklists and asynchronously saves them, leaving out duplicate entries.

## Request body

- 2c1d05f3dc2f46851efe83e0fa7d26e3f8a2e8ee522f9adaaba58b0a33a2be33BlocklistCreateRequest: Blocklist request.
  - `blocklist` 2c1d05f3dc2f46851efe83e0fa7d26e3f8a2e8ee522f9adaaba58b0a33a2be33BlocklistCreate[], required: Blocklist elements that need to be blocklisted. Number of destinations cannot exceed 50 000.
    - `destinations` 2c1d05f3dc2f46851efe83e0fa7d26e3f8a2e8ee522f9adaaba58b0a33a2be33ToCreate[], required: Destination addresses that need to be blocklisted.
      - `to` string, required: Destination address that needs to be blocklisted. Addresses must be a number in international format (example: `41793026727`), a valid email address (example: `recipient@example.com`) or valid email domain (example: `example.com`).
    - `sender` string: The sender ID for which blocklist happened.
    - `channel` 'SMS' | 'EMAIL' | 'VIBER' | 'RCS' | 'MMS' | 'WHATSAPP': Channel used for sending for which blocklist happened.
    - `accountKey` string: Account connected with a blocklist record. Main account has access to blocklist records of their subaccounts. Subaccounts can only access blocklist records specific to them. [API to retrieve account key](https://www.infobip.com/docs/api/platform/account-management/get-all-accounts).

## Response `202`

Accepted

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/infobip/apis/infobip-openapi-specification.md) - [All operations](https://skmtc.dev/infobip/apis/infobip-openapi-specification/llms.txt) - [OpenAPI document](https://skmtc.dev/infobip/apis/infobip-openapi-specification/revisions/9dcbbaf902de?raw)
