# Add a sandbox port

Collection: api
Human docs: https://zei.sh/docs/api

Expose a TCP or UDP port from a sandbox.

POST /public/sandboxes/:sandboxId/ports
Permission: MACHINE_UPDATE.
Declare raw L4 ingress with an internal port and optional external port and access policy.
Request body: {"internalPort":3000,"externalPort":3000,"protocol":"tcp","accessPolicy":"org"}
Response: The created port exposure.
Ports must be between 1 and 65535. Access policy is org or public.

Example:

```
curl -X POST https://api.zei.sh/api/v1/public/sandboxes/:sandboxId/ports \
  -H "X-API-Key: $ZEISH_API_KEY"
  -H "Content-Type: application/json" \
  -d '{"internalPort":3000,"externalPort":3000,"protocol":"tcp","accessPolicy":"org"}'
```
