Skip to main content
POST
/
auth
/
api-keys
Create Api Key
curl --request POST \
  --url http://localhost:8000/auth/api-keys \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "scopes": [
    "<string>"
  ]
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "api_key": "<string>",
  "key_prefix": "<string>",
  "created_at": "2023-11-07T05:31:56Z"
}

Headers

authorization
string | null
x-api-key
string | null
x-tenant-id
string | null

Cookies

factio_access_token
string | null

Body

application/json
name
string
required

Human-readable name for the API key

Required string length: 1 - 255
scopes
string[] | null

Optional list of scopes/permissions

Response

Successful Response

id
string<uuid>
required

API key ID

name
string
required

API key name

api_key
string
required

API key value (shown only once)

key_prefix
string
required

Key prefix for identification

created_at
string<date-time>
required

Creation timestamp