Skip to main content
POST
/
api-keys
Create API key
curl --request POST \
  --url https://management-api.fpjs.io/api-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-API-Version: <x-api-version>' \
  --data '
{
  "type": "public",
  "name": "<string>",
  "description": "<string>",
  "environment": "<string>"
}
'
{
  "data": {
    "id": "tok_No3jUysGLCDuqB3RnCVf1weo",
    "name": "My Public Key",
    "status": "enabled",
    "environment": "ae_rrETjdWcfqI6AFsk",
    "type": "public",
    "rateLimit": 5,
    "createdAt": "2024-05-31T01:24:39.506Z",
    "description": "Description for my public key",
    "token": "eWDrrpGGLjDQW0LBA0Wj",
    "disabledAt": null
  }
}

Authorizations

Authorization
string
header
required

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

Headers

X-API-Version
string
required

Management API version.

Body

application/json
type
enum<string>
required

Type of an API key.

Available options:
public,
secret,
proxy
name
string
required

Name of an API key.

Required string length: 3 - 255
description
string

Description for an API key.

Required string length: 3 - 255
environment
string

Environment in which to create an API key. If omitted for proxy or secret API keys, the key will be scoped to the workspace. If omitted for other types of keys, the API key will be created in the default environment.

Response

Created API key object.

data
object
required