API keys

Create an API key

Mint a key for this workspace. The key itself is returned once; only its hash is stored. expiresAt makes it stop working at an instant (a key for a contractor or a one-off script); it stays listed until revoked.

post/v1/api-keys

Request

  • Base URL: https://api.mentio.dev
  • URL: https://api.mentio.dev/v1/api-keys
  • Auth: HTTP bearer

Request body

namestring

A label for the key; "default" when omitted.

scope'read' | 'write'

read: GET only. write: everything.

expiresAtstring date-time

When the key stops working (ISO 8601, or epoch ms), for a key handed to a script or a contractor. Must be in the future. Omit or null for a key that never expires.

Response

The new key, shown once

idstring required

Key id (key_...).

namestring required
prefixstring required

The first characters of the key, to tell keys apart.

scope'read' | 'write' required

read: GET only. write: everything.

createdAtstring required

ISO 8601 timestamp, UTC.

lastUsedAtstring nullable required

ISO 8601 timestamp, UTC.

expiresAtstring nullable required

When the key stops working; null for a key that never expires. An expired key stays listed until revoked.

keystring required

The full key. Shown once; store it now.

Changes

No recorded changes to this operation across all 1 revision of this API.