Delete custom provider
Delete a specific custom provider from your organization.
<Note>
**Important**:
- This action is permanent and cannot be undone
- Managed providers (`is_managed: true`) cannot be deleted as they are managed by Respan
- Deleting a provider may affect models that reference it
</Note>
## Path parameters
- `provider_id` *integer* **required**: The provider's primary key ID to delete.
**Example**
```
123
```
## Response
Returns no content on successful deletion.
```text 204 No Content
```
```json 403 Forbidden
{
"error": "Cannot delete managed provider. This provider is managed by Respan and cannot be deleted."
}
```
```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"
}
response = requests.delete(url, headers=headers)
print(f"Status code: {response.status_code}")
```
```typescript TypeScript
const providerPk = 123;
const url = `https://api.respan.ai/api/providers/${providerPk}/`;
const headers = {
'Authorization': 'Bearer YOUR_API_KEY'
};
const response = await fetch(url, {
method: 'DELETE',
headers: headers
});
console.log(`Status code: ${response.status}`);
```
```bash cURL
curl -X DELETE "https://api.respan.ai/api/providers/123/" \
-H "Authorization: Bearer YOUR_API_KEY"
```
Authentication
AuthorizationBearer
API key authentication. Get your API key from https://platform.respan.ai/platform/api-keys
Path parameters
provider_id
The provider's primary key ID to delete.
Response
No content
Errors
401
Unauthorized Error