/api_keys/{key_id}Revoke API keyRevokes the specified API key. An API key that is no longer needed can be revoked. This action cannot be reversed. API keys can also be managed in the Neon Console. See Manage API keys.
Parameters
key_idinteger · int64pathrequiredThe API key ID
Responses
created_atstring · date-timerequiredA timestamp indicating when the API key was created
created_bystring · uuidrequiredID of the user who created this API key
idinteger · int64requiredThe API key's unique numeric ID. Distinct from the API key token (`key`).
last_used_atnull | string · date-timeA timestamp indicating when the API was last used
last_used_from_addrstringrequiredThe IP address from which the API key was last used
namestringrequiredThe user-specified API key name
revokedbooleanrequiredA `true` or `false` value indicating whether the API key is revoked
{
"created_at": "2022-11-15T20:13:35Z",
"created_by": "629982cc-de05-43db-ae16-28f2399c4910",
"id": 165435,
"last_used_at": "2022-11-15T20:15:04Z",
"last_used_from_addr": "192.0.2.255",
"name": "mykey",
"revoked": true
}codestringrequiredmessagestringrequiredError message
request_idstringUnique identifier for the request, useful for debugging. You can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.
{
"code": "",
"message": "string",
"request_id": "string"
}