Update custom provider

Update a specific custom provider. Only the provided fields will be updated - other fields remain unchanged. <Note> **Restrictions**: - The `provider_id` field is read-only and cannot be changed - Only the owning organization can update their custom providers - Managed providers (`is_managed: true`) cannot have critical fields modified </Note> ## Path parameters - `provider_id` *integer* **required**: The provider's primary key ID to update. **Example** ``` 123 ``` ## Request body All fields are optional. Only provide the fields you want to update. - `provider_name` *string*: Human-readable provider name. **Example** ```json "provider_name": "Updated Azure Provider" ``` - `api_key` *string*: API key for the provider (write-only, never returned in responses). **Example** ```json "api_key": "new-api-key" ``` - `extra_kwargs` *object*: Additional provider configuration (write-only, never returned in responses). **Example** ```json { "extra_kwargs": { "base_url": "https://updated-endpoint.openai.azure.com", "timeout": 90 } } ``` ## Response Returns the updated provider object without sensitive fields. ```json 200 OK { "id": "my-azure-provider", "provider_id": "my-azure-provider", "provider_name": "Updated Azure Provider", "created_at": "2024-01-15T10:30:00Z", "updated_at": "2024-01-15T12:00:00Z" } ``` ```json 404 Not Found { "detail": "Not found." } ``` ```json 401 Unauthorized { "detail": "Authentication credentials were not provided." } ``` ```python Python provider_pk = 123 url = f"https://api.respan.ai/api/providers/{provider_pk}/" headers = { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" } payload = { "provider_name": "Updated Azure Provider", "api_key": "new-api-key" } response = requests.patch(url, headers=headers, json=payload) print(response.json()) ``` ```typescript TypeScript const providerPk = 123; const url = `https://api.respan.ai/api/providers/${providerPk}/`; const headers = { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }; const payload = { provider_name: 'Updated Azure Provider', api_key: 'new-api-key' }; const response = await fetch(url, { method: 'PATCH', headers: headers, body: JSON.stringify(payload) }); const data = await response.json(); console.log(data); ``` ```bash cURL curl -X PATCH "https://api.respan.ai/api/providers/123/" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "provider_name": "Updated Azure Provider", "api_key": "new-api-key" }' ```

Authentication

AuthorizationBearer
API key authentication. Get your API key from https://platform.respan.ai/platform/api-keys

Path parameters

provider_idintegerRequired
The provider's primary key ID to update.

Request

This endpoint expects an object.
provider_namestringOptional

Human-readable provider name.

api_keystringOptional

API key for the provider (write-only, never returned in responses).

extra_kwargsobjectOptional

Additional provider configuration (write-only, never returned in responses).

Response

Successful response for Update custom provider
extra_kwargsobject

Errors

401
Unauthorized Error