---
title: "Get an org unit"
method: GET
path: "/v2/org-units/{orgUnitId}"
tags: ["Org units"]
---

# Get an org unit

`GET /v2/org-units/{orgUnitId}`

## Request

- Base URL: `https://api.zenzap.co`
- URL: `https://api.zenzap.co/v2/org-units/{orgUnitId}`
- Auth: one of:
  - HTTP bearer and API key in header `X-Signature`
  - OAuth 2
    - Client credentials
    - Token URL: `https://api.zenzap.co/oauth/token` scopes: `org_unit:read`
- TypeScript: <https://skmtc.dev/zenzap/apis/zenzap-external-integration-api/docs/v2/org-units/:orgUnitId/get.ts> (a function with typed inputs; its response is checked against the schema)

Get a single org unit in your organization, including its member IDs.

**Note:** For security reasons, a 404 is returned both when the org unit does not exist
and when it belongs to a different organization.

**Org-unit restriction:** If your organization restricts communication to within org units,
your bot must be a member of the org unit; otherwise a 404 is returned. A bot that does not
belong to any org unit cannot access any of them (every org unit returns 404).

## Path parameters

- `orgUnitId` string, uuid, required

## Headers

- `X-Signature` string
- `X-Timestamp` integer

## Response `200`

Org unit retrieved successfully

- OrgUnit
  - `id` string, uuid: The org unit ID
  - `name` string: The org unit name
  - `tag` string: The org unit tag (unique within the organization, used for @mentions)
  - `type` 'Team' | 'Location': The org unit type
  - `memberIds` string[]: Member profile IDs in the org unit (bot members use the `b@<uuid>` form)
  - `createdAt` integer: Unix timestamp in milliseconds when the org unit was created
  - `updatedAt` integer: Unix timestamp in milliseconds when the org unit was last updated

## Other responses

- `401`: Unauthorized - invalid or missing API token
- `404`: Resource not found
- `500`: Internal server error

---

[API](https://skmtc.dev/zenzap/apis/zenzap-external-integration-api.md) - [All operations](https://skmtc.dev/zenzap/apis/zenzap-external-integration-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zenzap/apis/zenzap-external-integration-api/revisions/37faae2c2036?raw)
