# Approve/Reject Plugin Tenant

`PATCH /api/plugin-tenants/approval`

Approves or rejects a plugin tenant installation request

Authentication: no security requirement declared for this operation.

Request body: application/json (required)

Type: object

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

- `pluginTenantId` (required)
  Type: string
  
  Plugin tenant ID to approve/reject

- `approved` (required)
  Type: boolean
  
  Whether to approve (true) or reject (false) the plugin

- `notes` (optional)
  Type: string
  
  Notes or comments for the approval/rejection

- `enableImmediately` (optional)
  Type: boolean
  
  Whether to enable the plugin immediately upon approval
  
  default: false

Responses:

- 200: Plugin tenant approval status updated successfully

Content type: application/json

Type: object

## Examples

### cURL

```bash
curl -X PATCH 'http://localhost:3000/api/plugin-tenants/approval' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "pluginTenantId": "string",
  "approved": true,
  "notes": "string",
  "enableImmediately": false
}'
```

### JavaScript

```javascript
const body = `{
  "pluginTenantId": "string",
  "approved": true,
  "notes": "string",
  "enableImmediately": false
}`;

const response = await fetch('http://localhost:3000/api/plugin-tenants/approval', {
  method: 'PATCH',
  headers: {
    'Content-Type': 'application/json',
  },
  body,
});

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

### Python

```python
import requests

body = '''{
  "pluginTenantId": "string",
  "approved": true,
  "notes": "string",
  "enableImmediately": false
}'''

response = requests.patch(
    'http://localhost:3000/api/plugin-tenants/approval',
    data=body.encode('utf-8'),
    headers={
        'Content-Type': 'application/json',
    },
)
print(response.text)
```
