Skip to main content
POST
/
api
/
secrets
Create a secret
curl --request POST \
  --url https://operator.io/api/secrets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "GITHUB_TOKEN",
  "value": "ghp_...",
  "isGlobal": false
}
'
{
  "secret": {
    "id": "<string>",
    "name": "<string>",
    "description": "<string>",
    "isGlobal": true,
    "createdAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

API key (ck_live_...). Create one in Settings > API Keys.

Body

application/json
name
string
required

Environment variable name (e.g. GITHUB_TOKEN).

value
string
required

The secret value.

description
string
isGlobal
boolean

If true, automatically granted to all instances.

Response

201 - application/json

Created.

secret
object