Skip to content

API reference

Revoke an API key

Companies and keys API

POST/v1/keys/{id}/revoke

Revokes one key. The next request that uses the key is refused with 401.

Calling it again returns the same key with the same revokedAt and changes nothing.

The key is not deleted. It stays in GET /v1/keys with revokedAt set, and the signed-in person who revoked it is recorded. This route does not touch expiresAt.

Only a signed-in person may call this.

Path parameters

  • idstring (uuid)Required

Response

A 200 answer carries these fields.

  • idstring (uuid)Required
  • namestringRequired

    The display name, for example "Beispiel ERP".

  • prefixstringRequired

    The twelve-character lookup prefix. It tells keys apart but cannot be used as a key.

  • environmentstringRequired
    One of sandbox, live.
  • createdAtstring (date-time)Required
  • lastUsedAtstring (date-time) or nullRequired

    Updated on every successful use. Null means the key was never used.

  • expiresAtstring (date-time) or nullRequired

    A planned expiry date. Not set by anything yet.

  • revokedAtstring (date-time) or nullRequired

    When the key was revoked. A revoked key is refused, and its record is kept.

Status codes

Status Meaning
200 The key as it is now, with revokedAt set.
401 No usable credential was sent (invalid_credentials), or an API key was used (session_required).
404 No such key exists for this company (unknown_key). The same answer is given for another company’s key, a key that never existed, or an invalid id. This API never returns 403 here.
POST/v1/keys/{id}/revoke
Example
curl -X POST https://api.certinvo.com/v1/keys/$KEY_ID/revoke \
  -H "Authorization: Bearer $CERTINVO_API_KEY"
const keyId = '3f0c2a5e-8d1b-4c7a-9e2f-6b5d4a3c2b1a'

const response = await fetch(`https://api.certinvo.com/v1/keys/${keyId}/revoke`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.CERTINVO_API_KEY}`,
  },
})
console.log(response.status, await response.json())
import os

import requests

key_id = "3f0c2a5e-8d1b-4c7a-9e2f-6b5d4a3c2b1a"

response = requests.post(
    f"https://api.certinvo.com/v1/keys/{key_id}/revoke",
    headers={"Authorization": f"Bearer {os.environ['CERTINVO_API_KEY']}"},
)
print(response.status_code, response.text)
200
application/json
{
  "id": "3f0c2a5e-8d1b-4c7a-9e2f-6b5d4a3c2b1a",
  "name": "string",
  "prefix": "string",
  "environment": "sandbox",
  "createdAt": "2026-09-17T09:30:00Z",
  "lastUsedAt": "2026-09-17T09:30:00Z",
  "expiresAt": "2026-09-17T09:30:00Z",
  "revokedAt": "2026-09-17T09:30:00Z"
}
Success response
POST
/v1/keys/{id}/revoke
Revoke an API key
All
›AuthenticationRequiredBearerAuth

Provide your API key in the Authorization: Bearer <key> header. Keys are stored locally in your browser.

›Variables1
›Headers2
›Body
›Code Snippet
curl -X POST "https://api.certinvo.com/v1/keys/{id}/revoke" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
Response

No request sent yet

Configure parameters and click Send to view the response.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close