# Change port access

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

Change the access policy for an exposed port.

PUT /public/sandboxes/:sandboxId/ports/:port/share
Permission: MACHINE_UPDATE.
Use org for organization-scoped credentials or public for unauthenticated access.
Request body: {"policy":"public"}
Response: The updated port exposure.

Example:

```
curl -X PUT https://api.zei.sh/api/v1/public/sandboxes/:sandboxId/ports/:port/share \
  -H "X-API-Key: $ZEISH_API_KEY"
  -H "Content-Type: application/json" \
  -d '{"policy":"public"}'
```
