Skip to content
OpenAppPhysical access, fully managed
Login

Organizations (Orgs)

Endpoints under the Orgs tag manage organizations (tenants) the caller can access: list and CRUD, permissions for the current principal, org-scoped user listing, soft delete, and hard purge. Response bodies follow OrganizationResponse and related schemas in the API reference.

Relationship to org context: Choosing X-Org for device and integration routes is separate from these APIs — see Organization context & pagination. Use GET /orgs to discover org ids when the account spans multiple organizations.

ConcernHTTPoperationIdNotes
ListGET /orgslist_orgsRequires output_options and pagination query objects on the wire (see bundle).
CreatePOST /orgscreate_orgBody CreateOrganizationRequest (name required; optional description, parent_id). The server assigns the id; any other field is rejected with 422.
GetGET /orgs/{id}get_org
UpdatePUT /orgs/{id}update_orgPartial-style body per UpdateOrganizationRequest.
Soft deleteDELETE /orgs/{id}delete_org
Hard deleteDELETE /orgs/{id}/purgehard_delete_org
Caller permissionsGET /orgs/{id}/permissionsget_org_permissionsPermissions for the current user in that org. Returns an empty list (not an error) when the caller has no standing in the org, including when it does not exist.
Users in orgGET /orgs/{org_id}/userslist_org_usersRequires X-Org, output_options, pagination; optional recursive query.
CapabilityPythonRust (openapp_sdk)GoTypeScript (AsyncClient)
Listclient.orgs.list(...) — forwards output_options / pagination fields via the bridgeclient.orgs().list() — bare GET /orgs without required query objects; use transport() + RequestSpec for OpenAPI parityOrgsAPI.ListOrgs with full query builderslistOrgs — bare GET /orgs
Createclient.orgs.create(name=..., **extra)client.orgs().create(&json!)OrgsAPI.CreateOrgcreateOrg(name) — sends { name } only
Get / update / delete / purgeget, update, delete, purgeget, update, delete, purgeGenerated OrgsAPIgetOrg only — no update/delete helpers on façade
Permissionspermissions(org_id)permissions(id)GetOrgPermissionsNot on façade — use core transport or another SDK
List org usersusers(org_id, ...)users(org_id) — bare path; wire may require headers/queriesListOrgUsersNot on façade

Python additionally exposes upload_image / upload_image_from_url for POST /orgs/{id}/image (multipart) where your deployment exposes that route; see Python — Resources.

401 / 403 when the key cannot access the org.404 for unknown org ids.400 on create/update validation. Hard delete may fail when the server rejects purge preconditions. Shapes follow ApiErrorResponse — see Errors & retries.

client.orgs.list maps kwargs to the list_orgs query parameters (include_deleted, limit, cursor, …) expected by your deployment.

page = await client.orgs.list(limit=50)
org = await client.orgs.create(name="Field Office", parent_id="01HPARENT000000000000000000")

Get / update / delete / purge (/orgs/{id})

Section titled “Get / update / delete / purge (/orgs/{id})”

update_org accepts an UpdateOrganizationRequest (optional name as LocalizedString, description, parent_id). delete_org is reversible at the data layer; hard_delete_org removes the row irrecoverably.

org = await client.orgs.get(org_id)
updated = await client.orgs.update(org_id, name={"value": {"en": "Field Office (renamed)"}})
await client.orgs.delete(org_id)
await client.orgs.purge(org_id)

get_org_permissions returns the permissions held by the calling principal in that org (use it to drive UI gating). list_org_users enumerates members and accepts an optional recursive flag to include descendant orgs; the route requires X-Org plus output_options + pagination on the wire.

perms = await client.orgs.permissions(org_id)
members = await client.orgs.users(org_id, limit=50)

For recursive parity with list_org_users, send the request via AsyncClient._request with the explicit query key.