Deel: Return list of groups
Deel groups.getGroups: arguments, response, policy and SDK examples.
← Groups operations · Get started
Operation deel.groups_getgroups
Provider route: GET /groups. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/deel with npm, or alter-sdk-deel with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { DeelIntegration } from "@alter-ai/deel";
async function execute(input: Parameters<DeelIntegration["groups"]["getGroups"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new DeelIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.groups.getGroups(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_deel import DeelIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = DeelIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.groups.get_groups(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
query | object | Optional | Additional keys: not allowed |
query.limit | integer | Optional | Default: 100 Maximum: 100 Minimum: 1 |
query.sort_order | string | Optional | Default: ASC One of: ASC, DESC |
query.cursor | string | Optional | |
query.include_archived_groups | boolean | Optional | Default: true |
query.external_metadata | string | Optional |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Return list of groups — 200 response body |
Referenced models: Return list of groups — 200 response body
Schemas
Section titled “Schemas”Return list of groups — 200 response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | array | Optional | |
data[] | Model | Each item | Expand Return list of groups — 200 response body — data item |
page | Model | Optional | Expand Return list of groups — 200 response body — page |
Referenced models: Return list of groups — 200 response body — data item, Return list of groups — 200 response body — page
Return list of groups — 200 response body — data item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
archived_at | JSON | Optional | |
archived_at (anyOf 1) | string | Alternative | The timestamp when the group was archived (if applicable). Format: date-time |
archived_at (anyOf 2) | null | Alternative | The timestamp when the group was archived (if applicable). Format: date-time |
created_at | string | Optional | The timestamp when the group was created. Format: date-time |
external_metadata | JSON | Optional | Extra information about the group. |
external_metadata (anyOf 1) | Model | Alternative | Expand Return list of groups — 200 response body — data item external metadata Extra information about the group |
external_metadata (anyOf 2) | null | Alternative | |
id | string | Optional | The unique identifier of the group. |
managers | JSON | Optional | |
managers (anyOf 1) | number | Alternative | The number of managers associated with the group. Format: double |
managers (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
name | string | Optional | The name of the group. |
status | string | Optional | The current status of the group (active or archived). Known values: active, archived |
updated_at | string | Optional | The timestamp when the group was last updated. Format: date-time |
Referenced models: Return list of groups — 200 response body — data item external metadata Extra information about the group
Return list of groups — 200 response body — page
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
cursor | JSON | Optional | |
cursor (anyOf 1) | string | Alternative | An opaque cursor to fetch the next set of results. |
cursor (anyOf 2) | null | Alternative | An opaque cursor to fetch the next set of results. |
total_rows | JSON | Optional | |
total_rows (anyOf 1) | integer | Alternative | The total number of groups available for the current query (including pagination). |
total_rows (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Return list of groups — 200 response body — data item external metadata Extra information about the group
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Extra information about the group. |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: deel.groups_getgroups. Catalog operation: groups/list. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Required provider scopes: ["groups:read"]
Pinned headers: {"X-Version": "2026-01-01"}