Retrieve all groups within a specific organization. Groups are collections of users that can be used to manage permissions and access control within an organization.
Path Parameters
The unique identifier of the organization. This can be the organization’s ID or slug.
Query Parameters
Filter groups by their state. Available values:
enabled - Only return active groups
disabled - Only return disabled groups
If not provided, returns groups in all states.
Filter to specific group IDs. Provide an array of group IDs to return only those groups.
Include the list of members (users) in each group in the response.
Include the count of members in each group in the response.
Response
List of groups in the organization. Unique identifier for the group.
Unique name of the group within the organization. Used as a URL-friendly identifier.
Display title of the group.
ID of the organization this group belongs to.
Arbitrary metadata associated with the group as key-value pairs.
Timestamp when the group was created.
Timestamp when the group was last updated.
Number of members in the group (included when with_member_count=true).
List of user objects who are members of this group (included when with_members=true).
cURL
cURL (with filters)
JavaScript
Python
Go
curl -X GET 'https://frontier.example.com/v1beta1/organizations/org_123/groups' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
{
"groups" : [
{
"id" : "grp_123456789" ,
"name" : "engineering-team" ,
"title" : "Engineering Team" ,
"org_id" : "org_123" ,
"metadata" : {
"department" : "engineering" ,
"location" : "us-west"
},
"created_at" : "2023-01-15T10:30:00Z" ,
"updated_at" : "2023-06-20T15:45:00Z" ,
"members_count" : 12
},
{
"id" : "grp_987654321" ,
"name" : "design-team" ,
"title" : "Design Team" ,
"org_id" : "org_123" ,
"metadata" : {
"department" : "design"
},
"created_at" : "2023-02-01T09:00:00Z" ,
"updated_at" : "2023-05-10T11:20:00Z" ,
"members_count" : 8
}
]
}