POST
/
console
/
v1
/
keys
curl --request POST \
  --url https://statsigapi.net/console/v1/keys \
  --header 'Content-Type: application/json' \
  --header 'STATSIG-API-KEY: <api-key>' \
  --data '{
  "description": "<string>",
  "type": "SERVER",
  "scopes": [
    "omni_read_only"
  ],
  "environments": [
    "<string>"
  ],
  "targetAppID": "<string>",
  "secondaryTargetAppIDs": [
    "<string>"
  ]
}'
{
  "message": "Key created successfully.",
  "data": {
    "key": "secret-123",
    "type": "SERVER",
    "description": "Server secret key",
    "scopes": [],
    "environments": [
      "production"
    ],
    "primaryTargetApp": "primaryApp",
    "secondaryTargetApps": [
      "secondaryApp"
    ],
    "status": "active"
  }
}

Authorizations

STATSIG-API-KEY
string
header
required

Headers

x-respect-review-settings
string

Optional header to respect review settings for mutation endpoints.

Body

application/json

Response

200
application/json

Key created successfully

The response is of type object.