Skip to main content
POST
/
projects
/
{project_reference}
/
env-vars
Create Environment Variable
curl --request POST \
  --url https://api.veryfront.com/projects/{project_reference}/env-vars \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "key": "DATABASE_URL",
  "value": "postgresql://localhost:5432/mydb"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "key": "<string>",
  "value": "<string>"
}

Authorizations

Authorization
string
header
required

Authentication via JWT token or API key. JWT: Get from Veryfront dashboard. API Key: Format "vf__" - create via /api-keys endpoint.

Path Parameters

project_reference
string
required

Project ID or slug

Query Parameters

environment_id
string<uuid>
required

Environment ID to create the variable in

Body

application/json
key
string
required
Minimum string length: 1
value
string
required

Response

Environment variable created

id
string<uuid>
required
key
string
required
value
string
required