v1

latestOpenAPI 3.0.0Apache 2.02026-07-13161564.6 KB
Keys

Create a API key

post/v1/key

Request body

namestring required

The name of the key

expiresAt'1-day' | '7-days' | '30-days' | '60-days' | '90-days' | '180-days' | '1-year' | 'never' required

The expiration date of the key

Example request

{
  "name": "My New Key",
  "expiresAt": "90-days"
}

Response

Create a key

idstring required

The id of the key

namestring required

The name of the key

workspaceIdstring required

The id of the workspace

lastAccessstring

The last time the key was used

expiresAtstring required

The expiration date of the key

Example response

{
  "id": "key_4VjHrJoEwAFC6itz8oUBW9NW2bia",
  "name": "My New Key",
  "workspaceId": "ws_4VjHrJoEwAFC6itz8oUBW9NW2bia",
  "lastAccess": "2024-07-23 12:41:45.38215",
  "expiresAt": "2024-07-23 12:41:45.38215"
}