Creates a new API key for authenticating with the API.
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.
API key passed as Bearer token
OK
A URL to the JSON Schema for this object.
"https://api.strait.dev/schemas/CreateAPIKeyResponse.json"
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"
}