Delete API Token
This API allows you to permanently delete an API token for a sub-client account.
Headers
| Parameter | Description |
|---|---|
| Authorization | Please add provided Bearer token - linked to your Cellcast account. Check here |
Path Parameters
| Name | Type | Example | Description |
|---|---|---|---|
| id | String | 6877b1234567890abcdef123 | Required. The ID of the token. |
Code Sample
DELETE https://api.cellcast.com/api/v1/apiClient/token/:id
bash
curl --location --request DELETE 'https://api.cellcast.com/api/v1/apiClient/token/6877b1234567890abcdef123' \
--header 'authorization: Bearer {{API_KEY}}'javascript
const response = await fetch(
"https://api.cellcast.com/api/v1/apiClient/token/6877b1234567890abcdef123",
{
method: "DELETE",
headers: {
Authorization: "Bearer {{API_KEY}}"
}
}
);
const data = await response.json();
console.log(data);php
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.cellcast.com/api/v1/apiClient/token/6877b1234567890abcdef123',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer {{API_KEY}}'
]
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>python
import requests
url = "https://api.cellcast.com/api/v1/apiClient/token/6877b1234567890abcdef123"
headers = {
"Authorization": "Bearer {{API_KEY}}"
}
response = requests.delete(url, headers=headers)
print(response.json())Replace with the actual API key that you own.
Responses
200 Success
json
{
"app_type": "web",
"app_version": "1.0",
"maintainence": 0,
"new_version": 0,
"force_update": 0,
"invalid_token": 0,
"refresh_token": "",
"show_message": 0,
"is_enc": false,
"status": true,
"message": "API token deleted successfully",
"message_type": "toast",
"data": null,
"error": {}
}404 Not Found
json
{
"status": false,
"message": "Not found",
"message_type": "toast",
"data": {},
"error": {
"message": "API token not found"
}
}401 Unauthorized
json
{
"code": 401,
"message": "Token expired",
"stack": "APIError: Token expired..."
}Permanent Deletion
Deleting an API token is permanent and cannot be undone. Any applications or integrations using this token will immediately lose API access.
If you want to temporarily disable a token without deleting it, consider using the Update API Token endpoint to set the status to inactive instead.
See Also
- Create API Token - Create a new API token
- Get API Tokens - List all API tokens
- Update API Token - Update an existing API token
