---
title: "List org units"
method: GET
path: "/v2/org-units"
tags: ["Org units"]
---

# List org units

`GET /v2/org-units`

## Request

- Base URL: `https://api.zenzap.co`
- URL: `https://api.zenzap.co/v2/org-units`
- 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/get.ts> (a function with typed inputs; its response is checked against the schema)

List the org units (teams / locations) in your organization, with their members.
Results are paginated.

**Org-unit restriction:** If your organization restricts communication to within org units,
only the org units your bot is a member of are returned.

## Query parameters

- `limit` integer
- `cursor` string

## Headers

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

## Response `200`

Org units retrieved successfully

- OrgUnitsListResponse
  - `orgUnits` 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
  - `nextCursor` string, nullable: Opaque cursor for the next page, or null when there are no more results
  - `hasMore` boolean: Whether more org units are available

## Other responses

- `401`: Unauthorized - invalid or missing API token
- `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)
