# Bulk update plugin settings

`PATCH /api/plugins/{pluginId}/settings`

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

- `pluginId` (required)
  Type: string
  
  Plugin ID

- `pluginTenantId` (optional)
  Type: string
  
  Plugin Tenant ID

- `settings` (required)
  Type: array
  
  Array of setting updates
  
  Example:
  
  ```json
  [
    {
      "key": "api_key",
      "value": "new_value"
    }
  ]
  ```
  
  Items:
    Type: string

Responses:

- 200: Plugin settings updated successfully

Content type: application/json

Type: array

Items:
  Reference: [PluginSetting](https://sourcey-gauzy.pages.dev/api-reference/models/pluginsetting/index.md); Type: object

## Examples

### cURL

```bash
curl -X PATCH 'http://localhost:3000/api/plugins/550e8400-e29b-41d4-a716-446655440000/settings' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "pluginId": "string",
  "pluginTenantId": "string",
  "settings": [
    {
      "key": "api_key",
      "value": "new_value"
    }
  ]
}'
```

### JavaScript

```javascript
const body = `{
  "pluginId": "string",
  "pluginTenantId": "string",
  "settings": [
    {
      "key": "api_key",
      "value": "new_value"
    }
  ]
}`;

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

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

### Python

```python
import requests

body = '''{
  "pluginId": "string",
  "pluginTenantId": "string",
  "settings": [
    {
      "key": "api_key",
      "value": "new_value"
    }
  ]
}'''

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