Bind a policy to a new sandbox
Names the policy a sandbox about to be made runs under, with rules for that one sandbox.
Names the policy a sandbox about to be made runs under, with rules for that one sandbox. Pod's front door calls this during a create that names a policy or carries rules from a spec file, made by a person or with a project key, and passes on that caller's own credentials, so the callers below are the create's; the server must hold the compiled table before the sandbox runs anything. policy: null is the project's default. Rules for the sandbox are cut to the ceiling, and the answer says what was cut. A sandbox already bound in this project is conflict. Only attaching a policy closes the network. A sandbox id proves nothing by itself, and only the front door's registry knows the sandbox being made is in the caller's project. So only Pod's front door makes this call, while it creates a sandbox: a call you send yourself is forbidden. A sandbox bound in another project or organization is not_found, the same answer as for any sandbox this project does not have. A create made with a key issued inside a sandbox never reaches this route: that key is refused here like everywhere in this API. The front door binds such a child itself, and binds only the parent's policy or one whose table lists the parent's among those it narrows, never none and never the project's default.
A key with the permissions:write scope.
Request
curl -X POST "https://api.pod.mapier.ai/v1/bindings?project=example" \
-H "Authorization: Bearer $POD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"sandbox":"example","policy":"example"}'Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
project | query | string | Yes | The project the call is about. Every route is scoped to one. |
Pod-Organisation | header | string | No | The organization, for a person who belongs to several. An API key's organization is its own, and a different one here is forbidden. |
Idempotency-Key | header | string | No | Makes a repeat of this call safe for 24 hours. |
Body
| Field | Type | Required | What it is |
|---|---|---|---|
sandbox | string | Yes | |
policy | string | null | Yes | The policy; null for the project's default. |
rules | string | No | Rules for this sandbox alone, from a create call or a spec file. Cut to the ceiling. |
parent | string | No | For a child, the sandbox it is made from. The child gets its parent's policy or a narrower one. |
matter | string | No | The person it acts for must be cleared for the matter, or the call answers forbidden and the refusal is written to the matter's log; a sandbox made with a key acts for nobody and is never cleared. A child stays on its parent's matter. |
Answer
201. The binding, and what was cut to the ceiling.
{
"binding": {
"sandbox": "example",
"policy": null,
"sandbox_rules": "example",
"version": 1,
"table_hash": null,
"applied_version": null,
"parent": null,
"bound_at": "2026-11-23T12:00:00.000Z",
"updated_at": "2026-11-23T12:00:00.000Z",
"updated_by": "example",
"person": null,
"groups": [
{
"group_policy": "example",
"group": "example",
"group_name": "example",
"policy": "example"
}
],
"matter": null,
"cleared": null
},
"cut": [
{
"line": 1,
"rule": "example",
"reason": "example",
"group": {
"group_policy": "example",
"group": "example",
"group_name": "example",
"policy": "example"
},
"matter": "example",
"wall": false
}
]
}| Field | Type | Always | What it is |
|---|---|---|---|
binding | Binding | Yes | The policy one sandbox runs under, and its rules for that sandbox alone. |
cut | CutRule[] | Yes |
Errors
The refusals this call is known for: invalid, unauthorized, forbidden, not_found, conflict. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.