# “Groups” Endpoints - GET List of groups in a workspace within an organization with user assignments

**URL:** <https://community.toggl.com/t/groups-endpoints-get-list-of-groups-in-a-workspace-within-an-organization-with-user-assignments/332>\
**Category:** API References\
**Tags:** users, api, endpoints, get, groups\
**Created:** [December 2, 2024, 12:15pm UTC](https://community.toggl.com/t/groups-endpoints-get-list-of-groups-in-a-workspace-within-an-organization-with-user-assignments/332 "2024-12-02T12:15:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Support](https://yyz2.discourse-cdn.com/flex012/user_avatar/community.toggl.com/support/32/1577_2.png) [@Support](https://community.toggl.com/u/Support)\
**Post date:** [December 2, 2024, 12:15pm UTC](https://community.toggl.com/t/groups-endpoints-get-list-of-groups-in-a-workspace-within-an-organization-with-user-assignments/332/1 "2024-12-02T12:15:52Z")

</div>

```auto
https://api.track.toggl.com/api/v9/organizations/{organization_id}/workspaces/{workspace_id}/groups

```

Returns list of groups in a workspace based on set of url parameters. List is sorted by name.

- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust

```auto
extern crate tokio;extern crate serde_json;use reqwest::{Client};use reqwest::header::{CONTENT_TYPE};#[tokio::main]async fn main() -> Result<(), reqwest::Error> { let client = Client::new().basic_auth("<email>", "<password>"); let json = client.request(Method::GET, "https://api.track.toggl.com/api/v9/organizations/{organization_id}/workspaces/{workspace_id}/groups".to_string()) .header(CONTENT_TYPE, "application/json") .send() .await? .json() .await?; println!("{:#?}", json); Ok(())}

```

### Parameters[​](https://engineering.toggl.com/docs/api/groups/#parameters-5)

#### Path[​](https://engineering.toggl.com/docs/api/groups/#path-5)

| name | type | required | description |
| --- | --- | --- | --- |
| organization\_id | integer | true | Numeric ID of the organization |
| workspace\_id | integer | true | Numeric ID of the workspace within the organization |

### Response[​](https://engineering.toggl.com/docs/api/groups/#response-5)

#### 200[​](https://engineering.toggl.com/docs/api/groups/#200-5)

| Name | Type | Description |
| --- | --- | --- |
| items | Array of object | - |

##### items[​](https://engineering.toggl.com/docs/api/groups/#items-2)

| Name | Type | Description |
| --- | --- | --- |
| at | string | - |
| group\_id | integer | - |
| name | string | - |
| permissions | string | - |
| users | Array of object | - |
| workspaces | Array of integer | - |

##### users[​](https://engineering.toggl.com/docs/api/groups/#users-3)

| Name | Type | Description |
| --- | --- | --- |
| avatar\_url | string | - |
| inactive | boolean | - |
| joined | boolean | - |
| name | string | - |
| user\_id | integer | - |

#### 403[​](https://engineering.toggl.com/docs/api/groups/#403-4)

Forbidden

#### 404[​](https://engineering.toggl.com/docs/api/groups/#404-3)

Resource can not be found
