Revoke an API key
DELETE
/api-keys/{id}
const url = 'https://api.vaartix.com/api-keys/key_02qa6ntf6p3nd3ng';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.vaartix.com/api-keys/key_02qa6ntf6p3nd3ng \ --header 'Authorization: Bearer <token>'The key stops working immediately.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Example
key_02qa6ntf6p3nd3ngResponses
Section titled “Responses”Revoked.
unauthorized: the API key is missing, invalid or revoked.
Media typeapplication/json
object
error
required
object
type
required
Stable, machine-readable error type.
string
message
required
Human-readable explanation, safe to show to developers.
string
Example
{ "error": { "type": "validation_error" }}forbidden: the key cannot do this, for example a send-only key on a management endpoint.
Media typeapplication/json
object
error
required
object
type
required
Stable, machine-readable error type.
string
message
required
Human-readable explanation, safe to show to developers.
string
Example
{ "error": { "type": "validation_error" }}not_found: no such resource in your team.
Media typeapplication/json
object
error
required
object
type
required
Stable, machine-readable error type.
string
message
required
Human-readable explanation, safe to show to developers.
string
Example
{ "error": { "type": "validation_error" }}