# Revoke plugin subscription from users

`POST /api/plugins/{pluginId}/subscription/access/revoke`

Removes plugin access from specific users at the organization/tenant level

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: [RevokePluginSubscriptionAssignmentDTO](https://sourcey-gauzy.pages.dev/api-reference/models/revokepluginsubscriptionassignmentdto/index.md)

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

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

Responses:

- 200: Users successfully removed from plugin subscription

- 403: User does not have permission to revoke subscriptions

## Examples

### cURL

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

### JavaScript

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

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

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

### Python

```python
import requests

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

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