# Unassign users from a plugin

`DELETE /api/plugins/{pluginId}/users`

Remove one or more users from a specific plugin.

Authentication: no security requirement declared for this operation.

Parameters:

- `pluginId` (path, string, uuid, required) - Plugin ID
  Type: string, uuid

Request body: application/json (required)

Type: object

Schema: [UnassignPluginUsersDTO](https://sourcey-gauzy.pages.dev/api-reference/models/unassignpluginusersdto/index.md)

- `userIds` (required)
  Type: array
  
  Array of user IDs to unassign from the plugin
  
  Items:
    Type: string

- `reason` (optional)
  Type: string
  
  Optional reason for the unassignment

Responses:

- 200: Successfully unassigned users from plugin

## Examples

### cURL

```bash
curl -X DELETE 'http://localhost:3000/api/plugins/550e8400-e29b-41d4-a716-446655440000/users' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "userIds": [
    "string"
  ],
  "reason": "string"
}'
```

### JavaScript

```javascript
const body = `{
  "userIds": [
    "string"
  ],
  "reason": "string"
}`;

const response = await fetch('http://localhost:3000/api/plugins/550e8400-e29b-41d4-a716-446655440000/users', {
  method: 'DELETE',
  headers: {
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "userIds": [
    "string"
  ],
  "reason": "string"
}'''

response = requests.delete(
    'http://localhost:3000/api/plugins/550e8400-e29b-41d4-a716-446655440000/users',
    data=body.encode('utf-8'),
    headers={
        'Content-Type': 'application/json',
    },
)
print(response.text)
```
