Narrow a running sandbox

Replaces the sandbox's own rules, its policy, or both, with ones that allow no more than now.

POST/v1/bindings/{sandbox_id}/narrow

Replaces the sandbox's own rules, its policy, or both, with ones that allow no more than now. A change that would allow anything the sandbox cannot reach now is invalid: widening a running sandbox is a policy change, made by a person.

A key with the permissions:write scope.

Request

curl -X POST "https://api.pod.mapier.ai/v1/bindings/example/narrow?project=example" \
  -H "Authorization: Bearer $POD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"base_version":1}'

Parameters

NameInTypeRequiredWhat it is
sandbox_idpathstringYes
projectquerystringYesThe project the call is about. Every route is scoped to one.
Pod-OrganisationheaderstringNoThe organization, for a person who belongs to several. An API key's organization is its own, and a different one here is forbidden.
Idempotency-KeyheaderstringNoMakes a repeat of this call safe for 24 hours.

Body

FieldTypeRequiredWhat it is
base_versionintegerYesAt least 1.
policystringNoA policy whose table lists the current one among those it narrows.
rulesstringNoThe sandbox layer's new rules, which allow no more than the current ones.

Answer

200. The binding at its new version.

200
{
  "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
}
FieldTypeAlwaysWhat it is
sandboxstringYes
policystring | nullYesThe policy; null for the project's default, for a sandbox with no policy.
sandbox_rulesstringYesThe sandbox layer's rules, empty when there are none.
versionintegerYesThe binding's version. Only goes up. At least 1.
table_hashstring | nullYesThe hash of the compiled table the sandbox should run; null until compiled.
applied_versioninteger | nullYesThe binding version the sandbox's server reports applied; null until it reports one.
parentstring | nullYesThe sandbox it was made from, for a child; null otherwise.
bound_atstringYesRFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z.
updated_atstringYesRFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z.
updated_bystringYesWho made a change. An identity account id for a person, or a key id (key_…) for an API key.
personstring | nullNoThe identity account the sandbox acts for: the person who made it, or a child's parent's person. Null for a sandbox made with a key.
groupsAppliedGroup[]NoThe group bindings that add their policy's rules to this sandbox's table now: the person's groups, as the directory holds them, that the project binds to a policy.
matterstring | nullNoThe client matter the sandbox was opened for; null for none. Set once.
clearedboolean | nullNoFor a sandbox on a matter, whether its person is cleared for the matter now; while false its table allows nothing. Null for a sandbox on no matter.

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.