Skip to Content
Vatis TechAPI docs
API keys

Create a key

Makes an API key and shows it once.

Serverhttps://api.eu.vatis.tech

POST/v1/keys

Admin key only

A Member key gets 403 admin_only. Roles: Authentication and API keys.

Headers

Authorization (required)
An Admin key (Roles). A Member key gets 403 admin_only.
ValuesBearer <api key>

Body fields

application/json

name (required)string
One per application. No two active keys of a workspace share a name.
Values1 to 64 letters, digits, dots, dashes or underscores
rolestring
What the key may do (Roles).
Valuesadmin, memberDefaultmember
expires_onstring
The last UTC day the key works. Without it, the key has no end.
ValuesYYYY-MM-DD, or null

Response fields

id
key_ and 12 hex digits.
name
The key's name.
prefix
The key's first characters, to tell it apart.
role
admin or member (Roles).
state
active, expired or revoked.
created_at
When it was made: ISO 8601, UTC.
last_used_at
When it last made a request, or null: never used.
expires_at
When it stops: the start of the day after its last day, in UTC. null: no end.
revoked_at
When it was revoked, or null.
key
vatis_sk_...: the key. Hand it to its application through a channel you trust.
Whenonly in this answer

Responses

The key, shown only here. The answer has Cache-Control: no-store.

400 missing_parameter

No name.

A field that is unknown or not valid, a day that has passed, or a query parameter. The param names it.

400 invalid_request

A body that is not a JSON object.

No key, or a wrong, revoked or expired one.

403 admin_only

A Member key.

409 name_taken

An active key has that name. Revoke it first, or pick another name.

413 request_too_large

A JSON body over 64 KB.

503 unavailable

The service is busy for a moment. Send the request again after the seconds of the Retry-After header.

Notes

  • A lost key cannot be shown again: the API keeps only its hash and prefix. Make a new one and revoke the old one.
  • A new workspace has no keys: verify your email, then create the first one on the console's API keys page (API keys).