Create a team secret

​

Create a secret or var in one environment. A name the environment already holds answers 409 in create mode, and for any caller who is not a team admin; a team admin who sends no mode replaces its value.

OAuth scopes
  • platform:write

Body

required
application/json

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/v1/teams/secrets
curl https://access.scalar.com/v1/teams/secrets \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "environment": "production",
  "name": "ACME_API_KEY",
  "kind": "secret",
  "value": "example-secret-value",
  "mode": "create"
}'
{
  "uid": "string",
  "environment": "string",
  "name": "string",
  "kind": "secret",
  "value": "string",
  "fingerprint": "string",
  "createdAt": 1,
  "rotatedAt": 1,
  "createdBy": null,
  "rotatedBy": null
}