curl -X DELETE "https://api.chatgrid.ai/v1/me/api-keys/ee112233-4455-6677-8899-aabbccddeeff" \
-H "Authorization: Bearer cgk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
{
"object": "api_key_revoked",
"data": {
"id": "ee112233-4455-6677-8899-aabbccddeeff",
"revoked": true
}
}
{
"object": "error",
"status": 404,
"code": "not_found",
"message": "API key not found or already revoked"
}
Me
Revoke API Key
Permanently revokes an API key.
DELETE
/
v1
/
me
/
api-keys
/
{id}
curl -X DELETE "https://api.chatgrid.ai/v1/me/api-keys/ee112233-4455-6677-8899-aabbccddeeff" \
-H "Authorization: Bearer cgk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
{
"object": "api_key_revoked",
"data": {
"id": "ee112233-4455-6677-8899-aabbccddeeff",
"revoked": true
}
}
{
"object": "error",
"status": 404,
"code": "not_found",
"message": "API key not found or already revoked"
}
Requires the
admin scope.
Once revoked, the key is permanently unusable. This action cannot be undone.
If the key was already revoked, a 404 is returned.
curl -X DELETE "https://api.chatgrid.ai/v1/me/api-keys/ee112233-4455-6677-8899-aabbccddeeff" \
-H "Authorization: Bearer cgk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
{
"object": "api_key_revoked",
"data": {
"id": "ee112233-4455-6677-8899-aabbccddeeff",
"revoked": true
}
}
{
"object": "error",
"status": 404,
"code": "not_found",
"message": "API key not found or already revoked"
}