# 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.41.0"},"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":{"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":{"items":{"$ref":"#/components/schemas/block_users.BlockedUserResult"},"type":"array","uniqueItems":false}},"type":"object"},"block_users.BlockedUserResult":{"properties":{"input":{"type":"string"},"wa_id":{"type":"string"}},"type":"object"},"block_users.Paging":{"properties":{"cursors":{"$ref":"#/components/schemas/block_users.PagingCursors"},"next":{"type":"string"},"previous":{"type":"string"}},"type":"object"},"block_users.PagingCursors":{"properties":{"after":{"type":"string"},"before":{"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":{"properties":{"added_users":{"items":{"$ref":"#/components/schemas/block_users.BlockedUserResult"},"type":"array","uniqueItems":false},"failed_users":{"items":{"$ref":"#/components/schemas/block_users.FailedUserResult"},"type":"array","uniqueItems":false}},"type":"object"},"block_users.FailedUserResult":{"properties":{"errors":{"items":{"$ref":"#/components/schemas/block_users.BlockUsersError"},"type":"array","uniqueItems":false},"input":{"type":"string"},"wa_id":{"type":"string"}},"type":"object"},"block_users.BlockUsersError":{"properties":{"code":{"type":"integer"},"error_data":{"$ref":"#/components/schemas/block_users.ErrorData"},"message":{"type":"string"}},"type":"object"},"block_users.ErrorData":{"properties":{"details":{"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.41.0"},"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":{"items":{"$ref":"#/components/schemas/block_users.BlockUserItem"},"type":"array","uniqueItems":false},"messaging_product":{"type":"string"}},"type":"object"},"block_users.BlockUserItem":{"properties":{"user":{"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":{"properties":{"added_users":{"items":{"$ref":"#/components/schemas/block_users.BlockedUserResult"},"type":"array","uniqueItems":false},"failed_users":{"items":{"$ref":"#/components/schemas/block_users.FailedUserResult"},"type":"array","uniqueItems":false}},"type":"object"},"block_users.BlockedUserResult":{"properties":{"input":{"type":"string"},"wa_id":{"type":"string"}},"type":"object"},"block_users.FailedUserResult":{"properties":{"errors":{"items":{"$ref":"#/components/schemas/block_users.BlockUsersError"},"type":"array","uniqueItems":false},"input":{"type":"string"},"wa_id":{"type":"string"}},"type":"object"},"block_users.BlockUsersError":{"properties":{"code":{"type":"integer"},"error_data":{"$ref":"#/components/schemas/block_users.ErrorData"},"message":{"type":"string"}},"type":"object"},"block_users.ErrorData":{"properties":{"details":{"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.41.0"},"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":{"items":{"$ref":"#/components/schemas/block_users.BlockUserItem"},"type":"array","uniqueItems":false},"messaging_product":{"type":"string"}},"type":"object"},"block_users.BlockUserItem":{"properties":{"user":{"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":{"properties":{"added_users":{"items":{"$ref":"#/components/schemas/block_users.BlockedUserResult"},"type":"array","uniqueItems":false},"failed_users":{"items":{"$ref":"#/components/schemas/block_users.FailedUserResult"},"type":"array","uniqueItems":false}},"type":"object"},"block_users.BlockedUserResult":{"properties":{"input":{"type":"string"},"wa_id":{"type":"string"}},"type":"object"},"block_users.FailedUserResult":{"properties":{"errors":{"items":{"$ref":"#/components/schemas/block_users.BlockUsersError"},"type":"array","uniqueItems":false},"input":{"type":"string"},"wa_id":{"type":"string"}},"type":"object"},"block_users.BlockUsersError":{"properties":{"code":{"type":"integer"},"error_data":{"$ref":"#/components/schemas/block_users.ErrorData"},"message":{"type":"string"}},"type":"object"},"block_users.ErrorData":{"properties":{"details":{"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: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

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

The question should be specific, self-contained, and written in natural language.
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.
