apikey

Create an API key

Create a new API key for the user. Requires a user authentication (not API key).

The response carries the key's value, and it is the only time it is ever shown: only a hash of it is stored. Keys that can write are part of every paid plan; a workspace on the free plan can create read-only keys.

post/apikey/

Request

  • Base URL: https://api.getoneprofile.ai (the document declares no server; this is the origin it was published from)
  • URL: https://api.getoneprofile.ai/apikey/
  • Auth: one of:
    • API key in header X-API-Key
    • HTTP bearer

Request body

expire_atstring date-time nullable

The date and time when the API key will expire. If not provided, the API key will never expire.

namestring required

The unique name of the API key.

scope'read' | 'write'

What a key may do.

Two values, not a permission matrix. The thing worth stopping is a write nobody watched: a leaked read key exposes what the dashboard already shows the holder, a leaked write key spends credits and sends mail. A free workspace may only mint READ.

Response

Successful Response

created_atstring date-time required
expire_atstring date-time nullable
idstring uuid required
keystring required

The key's value. Shown here and nowhere else, ever: only a hash is stored. Copy it now; a lost key has to be replaced.

key_prefixstring required

The first characters of the key's value, so it can be told apart from another in a list. The value itself is shown once, when the key is created, and is not recoverable afterwards.

last_used_atstring date-time nullable

When this key last authenticated a request, to the minute.

namestring required
org_idstring required
scope'read' | 'write' required

What a key may do.

Two values, not a permission matrix. The thing worth stopping is a write nobody watched: a leaked read key exposes what the dashboard already shows the holder, a leaked write key spends credits and sends mail. A free workspace may only mint READ.

updated_atstring date-time required

Changes

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