> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cocoondata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# <access-service>/api/v1/userwhitelist/bulk

## URL structure&#x20;

```text theme={null}
https://access-service.xy-company.com/api/v1/userwhitelist/bulk
```

## Supported methods and overview&#x20;

* `POST` ( *Deprecated* ) - deletes one or more existing [user whitelist rule/s](/CS1.2/admin-org/managing-user-whitelists.md) (specified by their IDs in the body of the request) of any organisation, in a single action (available to SafeShare administrators only).

> [!NOTE]
>
> This endpoint is deprecated and should no longer be used. Organisation administrators can delete existing user whitelist rules by calling the `DELETE` method on the [\<access-service>/api/v1/organisations/\{orgId}/userwhitelist/\{whitelistId}](/CS1.2/api/access-service-api-v1-organisations-orgid-userwhitelist-whitelistid.md) API endpoint.

## Detailed description&#x20;

This API endpoint deletes one or more existing user whitelist rule/s (specified by their IDs in the body of the request) of any organisation, in a single action (available to SafeShare administrators only).

It is possible to check which existing Cocoon Data user accounts will be affected (i.e. regain the ability to be shared content) by calling the [\<access-service>/api/v1/organisations/\{orgId}/userwhitelist/check](/CS1.2/api/access-service-api-v1-organisations-orgid-userwhitelist-check.md) API endpoint with an **action** parameter value of **delete** in the JSON object, along with the **id**s (i.e. of each whitelist rule to be deleted) in the **items** array.

Organisation administrators can delete a single user whitelist rule by calling the `DELETE` method of the [\<access-service>/api/v1/organisations/\{orgId}/userwhitelist/\{whitelistId}](/CS1.2/api/access-service-api-v1-organisations-orgid-userwhitelist-whitelistid.md) API endpoint.

Deleting the last user whitelist rule in an organisation results in the user whitelist feature being disabled for that organisation.

## Supported roles&#x20;

This API endpoint supports the following Cocoon Data user [roles](/CS1.2/admin-platform/administering-platform-administrator-users.md#platform-administrators-and-user-roles) (as described in the [SafeShare Administrator's Guide](/CS1.2/admin-platform.md)):

* [SafeShare administrator](/CS1.2/admin-platform/administering-platform-administrator-users.md#platform-administrator-role)

The Cocoon Data Platform's resources available to a Cocoon Data user meeting the criteria above is determined by the access token submitted in the [header](/CS1.2/api/access-service-api-v1-userwhitelist-bulk.md#access-service-api-v1-userwhitelist-bulk-required-headers) of requests to this endpoint.

## Required headers&#x20;

The appropriate access token as the `Bearer` token:

* `Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0NjcwMTY2NjYsInVzZXJfbmFtZSI6ImFsZXgub...`

The following header is required if the body of the request has a JSON object:

* `Content-Type: application/json`

## Required parameters&#x20;

The following required parameter must be sent in the **URL** of the POST request:

* **action** - The enumeration (enum) value `delete`. \

  **Example (request URL):**

  ```text theme={null}
  https://access-service.xy-company.com/api/v1/userwhitelist/bulk?action=delete
  ```

The following required parameter must also be sent in the **body** of the POST request, as an individual member of a **JSON object**:

* **ids** - An array of IDs of individual user whitelist rules to be deleted. \

  **Example (request body):**

  ```json theme={null}
  {
      "ids": [765456269464346624, 765708906118029312]
  }
  ```

## Returns&#x20;

If the request succeeded, then an HTTP response status `200 OK` is returned.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.