Environment

environment.exposed

An environment was turned into a public encrypted feed.

When it fires

After the exposure flag is flipped on and the write succeeds, from the dashboard toggle (SetEnvironmentExposed) or from v1 API POST /projects/{slug}/environments/{environmentSlug}/expose with { "exposed": true }.

Two conditions have to hold first, so this event never fires without them:

  • The workspace has Virtual Envs enabled.
  • The environment's product is not private.

Payload

ts
{
    type: 'environment.exposed',
    data: {
        environment: {
            id: string
            name: string
            slug: string
            projectId: string
            exposed: true
            updatedAt: string  // ISO timestamp
        }
    }
}

Example

json
{
    "type": "environment.exposed",
    "data": {
        "environment": {
            "id": "0192a1b2-c3d4-7000-8000-000000000020",
            "name": "production",
            "slug": "production",
            "projectId": "0192a1b2-c3d4-7000-8000-000000000010",
            "exposed": true,
            "updatedAt": "2026-05-31T12:00:00.000Z"
        }
    }
}

This is a good event to alert on. From here the environment's encrypted variables are readable at a public URL by anyone who has it, and only the passphrase stands between that ciphertext and the plaintext.