Skip to main content
POST
/
v1
/
vaults
/
{vault_id}
/
api-keys
Create Api Key Endpoint
curl --request POST \
  --url https://api.ontora.com/v1/vaults/{vault_id}/api-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "expires_in_days": 183
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "vault_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "key_prefix": "<string>",
  "expires_at": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z",
  "key": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.ontora.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

vault_id
string<uuid>
required

Body

application/json
name
string
required

Display name for the API key

Maximum string length: 255
expires_in_days
integer | null

Days until expiration (None = never expires)

Required range: 1 <= x <= 365

Response

Successful Response

API key output on creation (includes full key - only shown once).

id
string<uuid>
required
vault_id
string<uuid>
required
name
string
required
key_prefix
string
required
expires_at
string<date-time> | null
required
created_at
string<date-time>
required
key
string
required

Full API key - save this, it won't be shown again!