Skip to content

Create the autonomy zone on an org unit

POST/api/public/v1/org-units/{unit_id}/zone

The layer starts EMPTY and inherits everything above it — a layer only ever adds. An optional body {agent_ids} pins those agents to the new zone by hand in the same transaction (at most 5 000; an id that is not an agent of this organization answers 404 AGENT_NOT_FOUND). The bare call, with no body, stays valid. 409 ZONE_EXISTS when the unit already carries one.

Terminal window
curl --fail-with-body -X POST 'https://app.openlatch.ai/api/public/v1/org-units/<unit_id>/zone' \
-H "Authorization: Bearer $OPENLATCH_API_KEY"
Role in the organizationThis endpoint
ownerAllowed
adminAllowed
editorNot allowed
viewerNot allowed

A key carries the role its owner holds in the organization. See Authentication.

API key scope: zones:write

ParameterTypeDescription
unit_idstring (uuid)Required.
ParameterTypeDescription
Idempotency-Keystring or nullOptional. Makes the request safe to retry: the same key and the same request, within 24 hours, returns the stored response with Idempotent-Replayed: true and runs once.
FieldTypeDescription
agent_idsarray of string or nullAgents pinned to the new zone by hand in the same transaction (at most 5 000; an id that is not an agent of this organization answers 404 AGENT_NOT_FOUND).
FieldTypeDescription
idstringRequired.
is_defaultboolean
is_rootbooleanRequired.
org_unit_idstringRequired.
revisionintegerRequired.
{
"id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"is_default": false,
"is_root": false,
"org_unit_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"revision": 3
}