provider sandbox-environmentssandbox_environments POST /api/projects/{project_id}/sandbox_environments/
@utdk/posthog /api/projects/{project_id}/sandbox_environments/
sandbox_create
API for managing sandbox environments that control network access for task runs.
project_id path required
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
string

Try it

Authentication
Configure credentials for PostHog API
sandboxCreate
POST/api/projects/{project_id}/sandbox_environments/
API for managing sandbox environments that control network access for task runs.

Parameters

required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Input

required

Display name for the environment.

Network access policy: trusted (default allowlist), full (unrestricted), or custom. * `trusted` - Trusted * `full` - Full * `custom` - Custom

Allowed domains for custom network access.

Whether to include default trusted domains (GitHub, npm, PyPI).

Repositories this environment applies to (format: org/repo).

Encrypted environment variables (write-only, never returned in responses).

If true, only the creator can see this environment; otherwise the whole team can.

Custom base image for this environment's sandboxes (Modal VM runtime only); null uses the default base.

Configure credentials above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import posthog from '@utdk/posthog';

await posthog.sandboxCreate({
  "network_access_level": "full",
  "include_default_domains": false,
  "private": true
})