> ## Documentation Index
> Fetch the complete documentation index at: https://docs.unpod.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Provider

> Permanently delete a telephony provider configuration

<ResponseExample>
  ```json Success Response (204) theme={null}
  HTTP/1.1 204 No Content
  ```

  ```json Error Response (404) theme={null}
  {
    "status_code": 404,
    "message": "Provider configuration not found."
  }
  ```
</ResponseExample>

# Delete Provider Configuration

Permanently delete a telephony provider configuration by its ID. Once deleted, this configuration can no longer be used to connect to bridges. This action cannot be undone.

<Note>
  **Prerequisites:** Make sure you have your API Token and Org-Handle ready. See [Authentication](/api/get-started/authentication) for details.
</Note>

<Warning>
  Deleting a provider configuration that is actively connected to a bridge may disrupt call routing. Disconnect the provider from all bridges before deleting.
</Warning>

### Path Parameters

| Name | Type    | Required | Description                                     |
| ---- | ------- | -------- | ----------------------------------------------- |
| id   | integer | Yes      | Unique identifier of the provider configuration |

<Note>
  You can get the provider configuration `id` by hitting the [Get All Providers](/api/provider/get-all-providers) API.
</Note>

### Headers

| Name          | Type   | Required | Description                     |
| ------------- | ------ | -------- | ------------------------------- |
| Authorization | string | Yes      | API Key format: `Token <token>` |
| Org-Handle    | string | Yes      | Organization domain handle      |

## Common Error Codes

| Status Code | Description                                     |
| ----------- | ----------------------------------------------- |
| 204         | No Content - Configuration deleted successfully |
| 401         | Unauthorized - Invalid or missing API token     |
| 403         | Forbidden - Invalid organization handle         |
| 404         | Not Found - Provider configuration not found    |
| 500         | Internal Server Error - Server-side error       |

## Code Examples

<CodeGroup>
  ```javascript Node.js theme={null}
  const axios = require('axios');

  const headers = {
    'Authorization': 'Token your-api-token',
    'Org-Handle': 'your-org-handle'
  };

  // Delete a provider configuration
  const deleteProvider = async (id) => {
    await axios.delete(
      `https://unpod.ai/api/v2/platform/telephony/providers-configurations/${id}/`,
      { headers }
    );
    console.log(`Provider configuration #${id} deleted successfully`);
  };

  // Example usage
  deleteProvider(42);
  ```

  ```python Python theme={null}
  import requests

  headers = {
      'Authorization': 'Token your-api-token',
      'Org-Handle': 'your-org-handle'
  }

  def delete_provider(config_id: int):
      """Delete a provider configuration"""
      url = f'https://unpod.ai/api/v2/platform/telephony/providers-configurations/{config_id}/'
      response = requests.delete(url, headers=headers)
      if response.status_code == 204:
          print(f"Provider configuration #{config_id} deleted successfully")
      else:
          print(f"Error: {response.json()}")

  # Example usage
  delete_provider(42)
  ```

  ```bash cURL theme={null}
  # Delete a provider configuration
  curl -X DELETE "https://unpod.ai/api/v2/platform/telephony/providers-configurations/42/" \
    -H "Authorization: Token your-api-token" \
    -H "Org-Handle: your-org-handle"
  ```
</CodeGroup>

## Best Practices

1. **Disconnect First**: Always [disconnect the provider from bridges](/api/telephony/disconnect-provider-from-bridge) before deleting a configuration
2. **Irreversible**: Deletion is permanent - verify the correct `id` before proceeding
3. **Audit Trail**: Note the deletion in your records for compliance and troubleshooting purposes
4. **204 Response**: A successful delete returns HTTP 204 with no body - handle this in your code
5. **Error Handling**: Handle 404 gracefully - the configuration may have already been deleted


## OpenAPI

````yaml DELETE /api/v2/platform/telephony/providers-configurations/{id}/
openapi: 3.0.3
info:
  title: Unpod API
  description: REST API for Unpod Voice AI Platform
  version: 2.0.0
servers:
  - url: https://unpod.ai/
    description: QA
  - url: https://unpod.ai/
    description: Production
security: []
tags:
  - name: Organisation
  - name: Spaces
  - name: Agents
  - name: Tasks
  - name: Runs
  - name: Call Logs
  - name: Analytics
  - name: Providers
  - name: Bridges
  - name: Numbers
  - name: Trunks
  - name: Telephony
  - name: Billing
paths:
  /api/v2/platform/telephony/providers-configurations/{id}/:
    delete:
      tags:
        - Providers
      summary: Delete Provider
      operationId: deleteProvider
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
            example: 42
        - $ref: '#/components/parameters/OrgHandle'
      responses:
        '204':
          description: Provider deleted successfully - No Content
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - TokenAuth: []
components:
  parameters:
    OrgHandle:
      name: Org-Handle
      in: header
      required: true
      schema:
        type: string
        example: unpod.tv
      description: Organization domain handle
  responses:
    Unauthorized:
      description: Unauthorized - Invalid or missing API token
      content:
        application/json:
          example:
            status_code: 401
            message: Authentication credentials were not provided.
    NotFound:
      description: Resource not found
      content:
        application/json:
          example:
            status_code: 404
            message: Not found.
  securitySchemes:
    TokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'Format: Token <your-api-key>'

````