Skip to content

API reference

Create an API key

Companies and keys API

POST/v1/keys

Mints one API key for the company of the signed-in person, and returns it with the secret.

The secret is in this response and nowhere else. It is never stored, so it cannot be read back, shown again or recovered by support. Save it when you receive it.

The request chooses only the name. The company comes from the session, and the environment is that company’s own: a Sandbox session mints a cvo_test_… key and a Live session mints a cvo_live_… key.

Only a signed-in person may call this. An API key is refused with 401 session_required, because a key that could mint a key could outlive its own revocation.

The person must have signed in within the last 10 minutes, as the session’s auth_time says. An older sign-in is refused with 401 reauthentication_required; the console then asks them to sign in again. Listing and revoking keys need no fresh sign-in.

Request body

application/json, required

  • namestringRequired

    What this key is called in the console and in a support request, for example "Beispiel ERP".

Response

A 201 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.

  • keystringRequired

    The whole secret, for example cvo_live_sk_…. Shown once.

Status codes

Status Meaning
201 The key, with its secret. The secret is not returned again by any route.
400 The name is missing, empty or longer than 60 characters (invalid_key). Nothing was minted.
401 No usable credential was sent (invalid_credentials), an API key was used where only a signed-in person may act (session_required), or the sign-in is more than 10 minutes old (reauthentication_required). Nothing was minted.
503 This deployment is not configured to verify API keys, so it does not issue them (no_database).
POST/v1/keys
Example
curl -X POST https://api.certinvo.com/v1/keys \
  -H "Authorization: Bearer $CERTINVO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @body.json
import { readFile } from 'node:fs/promises'

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

import requests

response = requests.post(
    "https://api.certinvo.com/v1/keys",
    headers={"Authorization": f"Bearer {os.environ['CERTINVO_API_KEY']}", "Content-Type": "application/json"},
    data=open("body.json", "rb"),
)
print(response.status_code, response.text)
201
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",
  "key": "string"
}
Success response
POST
/v1/keys
Create an API key
All
›AuthenticationRequiredBearerAuth

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

›Headers2
›Bodyapplication/json
›Code Snippet
curl -X POST "https://api.certinvo.com/v1/keys" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string"
}...'
Response

No request sent yet

Configure parameters and click Send to view the response.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close