---
title: "Revoke an API key"
description: "Companies and keys API"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.certinvo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Revoke an API key

{/* Generated by apps/docs/scripts/generate.ts from contracts/api/openapi.yaml. Do not edit. */}
<div class="cvo-op">
<div class="cvo-op-main">

<div class="cvo-op-header">
<div class="cvo-op-path-row">
<span class="cvo-method" data-method="post">POST</span>
<code class="cvo-op-path-code">/v1/keys/&#123;id&#125;/revoke</code>
</div>
</div>

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

## Response

A `200` answer carries these fields.

## 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. |

</div>
<div class="cvo-op-aside">

</div>
</div>

Source: https://docs.certinvo.com/reference/api/workspaces/revoke-an-api-key/index.mdx
