POST
/
api
/
v1
/
projects
/
{project_id}
/
vars
Create a project environment variable
curl --request POST \
  --url https://app.miget.com/api/v1/projects/{project_id}/vars \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "key": "<string>",
  "value": "<string>"
}
'

Authorizations

Authorization
string
header
required

Bearer token for authentication. Format: 'Bearer {token}'

Headers

X-Workspace-Id
string

Workspace ID (uses default workspace if not provided)

Path Parameters

project_id
string
required

Project ID or UUID

Body

application/json

Create a project environment variable

key
string
required

Variable name (e.g., DATABASE_URL, API_KEY). Use SCREAMING_SNAKE_CASE.

value
string
required

Variable value. Sensitive data will be encrypted at rest.

Response

Create a project environment variable