Skip to main content
POST
/
v1
/
api-keys
Create an API key
curl --request POST \
  --url https://api.strait.dev/v1/api-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "project_id": "<string>",
  "environment_id": "<string>",
  "expires_in_days": 123,
  "org_id": "<string>",
  "rotation_interval_days": 123,
  "scopes": [
    "<string>"
  ]
}
'
{
  "created_at": "2023-11-07T05:31:56Z",
  "id": "<string>",
  "key": "<string>",
  "key_prefix": "<string>",
  "name": "<string>",
  "project_id": "<string>",
  "scopes": [
    "<string>"
  ],
  "$schema": "<string>",
  "expires_at": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.strait.dev/llms.txt

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

Authorizations

Authorization
string
header
required

API key passed as Bearer token

Body

application/json
name
string
required
project_id
string
required
environment_id
string
expires_in_days
integer<int64>
org_id
string
rotation_interval_days
integer<int64>
scopes
string[] | null

Response

OK

created_at
string<date-time>
required
id
string
required
key
string
required
key_prefix
string
required
name
string
required
project_id
string
required
scopes
string[] | null
required
$schema
string<uri>
read-only

A URL to the JSON Schema for this object.

Example:

"https://api.strait.dev/schemas/CreateAPIKeyResponse.json"

expires_at
string<date-time>