Skip to main content
PUT
/
v1
/
apps
/
{id}
/
envs
Update Application Environment
curl --request PUT \
  --url https://api.vertracloud.app/v1/apps/{id}/envs \
  --header 'Content-Type: application/json' \
  --data '
{
  "environment": {}
}
'
{
  "response": [
    {
      "id": "env123",
      "key": "API_KEY",
      "value": "newsecret456",
      "note": "Updated API key for external service",
      "created_at": "2026-03-14T19:58:00Z"
    },
    {
      "id": "env456",
      "key": "DATABASE_URL",
      "value": "mysql://user:pass@localhost/db",
      "note": null,
      "created_at": "2026-03-14T19:58:00Z"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.vertracloud.app/llms.txt

Use this file to discover all available pages before exploring further.

id
string
required
The ID of the application to update the environment variable for. If the application belongs to a workspace, include the workspace_id in the format appId-workspace_id.
environment
object
required
The environment variable to update.

Response

response
array
An array of all environment variable objects after the update.
{
  "response": [
    {
      "id": "env123",
      "key": "API_KEY",
      "value": "newsecret456",
      "note": "Updated API key for external service",
      "created_at": "2026-03-14T19:58:00Z"
    },
    {
      "id": "env456",
      "key": "DATABASE_URL",
      "value": "mysql://user:pass@localhost/db",
      "note": null,
      "created_at": "2026-03-14T19:58:00Z"
    }
  ]
}

Error Responses

code
string
The error code indicating the reason for failure. Possible values:
  • UNAUTHORIZED: The user is not authenticated or lacks sufficient permissions.
  • FORBIDDEN: The user does not have permission to access the application.
  • APP_NOT_FOUND: The specified application does not exist.
  • INVALID_ENVIRONMENT: The provided environment variable is invalid or uses a forbidden key.
  • ENV_VARIABLE_TOO_LONG: The environment variable key or value exceeds length limits.
  • ENVIRONMENT_NOT_FOUND: The specified environment variable ID was not found.
message
string
A descriptive message providing additional details about the error.
{
  "code": "UNAUTHORIZED"
}