Create a new environment variable for a project
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>"
}
'API key starting with sk_case_
Project ID
Environment variable name
Environment variable value
Deployment targets for this variable
production, preview, development Variable type
plain, encrypted, secret Specific git branch (for preview deployments)
Success
Was this page helpful?
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>"
}
'