Unseal Space
REST APIEnvironment

Create a write-only Project Environment variable

POST
/v1/projects/{id}/environment
x-api-key<token>

Workspace-owned API key with per-resource permissions.

In: header

Path Parameters

id*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

name*string
Length1 <= length <= 128
value*string
Lengthlength <= 5120
kind?string
Default"secret"

Value in

  • "secret"
  • "plain"
preview*boolean
production*boolean

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/environment" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "value": "string",    "preview": true,    "production": true  }'
{  "variables": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "name": "string",      "kind": "secret",      "preview": true,      "production": true,      "purpose": "string",      "required": true,      "version": -9007199254740991,      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "preview": {    "revision": 0,    "appliedRevision": 0,    "stale": true  },  "production": {    "revision": 0,    "publishedRevision": 0,    "pending": true  }}