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

# Delete API Client

> Delete an API client

# Delete API Client

Permanently delete an API client and revoke its credentials.

<Warning>
  **Caution**: All API requests using this client's credentials will immediately fail after deletion.
</Warning>

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE 'https://api.weir.ai/org/client/cli_123456789' \
    -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
    -H 'x-source: console'
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "message": "Client deleted successfully",
    "status": "success"
  }
  ```
</ResponseExample>

## Path Parameters

<ParamField path="clientId" type="string" required>
  Unique identifier of the client to delete.
</ParamField>

## Usage Examples

<CodeGroup>
  ```javascript JavaScript theme={null}
  const deleteClient = async (clientId, accessToken) => {
    const response = await fetch(`https://api.weir.ai/org/client/${clientId}`, {
      method: 'DELETE',
      headers: {
        'Authorization': `Bearer ${accessToken}`,
        'x-source': 'console'
      }
    });
    if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
    return await response.json();
  };
  ```

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

  def delete_client(client_id, access_token):
      response = requests.delete(
          f'https://api.weir.ai/org/client/{client_id}',
          headers={
              'Authorization': f'Bearer {access_token}',
              'x-source': 'console'
          }
      )
      response.raise_for_status()
      return response.json()
  ```
</CodeGroup>
