openapi: 3.1.1 info: title: WorkOS admin-portal user-management.organization-membership.groups API description: WorkOS REST API version: '1.0' contact: name: WorkOS url: https://workos.com email: support@workos.com license: name: MIT url: https://opensource.org/license/MIT servers: - url: https://api.workos.com description: Production - url: https://api.workos-test.com description: Staging security: - bearer: [] tags: - name: user-management.organization-membership.groups description: Manage groups for a user organization membership. x-displayName: Membership Groups paths: /user_management/organization_memberships/{omId}/groups: get: description: Get a list of groups that an organization membership belongs to. operationId: OrganizationMembershipGroupsController_listGroups parameters: - name: omId required: true in: path description: Unique identifier of the Organization Membership. schema: type: string example: om_01HXYZ123456789ABCDEFGHIJ - name: before required: false in: query description: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. schema: example: xxx_01HXYZ123456789ABCDEFGHIJ type: string - name: after required: false in: query description: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. schema: example: xxx_01HXYZ987654321KJIHGFEDCBA type: string - name: limit required: false in: query description: Upper limit on the number of objects to return, between `1` and `100`. schema: minimum: 1 maximum: 100 default: 10 example: 10 type: integer - name: order required: false in: query description: Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending. schema: $ref: '#/components/schemas/PaginationOrder' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/GroupList' '404': description: Not Found content: application/json: schema: type: object properties: message: type: string description: A human-readable description of the error. example: 'Organization not found: ''org_01EHQMYV6MBK39QC5PZXHY59C3''.' required: - message summary: List Groups tags: - user-management.organization-membership.groups x-feature-flag: user-groups-enabled components: schemas: GroupList: type: object properties: object: type: string description: Indicates this is a list response. const: list data: type: array items: $ref: '#/components/schemas/Group' description: The list of records for the current page. list_metadata: type: object properties: before: type: - string - 'null' description: An object ID that defines your place in the list. When the ID is not present, you are at the start of the list. example: group_01HXYZ123456789ABCDEFGHIJ after: type: - string - 'null' description: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. example: group_01HXYZ987654321KJIHGFEDCBA required: - before - after description: Pagination cursors for navigating between pages of results. required: - object - data - list_metadata PaginationOrder: type: string enum: - normal - desc - asc example: desc default: desc Group: type: object properties: object: type: string description: The Group object. example: group const: group id: type: string description: The unique ID of the Group. example: group_01HXYZ123456789ABCDEFGHIJ organization_id: type: string description: The ID of the Organization the Group belongs to. example: org_01EHWNCE74X7JSDV0X3SZ3KJNY name: type: string description: The name of the Group. example: Engineering description: type: - string - 'null' description: An optional description of the Group. example: The engineering team created_at: format: date-time type: string description: An ISO 8601 timestamp. example: '2026-01-15T12:00:00.000Z' updated_at: format: date-time type: string description: An ISO 8601 timestamp. example: '2026-01-15T12:00:00.000Z' required: - object - id - organization_id - name - description - created_at - updated_at securitySchemes: bearer: scheme: bearer bearerFormat: JWT type: http description: 'Your WorkOS API key prefixed with `sk_`. Pass it as a Bearer token: `Authorization: Bearer sk_example_123456789`.' access_token: scheme: bearer bearerFormat: JWT type: http description: An SSO access token returned from the Get a Profile and Token endpoint.