> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api.labelstud.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api.labelstud.io/_mcp/server.

# ✨ Bulk unassign project members

DELETE http://localhost:8000/api/projects/{id}/members/bulk/

This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)

Unassign project members in bulk. Pass selector fields via query parameters (`all`, `included`, `excluded`) and optional member filters (`search`, `role`, `tags`, `last_activity__gte`, `last_activity__lte`). For backward compatibility, a JSON body with bulk fields is still accepted.

Reference: https://api.labelstud.io/api-reference/api-reference/projects/members/bulk/delete

## Authentication

- `Authorization` header (required) (prefixed with ` Token   `) — The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: curl [https://label-studio-host/api/projects](https://label-studio-host/api/projects) -H "Authorization: Token \[your-token]"

## Request

### Path parameters

- `id` (integer, required)

### Query parameters

- `all` (boolean, optional) — Apply unassignment to all currently matched project members.
- `excluded` (string, optional) — Comma-separated list of user IDs to keep assigned when `all=true`.
- `ids` (string, optional) — Filter id by in list
- `included` (string, optional) — Comma-separated list of user IDs to unassign when `all=false`.
- `last_activity__gte` (string, optional) — Filter by last activity (ISO 8601 formatted date). Only when all=True.
- `last_activity__lte` (string, optional) — Filter by last activity upper bound (ISO 8601 formatted date). Only when all=True.
- `role` (string, optional) — Filter by role, project roles take precedence over organization roles. Only when all=True. (comma-separated values)
- `search` (string, optional) — Search term for filtering members by name, email, or username. Only when all=True.
- `tags` (string, optional) — Multiple values may be separated by commas. (comma-separated values)
- `tags_operator` (string, optional) — How the `tags` ids combine: `any` (at least one tag), `all` (every tag, the default), `none` (no selected tag). Ignored without `tags`.
- `user_type` (string, optional) — Multiple values may be separated by commas. (comma-separated values)

## Response

### 200

- `unassignments` (integer, optional)

## Examples

### Legacy SDK usage (supported)

**Response**

```json
{
  "description": "Backward-compatible legacy call with DELETE body: ls.projects.members.bulk.delete(\n    id=123,\n    request_options={'additional_body_parameters': {'all': False, 'included': [456, 789]}},\n)",
  "summary": "Legacy SDK usage (supported)"
}
```

**SDK Code**

```python Legacy SDK usage (supported)
import requests

url = "http://localhost:8000/api/projects/1/members/bulk/"

headers = {"Authorization": "Token  <api_key>"}

response = requests.delete(url, headers=headers)

print(response.json())
```

```javascript Legacy SDK usage (supported)
const url = 'http://localhost:8000/api/projects/1/members/bulk/';
const options = {method: 'DELETE', headers: {Authorization: 'Token  <api_key>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Legacy SDK usage (supported)
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "http://localhost:8000/api/projects/1/members/bulk/"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("Authorization", "Token  <api_key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Legacy SDK usage (supported)
require 'uri'
require 'net/http'

url = URI("http://localhost:8000/api/projects/1/members/bulk/")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Token  <api_key>'

response = http.request(request)
puts response.read_body
```

```java Legacy SDK usage (supported)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.delete("http://localhost:8000/api/projects/1/members/bulk/")
  .header("Authorization", "Token  <api_key>")
  .asString();
```

```php Legacy SDK usage (supported)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'http://localhost:8000/api/projects/1/members/bulk/', [
  'headers' => [
    'Authorization' => 'Token  <api_key>',
  ],
]);

echo $response->getBody();
```

```csharp Legacy SDK usage (supported)
using RestSharp;

var client = new RestClient("http://localhost:8000/api/projects/1/members/bulk/");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Token  <api_key>");
IRestResponse response = client.Execute(request);
```

```swift Legacy SDK usage (supported)
import Foundation

let headers = ["Authorization": "Token  <api_key>"]

let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:8000/api/projects/1/members/bulk/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### SDK usage

**Response**

```json
{
  "description": "SDK call example using DELETE query params: ls.projects.members.bulk.delete(\n    id=123,\n    all_=False,\n    included=[456, 789],\n)",
  "summary": "SDK usage"
}
```

**SDK Code**

```python SDK usage
import requests

url = "http://localhost:8000/api/projects/1/members/bulk/"

headers = {"Authorization": "Token  <api_key>"}

response = requests.delete(url, headers=headers)

print(response.json())
```

```javascript SDK usage
const url = 'http://localhost:8000/api/projects/1/members/bulk/';
const options = {method: 'DELETE', headers: {Authorization: 'Token  <api_key>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go SDK usage
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "http://localhost:8000/api/projects/1/members/bulk/"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("Authorization", "Token  <api_key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby SDK usage
require 'uri'
require 'net/http'

url = URI("http://localhost:8000/api/projects/1/members/bulk/")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Token  <api_key>'

response = http.request(request)
puts response.read_body
```

```java SDK usage
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.delete("http://localhost:8000/api/projects/1/members/bulk/")
  .header("Authorization", "Token  <api_key>")
  .asString();
```

```php SDK usage
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'http://localhost:8000/api/projects/1/members/bulk/', [
  'headers' => [
    'Authorization' => 'Token  <api_key>',
  ],
]);

echo $response->getBody();
```

```csharp SDK usage
using RestSharp;

var client = new RestClient("http://localhost:8000/api/projects/1/members/bulk/");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Token  <api_key>");
IRestResponse response = client.Execute(request);
```

```swift SDK usage
import Foundation

let headers = ["Authorization": "Token  <api_key>"]

let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:8000/api/projects/1/members/bulk/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```