A Group is a collection of Organization Memberships within an Organization. Use Groups to organize users into organizational units.
To list the groups that a specific Organization Membership belongs to, use List Groups.
{ "object": "group", "id": "group_01HXYZ123456789ABCDEFGHIJ", "organization_id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY", "name": "Engineering", "description": "The engineering team", "created_at": "2026-01-15T12:00:00.000Z", "updated_at": "2026-01-15T12:00:00.000Z" }
groupAdd an organization membership to a group.
curl --request POST \ --url "https://api.workos.com/organizations/org_01EHWNCE74X7JSDV0X3SZ3KJNY/groups/group_01HXYZ123456789ABCDEFGHIJ/organization-memberships" \ --header "Authorization: Bearer sk_example_123456789" \ --header "Content-Type: application/json" \ -d @- <<'BODY' { "organization_membership_id": "om_01HXYZ123456789ABCDEFGHIJ" } BODY
{ "object": "group", "id": "group_01HXYZ123456789ABCDEFGHIJ", "organization_id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY", "name": "Engineering", "description": "The engineering team", "created_at": "2026-01-15T12:00:00.000Z", "updated_at": "2026-01-15T12:00:00.000Z" }
| curl --request POST \ | |
| --url "https://api.workos.com/organizations/org_01EHWNCE74X7JSDV0X3SZ3KJNY/groups/group_01HXYZ123456789ABCDEFGHIJ/organization-memberships" \ | |
| --header "Authorization: Bearer sk_example_123456789" \ | |
| --header "Content-Type: application/json" \ | |
| -d @- <<'BODY' | |
| { | |
| "organization_membership_id": "om_01HXYZ123456789ABCDEFGHIJ" | |
| } | |
| BODY |
| { | |
| "object": "group", | |
| "id": "group_01HXYZ123456789ABCDEFGHIJ", | |
| "organization_id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY", | |
| "name": "Engineering", | |
| "description": "The engineering team", | |
| "created_at": "2026-01-15T12:00:00.000Z", | |
| "updated_at": "2026-01-15T12:00:00.000Z" | |
| } |
POST/organizations /:organizationId /groups /:groupId /organization-membershipsParameters Returns Create a new group within an organization.
curl --request POST \ --url "https://api.workos.com/organizations/org_01EHWNCE74X7JSDV0X3SZ3KJNY/groups" \ --header "Authorization: Bearer sk_example_123456789" \ --header "Content-Type: application/json" \ -d @- <<'BODY' { "name": "Engineering", "description": "The engineering team" } BODY
{ "object": "group", "id": "group_01HXYZ123456789ABCDEFGHIJ", "organization_id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY", "name": "Engineering", "description": "The engineering team", "created_at": "2026-01-15T12:00:00.000Z", "updated_at": "2026-01-15T12:00:00.000Z" }
| curl --request POST \ | |
| --url "https://api.workos.com/organizations/org_01EHWNCE74X7JSDV0X3SZ3KJNY/groups" \ | |
| --header "Authorization: Bearer sk_example_123456789" \ | |
| --header "Content-Type: application/json" \ | |
| -d @- <<'BODY' | |
| { | |
| "name": "Engineering", | |
| "description": "The engineering team" | |
| } | |
| BODY |
| { | |
| "object": "group", | |
| "id": "group_01HXYZ123456789ABCDEFGHIJ", | |
| "organization_id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY", | |
| "name": "Engineering", | |
| "description": "The engineering team", | |
| "created_at": "2026-01-15T12:00:00.000Z", | |
| "updated_at": "2026-01-15T12:00:00.000Z" | |
| } |
POST/organizations /:organizationId /groupsParameters Returns Delete a group from an organization.
curl --request DELETE \ --url "https://api.workos.com/organizations/org_01EHWNCE74X7JSDV0X3SZ3KJNY/groups/group_01HXYZ123456789ABCDEFGHIJ" \ --header "Authorization: Bearer sk_example_123456789"
| curl --request DELETE \ | |
| --url "https://api.workos.com/organizations/org_01EHWNCE74X7JSDV0X3SZ3KJNY/groups/group_01HXYZ123456789ABCDEFGHIJ" \ | |
| --header "Authorization: Bearer sk_example_123456789" |
DELETE/organizations /:organizationId /groups /:groupIdParameters Returns Retrieve a group by its ID within an organization.
curl "https://api.workos.com/organizations/org_01EHWNCE74X7JSDV0X3SZ3KJNY/groups/group_01HXYZ123456789ABCDEFGHIJ" \ --header "Authorization: Bearer sk_example_123456789"
{ "object": "group", "id": "group_01HXYZ123456789ABCDEFGHIJ", "organization_id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY", "name": "Engineering", "description": "The engineering team", "created_at": "2026-01-15T12:00:00.000Z", "updated_at": "2026-01-15T12:00:00.000Z" }
| curl "https://api.workos.com/organizations/org_01EHWNCE74X7JSDV0X3SZ3KJNY/groups/group_01HXYZ123456789ABCDEFGHIJ" \ | |
| --header "Authorization: Bearer sk_example_123456789" |
| { | |
| "object": "group", | |
| "id": "group_01HXYZ123456789ABCDEFGHIJ", | |
| "organization_id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY", | |
| "name": "Engineering", | |
| "description": "The engineering team", | |
| "created_at": "2026-01-15T12:00:00.000Z", | |
| "updated_at": "2026-01-15T12:00:00.000Z" | |
| } |
GET/organizations /:organizationId /groups /:groupIdParameters Returns Get a paginated list of groups within an organization.
curl "https://api.workos.com/organizations/org_01EHWNCE74X7JSDV0X3SZ3KJNY/groups" \ --header "Authorization: Bearer sk_example_123456789"
{ "object": "list", "data": [ { "object": "group", "id": "group_01HXYZ123456789ABCDEFGHIJ", "organization_id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY", "name": "Engineering", "description": "The engineering team", "created_at": "2026-01-15T12:00:00.000Z", "updated_at": "2026-01-15T12:00:00.000Z" } ], "list_metadata": { "before": "group_01HXYZ123456789ABCDEFGHIJ", "after": "group_01HXYZ987654321KJIHGFEDCBA" } }
| curl "https://api.workos.com/organizations/org_01EHWNCE74X7JSDV0X3SZ3KJNY/groups" \ | |
| --header "Authorization: Bearer sk_example_123456789" |
| { | |
| "object": "list", | |
| "data": [ | |
| { | |
| "object": "group", | |
| "id": "group_01HXYZ123456789ABCDEFGHIJ", | |
| "organization_id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY", | |
| "name": "Engineering", | |
| "description": "The engineering team", | |
| "created_at": "2026-01-15T12:00:00.000Z", | |
| "updated_at": "2026-01-15T12:00:00.000Z" | |
| } | |
| ], | |
| "list_metadata": { | |
| "before": "group_01HXYZ123456789ABCDEFGHIJ", | |
| "after": "group_01HXYZ987654321KJIHGFEDCBA" | |
| } | |
| } |
GET/organizations /:organizationId /groupsParameters Returns objectGet a list of organization memberships in a group.
curl "https://api.workos.com/organizations/org_01EHWNCE74X7JSDV0X3SZ3KJNY/groups/group_01HXYZ123456789ABCDEFGHIJ/organization-memberships" \ --header "Authorization: Bearer sk_example_123456789"
{ "object": "list", "data": [ { "object": "organization_membership", "id": "om_01HXYZ123456789ABCDEFGHIJ", "user_id": "user_01E4ZCR3C56J083X43JQXF3JK5", "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT", "status": "active", "directory_managed": false, "organization_name": "Acme Corp", "custom_attributes": { "department": "Engineering", "title": "Developer Experience Engineer", "location": "Brooklyn" }, "created_at": "2026-01-15T12:00:00.000Z", "updated_at": "2026-01-15T12:00:00.000Z" } ], "list_metadata": { "before": "om_01HXYZ123456789ABCDEFGHIJ", "after": "om_01HXYZ987654321KJIHGFEDCBA" } }
| curl "https://api.workos.com/organizations/org_01EHWNCE74X7JSDV0X3SZ3KJNY/groups/group_01HXYZ123456789ABCDEFGHIJ/organization-memberships" \ | |
| --header "Authorization: Bearer sk_example_123456789" |
| { | |
| "object": "list", | |
| "data": [ | |
| { | |
| "object": "organization_membership", | |
| "id": "om_01HXYZ123456789ABCDEFGHIJ", | |
| "user_id": "user_01E4ZCR3C56J083X43JQXF3JK5", | |
| "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT", | |
| "status": "active", | |
| "directory_managed": false, | |
| "organization_name": "Acme Corp", | |
| "custom_attributes": { | |
| "department": "Engineering", | |
| "title": "Developer Experience Engineer", | |
| "location": "Brooklyn" | |
| }, | |
| "created_at": "2026-01-15T12:00:00.000Z", | |
| "updated_at": "2026-01-15T12:00:00.000Z" | |
| } | |
| ], | |
| "list_metadata": { | |
| "before": "om_01HXYZ123456789ABCDEFGHIJ", | |
| "after": "om_01HXYZ987654321KJIHGFEDCBA" | |
| } | |
| } |
GET/organizations /:organizationId /groups /:groupId /organization-membershipsParameters Returns objectRemove an organization membership from a group.
curl --request DELETE \ --url "https://api.workos.com/organizations/org_01EHWNCE74X7JSDV0X3SZ3KJNY/groups/group_01HXYZ123456789ABCDEFGHIJ/organization-memberships/om_01HXYZ123456789ABCDEFGHIJ" \ --header "Authorization: Bearer sk_example_123456789"
| curl --request DELETE \ | |
| --url "https://api.workos.com/organizations/org_01EHWNCE74X7JSDV0X3SZ3KJNY/groups/group_01HXYZ123456789ABCDEFGHIJ/organization-memberships/om_01HXYZ123456789ABCDEFGHIJ" \ | |
| --header "Authorization: Bearer sk_example_123456789" |
DELETE/organizations /:organizationId /groups /:groupId /organization-memberships /:omIdParameters Returns Update an existing group. Only the fields provided in the request body will be updated.
curl --request PATCH \ --url "https://api.workos.com/organizations/org_01EHWNCE74X7JSDV0X3SZ3KJNY/groups/group_01HXYZ123456789ABCDEFGHIJ" \ --header "Authorization: Bearer sk_example_123456789" \ --header "Content-Type: application/json" \ -d @- <<'BODY' { "name": "Engineering", "description": "The engineering team" } BODY
{ "object": "group", "id": "group_01HXYZ123456789ABCDEFGHIJ", "organization_id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY", "name": "Engineering", "description": "The engineering team", "created_at": "2026-01-15T12:00:00.000Z", "updated_at": "2026-01-15T12:00:00.000Z" }
| curl --request PATCH \ | |
| --url "https://api.workos.com/organizations/org_01EHWNCE74X7JSDV0X3SZ3KJNY/groups/group_01HXYZ123456789ABCDEFGHIJ" \ | |
| --header "Authorization: Bearer sk_example_123456789" \ | |
| --header "Content-Type: application/json" \ | |
| -d @- <<'BODY' | |
| { | |
| "name": "Engineering", | |
| "description": "The engineering team" | |
| } | |
| BODY |
| { | |
| "object": "group", | |
| "id": "group_01HXYZ123456789ABCDEFGHIJ", | |
| "organization_id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY", | |
| "name": "Engineering", | |
| "description": "The engineering team", | |
| "created_at": "2026-01-15T12:00:00.000Z", | |
| "updated_at": "2026-01-15T12:00:00.000Z" | |
| } |
PATCH/organizations /:organizationId /groups /:groupIdParameters Returns