Skip to main content
POST
/
secret_keys
Create secret key
curl --request POST \
  --url https://api.lava.so/v1/secret_keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Production API Key"
}
'
{
  "secret_key_id": "<string>",
  "name": "<string>",
  "secret_key_hint": "<string>",
  "secret_key": "<string>",
  "created_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer token authentication used for standard API calls. Format: 'Bearer YOUR_API_KEY'

Body

application/json
name
string
required

Display name for the secret key

Example:

"Production API Key"

Response

Secret key created (includes full secret_key — only returned once)

Secret key with full key value. The secret_key is only returned once on creation.

secret_key_id
string
required

Unique identifier for the secret key

name
string
required

Display name of the secret key

secret_key_hint
string
required

Last 4 characters of the secret key

secret_key
string
required

Full secret key value. Only returned once on creation — store it securely.

created_at
string<date-time>
required

When the secret key was created