Environment variables

Create environment variable

Keys must start with a letter or underscore and contain only letters, digits, and underscores, and are unique per environment. Values are encrypted at rest. A fork can override any inherited key that is not locked.

post/v1/environments/{environment_id}/variables

Request

  • Base URL
    https://api.replicas.dev
  • URL
    https://api.replicas.dev/v1/environments/{environment_id}/variables
  • Auth
    HTTP bearer

Path parameters

environment_idstring required

Environment UUID.

Headers

X-Replicas-Api-Version'2026-10-07'

API version. 2026-10-07 returns snake_case responses. See versioning.

Request body

keystring required

Variable name

valuestring required

Variable value (encrypted at rest)

lockedboolean

Blocks environments that inherit this variable from overriding it. Defaults to false. Admin only on team environments.

Response

Variable created

Changes

No recorded changes to this operation across all 1 revision of this API.