Skip to main content
POST
/
applications
/
v1
/
projects
/
{id}
/
env
Create environment variable
curl --request POST \
  --url https://api.case.dev/applications/v1/projects/{id}/env \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "key": "<string>",
  "value": "<string>",
  "target": [
    "production"
  ],
  "type": "encrypted",
  "gitBranch": "<string>"
}
'

Authorizations

Authorization
string
header
required

API key starting with sk_case_

Path Parameters

id
string
required

Project ID

Body

application/json
key
string
required

Environment variable name

value
string
required

Environment variable value

target
enum<string>[]
required

Deployment targets for this variable

Available options:
production,
preview,
development
type
enum<string>
default:encrypted

Variable type

Available options:
plain,
encrypted,
secret
gitBranch
string

Specific git branch (for preview deployments)

Response

Success