---
title: TypeScript runtime context
description: Read scoped runtime context for org, workspace, environment, and request identity.
section: SDK
sidebarLabel: TypeScript / Runtime context
order: 110
updated: "2026-06-11"
status: beta
llms: true
keywords:
  - TypeScript
  - runtime context
  - env
  - request scope
---

Runtime context tells app code which organization, workspace, environment, and request scope it is handling.

## Read context

```ts
import { getContext } from '@app-builder-platform/relpin-sdk/runtime'

const context = getContext()
```

The context can include:

- `env`
- `orgId`
- `workspaceId`
- `capsuleId`
- `deploymentId`
- `requestId`
- `containerMode`

## Prefer request scope

For request handlers, pass or resolve context per request. Avoid relying on process-wide assumptions when the route can receive multiple tenants or environments over time.

## Environment fallback

The SDK can read scoped values from environment bindings when no request context is available. That is a fallback for controlled runtime wrappers, not a browser contract.
