API ReferenceApi keys
Revoke an API key
Revoke an API key. Answers { success: true } with no data key. 404 if the key does not exist under this project.
Requires the api-keys:write scope — Create, rotate, and revoke API keys — these keep working even after you disconnect this app.
better-auth.session_token<token>
BetterAuth session cookie. Used by the dashboard / browser clients. When present, the active project is taken from the x-project-id header.
In: cookie
Path Parameters
id*string
Project id.
keyId*string
API key id.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/api/projects/string/api-keys/string"{
"success": true
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}