# “Groups” Endpoints - POST Create group

**URL:** <https://community.toggl.com/t/groups-endpoints-post-create-group/328>\
**Category:** API References\
**Tags:** users, api, endpoints, post, groups\
**Created:** [December 2, 2024, 12:12pm UTC](https://community.toggl.com/t/groups-endpoints-post-create-group/328 "2024-12-02T12:12:29Z")\
**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:12pm UTC](https://community.toggl.com/t/groups-endpoints-post-create-group/328/1 "2024-12-02T12:12:29Z")

</div>

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

```

Creates a group in the specified organization

- 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::POST, "https://api.track.toggl.com/api/v9/organizations/{organization_id}/groups".to_string()).json(&serde_json::json!(\{"name":"string","users":[\{\}],"workspaces":[\{\}]\})) .header(CONTENT_TYPE, "application/json") .send() .await? .json() .await?; println!("{:#?}", json); Ok(())}

```

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

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

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

#### Body[​](https://engineering.toggl.com/docs/api/groups/#body)

| Name | Type | Description |
| --- | --- | --- |
| name | string | Group name |
| users | Array of integer | Group users, optional |
| workspaces | Array of integer | Group workspaces |

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

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

Returns the created group data.

| 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-1)

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

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

Possible error messages:

- Invalid JSON input
- Group name must be present
- Group name too long, maximum length is 200
- Name has already been taken
- User {user} not exists in the organization {org}
- Workspace {ws} not exists in the organization {org}

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

User does not have access to this resource
