> For the complete documentation index, see [llms.txt](https://docs.360dialog.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.360dialog.com/docs/messaging-api/api-reference/block-users.md).

# Block Users

Endpoints for managing blocking of WhatsApp Users

## Get Blocked WhatsApp Users

> Get a paginated list of blocked WhatsApp user numbers on your WhatsApp Business number.

```json
{"openapi":"3.1.0","info":{"title":"Messaging API","version":"1.56.2"},"tags":[{"name":"Block Users","description":"Endpoints for managing blocking of WhatsApp Users"}],"servers":[{"description":"Production server","url":"https://waba-v2.360dialog.io"}],"security":[{"D360-API-KEY":[]}],"components":{"securitySchemes":{"D360-API-KEY":{"description":"API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.","in":"header","name":"D360-API-KEY","type":"apiKey"}},"schemas":{"block_users.GetBlockedUsersResponse":{"description":"Response payload for getting the list of blocked users","properties":{"data":{"description":"Array of blocked users data","items":{"$ref":"#/components/schemas/block_users.GetBlockedUsersDataItem"},"type":"array","uniqueItems":false},"paging":{"$ref":"#/components/schemas/block_users.Paging"}},"type":"object"},"block_users.GetBlockedUsersDataItem":{"properties":{"block_users":{"description":"List of blocked users","items":{"$ref":"#/components/schemas/block_users.BlockedUserResult"},"type":"array","uniqueItems":false}},"type":"object"},"block_users.BlockedUserResult":{"properties":{"input":{"description":"The phone number or WhatsApp ID that was provided in the request","type":"string"},"wa_id":{"description":"The WhatsApp ID of the user","type":"string"}},"type":"object"},"block_users.Paging":{"description":"Pagination information","properties":{"cursors":{"$ref":"#/components/schemas/block_users.PagingCursors"},"next":{"description":"URL to fetch next page of results","type":"string"},"previous":{"description":"URL to fetch previous page of results","type":"string"}},"type":"object"},"block_users.PagingCursors":{"description":"Pagination cursors","properties":{"after":{"description":"Cursor to fetch results after this position","type":"string"},"before":{"description":"Cursor to fetch results before this position","type":"string"}},"type":"object"},"block_users.BlockUsersErrorResponse":{"description":"Error response payload for block users operations","properties":{"block_users":{"$ref":"#/components/schemas/block_users.BlockUsersResult"},"error":{"$ref":"#/components/schemas/block_users.BlockUsersAPIError"},"messaging_product":{"type":"string"}},"type":"object"},"block_users.BlockUsersResult":{"description":"Lists of users that were successfully blocked/unblocked and users that failed","properties":{"added_users":{"description":"List of successfully blocked/unblocked users","items":{"$ref":"#/components/schemas/block_users.BlockedUserResult"},"type":"array","uniqueItems":false},"failed_users":{"description":"List of users that failed to be blocked/unblocked","items":{"$ref":"#/components/schemas/block_users.FailedUserResult"},"type":"array","uniqueItems":false}},"type":"object"},"block_users.FailedUserResult":{"properties":{"errors":{"description":"List of errors for this user","items":{"$ref":"#/components/schemas/block_users.BlockUsersError"},"type":"array","uniqueItems":false},"input":{"description":"The phone number or WhatsApp ID that was provided in the request","type":"string"},"wa_id":{"description":"The WhatsApp ID of the user","type":"string"}},"type":"object"},"block_users.BlockUsersError":{"properties":{"code":{"description":"Error code","type":"integer"},"error_data":{"$ref":"#/components/schemas/block_users.ErrorData"},"message":{"description":"Error message","type":"string"}},"type":"object"},"block_users.ErrorData":{"description":"Additional error details","properties":{"details":{"description":"Detailed error information","type":"string"}},"type":"object"},"block_users.BlockUsersAPIError":{"properties":{"code":{"type":"integer"},"error_data":{"$ref":"#/components/schemas/block_users.ErrorData"},"fbtrace_id":{"type":"string"},"message":{"type":"string"},"type":{"type":"string"}},"type":"object"},"utils.ErrorResp":{"properties":{"error":{"type":"string"}},"type":"object"}}},"paths":{"/block_users":{"get":{"description":"Get a paginated list of blocked WhatsApp user numbers on your WhatsApp Business number.","operationId":"get-blocked-users","parameters":[{"description":"Maximum number of blocked users to fetch in the request","in":"query","name":"limit","schema":{"type":"integer"}},{"description":"Cursor for pagination - fetch results after this cursor","in":"query","name":"after","schema":{"type":"string"}},{"description":"Cursor for pagination - fetch results before this cursor","in":"query","name":"before","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/block_users.GetBlockedUsersResponse"}}},"description":"Blocked users retrieved successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/block_users.BlockUsersErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Internal server error"}},"summary":"Get Blocked WhatsApp Users","tags":["Block Users"]}}}}
```

## Block WhatsApp Users

> Block a list of WhatsApp user numbers from contacting your business. When you block a WhatsApp user, the user cannot contact your business or see that you are online, and your business cannot message the user.

```json
{"openapi":"3.1.0","info":{"title":"Messaging API","version":"1.56.2"},"tags":[{"name":"Block Users","description":"Endpoints for managing blocking of WhatsApp Users"}],"servers":[{"description":"Production server","url":"https://waba-v2.360dialog.io"}],"security":[{"D360-API-KEY":[]}],"components":{"securitySchemes":{"D360-API-KEY":{"description":"API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.","in":"header","name":"D360-API-KEY","type":"apiKey"}},"schemas":{"block_users.BlockUsersRequest":{"description":"Request payload to block or unblock WhatsApp users","properties":{"block_users":{"description":"List of user(s) to block/unblock. Each element contains a user field","items":{"$ref":"#/components/schemas/block_users.BlockUserItem"},"type":"array","uniqueItems":false},"messaging_product":{"description":"Messaging service used for the request. Must be 'whatsapp'","type":"string"}},"type":"object"},"block_users.BlockUserItem":{"properties":{"user":{"description":"The phone number or WhatsApp ID to be blocked/unblocked","type":"string"}},"type":"object"},"block_users.BlockUsersResponse":{"description":"Response payload for successful block users operation","properties":{"block_users":{"$ref":"#/components/schemas/block_users.BlockUsersResult"},"messaging_product":{"type":"string"}},"type":"object"},"block_users.BlockUsersResult":{"description":"Lists of users that were successfully blocked/unblocked and users that failed","properties":{"added_users":{"description":"List of successfully blocked/unblocked users","items":{"$ref":"#/components/schemas/block_users.BlockedUserResult"},"type":"array","uniqueItems":false},"failed_users":{"description":"List of users that failed to be blocked/unblocked","items":{"$ref":"#/components/schemas/block_users.FailedUserResult"},"type":"array","uniqueItems":false}},"type":"object"},"block_users.BlockedUserResult":{"properties":{"input":{"description":"The phone number or WhatsApp ID that was provided in the request","type":"string"},"wa_id":{"description":"The WhatsApp ID of the user","type":"string"}},"type":"object"},"block_users.FailedUserResult":{"properties":{"errors":{"description":"List of errors for this user","items":{"$ref":"#/components/schemas/block_users.BlockUsersError"},"type":"array","uniqueItems":false},"input":{"description":"The phone number or WhatsApp ID that was provided in the request","type":"string"},"wa_id":{"description":"The WhatsApp ID of the user","type":"string"}},"type":"object"},"block_users.BlockUsersError":{"properties":{"code":{"description":"Error code","type":"integer"},"error_data":{"$ref":"#/components/schemas/block_users.ErrorData"},"message":{"description":"Error message","type":"string"}},"type":"object"},"block_users.ErrorData":{"description":"Additional error details","properties":{"details":{"description":"Detailed error information","type":"string"}},"type":"object"},"block_users.BlockUsersErrorResponse":{"description":"Error response payload for block users operations","properties":{"block_users":{"$ref":"#/components/schemas/block_users.BlockUsersResult"},"error":{"$ref":"#/components/schemas/block_users.BlockUsersAPIError"},"messaging_product":{"type":"string"}},"type":"object"},"block_users.BlockUsersAPIError":{"properties":{"code":{"type":"integer"},"error_data":{"$ref":"#/components/schemas/block_users.ErrorData"},"fbtrace_id":{"type":"string"},"message":{"type":"string"},"type":{"type":"string"}},"type":"object"},"utils.ErrorResp":{"properties":{"error":{"type":"string"}},"type":"object"}}},"paths":{"/block_users":{"post":{"description":"Block a list of WhatsApp user numbers from contacting your business. When you block a WhatsApp user, the user cannot contact your business or see that you are online, and your business cannot message the user.","operationId":"block-users","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/block_users.BlockUsersRequest","summary":"requestBody","description":"Block users request payload"}}},"description":"Block users request payload","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/block_users.BlockUsersResponse"}}},"description":"Users blocked successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/block_users.BlockUsersErrorResponse"}}},"description":"Mixed success/failure or bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Internal server error"}},"summary":"Block WhatsApp Users","tags":["Block Users"]}}}}
```

## Unblock WhatsApp Users

> Unblock a list of WhatsApp user numbers, allowing them to contact your business again.

```json
{"openapi":"3.1.0","info":{"title":"Messaging API","version":"1.56.2"},"tags":[{"name":"Block Users","description":"Endpoints for managing blocking of WhatsApp Users"}],"servers":[{"description":"Production server","url":"https://waba-v2.360dialog.io"}],"security":[{"D360-API-KEY":[]}],"components":{"securitySchemes":{"D360-API-KEY":{"description":"API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.","in":"header","name":"D360-API-KEY","type":"apiKey"}},"schemas":{"block_users.BlockUsersRequest":{"description":"Request payload to block or unblock WhatsApp users","properties":{"block_users":{"description":"List of user(s) to block/unblock. Each element contains a user field","items":{"$ref":"#/components/schemas/block_users.BlockUserItem"},"type":"array","uniqueItems":false},"messaging_product":{"description":"Messaging service used for the request. Must be 'whatsapp'","type":"string"}},"type":"object"},"block_users.BlockUserItem":{"properties":{"user":{"description":"The phone number or WhatsApp ID to be blocked/unblocked","type":"string"}},"type":"object"},"block_users.UnblockUsersResponse":{"description":"Response payload for successful unblock users operation","properties":{"block_users":{"$ref":"#/components/schemas/block_users.BlockUsersResult"},"messaging_product":{"type":"string"}},"type":"object"},"block_users.BlockUsersResult":{"description":"Lists of users that were successfully blocked/unblocked and users that failed","properties":{"added_users":{"description":"List of successfully blocked/unblocked users","items":{"$ref":"#/components/schemas/block_users.BlockedUserResult"},"type":"array","uniqueItems":false},"failed_users":{"description":"List of users that failed to be blocked/unblocked","items":{"$ref":"#/components/schemas/block_users.FailedUserResult"},"type":"array","uniqueItems":false}},"type":"object"},"block_users.BlockedUserResult":{"properties":{"input":{"description":"The phone number or WhatsApp ID that was provided in the request","type":"string"},"wa_id":{"description":"The WhatsApp ID of the user","type":"string"}},"type":"object"},"block_users.FailedUserResult":{"properties":{"errors":{"description":"List of errors for this user","items":{"$ref":"#/components/schemas/block_users.BlockUsersError"},"type":"array","uniqueItems":false},"input":{"description":"The phone number or WhatsApp ID that was provided in the request","type":"string"},"wa_id":{"description":"The WhatsApp ID of the user","type":"string"}},"type":"object"},"block_users.BlockUsersError":{"properties":{"code":{"description":"Error code","type":"integer"},"error_data":{"$ref":"#/components/schemas/block_users.ErrorData"},"message":{"description":"Error message","type":"string"}},"type":"object"},"block_users.ErrorData":{"description":"Additional error details","properties":{"details":{"description":"Detailed error information","type":"string"}},"type":"object"},"block_users.BlockUsersErrorResponse":{"description":"Error response payload for block users operations","properties":{"block_users":{"$ref":"#/components/schemas/block_users.BlockUsersResult"},"error":{"$ref":"#/components/schemas/block_users.BlockUsersAPIError"},"messaging_product":{"type":"string"}},"type":"object"},"block_users.BlockUsersAPIError":{"properties":{"code":{"type":"integer"},"error_data":{"$ref":"#/components/schemas/block_users.ErrorData"},"fbtrace_id":{"type":"string"},"message":{"type":"string"},"type":{"type":"string"}},"type":"object"},"utils.ErrorResp":{"properties":{"error":{"type":"string"}},"type":"object"}}},"paths":{"/block_users":{"delete":{"description":"Unblock a list of WhatsApp user numbers, allowing them to contact your business again.","operationId":"unblock-users","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/block_users.BlockUsersRequest","summary":"requestBody","description":"Unblock users request payload"}}},"description":"Unblock users request payload","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/block_users.UnblockUsersResponse"}}},"description":"Users unblocked successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/block_users.BlockUsersErrorResponse"}}},"description":"Mixed success/failure or bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Internal server error"}},"summary":"Unblock WhatsApp Users","tags":["Block Users"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.360dialog.com/docs/messaging-api/api-reference/block-users.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
