curl -X DELETE 'https://api.memchat.io/api-keys/key_123abc' \
-H 'Authorization: Bearer YOUR_JWT_TOKEN'
import requests
response = requests.delete(
"https://api.memchat.io/api-keys/key_123abc",
headers={"Authorization": "Bearer YOUR_JWT_TOKEN"}
)
result = response.json()
{
"success": true,
"api_key_id": "key_123abc",
"deleted_at": "2024-01-15T16:45:00Z"
}
API Keys
Delete API Key
Revoke and delete an API key
DELETE
/
api-keys
/
{api_key_id}
curl -X DELETE 'https://api.memchat.io/api-keys/key_123abc' \
-H 'Authorization: Bearer YOUR_JWT_TOKEN'
import requests
response = requests.delete(
"https://api.memchat.io/api-keys/key_123abc",
headers={"Authorization": "Bearer YOUR_JWT_TOKEN"}
)
result = response.json()
{
"success": true,
"api_key_id": "key_123abc",
"deleted_at": "2024-01-15T16:45:00Z"
}
Permanently revokes and deletes an API key, making it unusable for future requests.
This action is irreversible. Once an API key is deleted, it cannot be recovered.
curl -X DELETE 'https://api.memchat.io/api-keys/key_123abc' \
-H 'Authorization: Bearer YOUR_JWT_TOKEN'
import requests
response = requests.delete(
"https://api.memchat.io/api-keys/key_123abc",
headers={"Authorization": "Bearer YOUR_JWT_TOKEN"}
)
result = response.json()
Path Parameters
string
required
The unique identifier of the API key to delete
Response
boolean
Indicates if the deletion was successful
string
ID of the deleted API key
string
ISO 8601 timestamp when the API key was deleted
{
"success": true,
"api_key_id": "key_123abc",
"deleted_at": "2024-01-15T16:45:00Z"
}
Error Responses
object
API key not found
{
"error": "API key not found",
"code": "API_KEY_NOT_FOUND"
}
object
Cannot delete API key
{
"error": "Cannot delete the currently used API key",
"code": "CANNOT_DELETE_ACTIVE_KEY"
}

