Environment

environment.unexposed

Public exposure was turned off for an environment.

When it fires

Three paths lead here:

  • The dashboard toggle (SetEnvironmentExposed) turns exposure off.
  • v1 API POST /projects/{slug}/environments/{environmentSlug}/expose with { "exposed": false }.
  • The workspace turns Virtual Envs off (SetVirtualEnvs), which unexposes every environment that was exposed at that moment and emits one event per environment.

Payload

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

Example

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

On the workspace-wide path the events are emitted per environment and are not ordered. A failure to record one of them is logged and does not fail the request that disabled Virtual Envs.