Group has the following properties
- name: The name of the group (string, required)
- wid: workspace ID, where the group will be used (integer, required)
- at: timestamp that is sent in the response, indicates the time group was last updated
POST https://www.toggl.com/api/v8/groups
Example request
curl -v -u 1971800d4d82861d8f2c1651fea4d212:api_token \
-H "Content-Type: application/json" \
-d '{"group":{"name":"Developers","wid":777}}' \
-X POST https://www.toggl.com/api/v8/groups
Successful response
{
"data": {
"id":1239455,
"wid":777,
"name":"Developers",
"at":"2013-02-26T08:45:28+00:00"
}
}
PUT https://www.toggl.com/api/v8/groups/{group_id}
Workspace id (wid) can't be changed.
Example request
curl -v -u 1971800d4d82861d8f2c1651fea4d212:api_token \
-H "Content-Type: application/json" \
-d '{"group":{"name":"Front-end Developers"}}' \
-X PUT https://www.toggl.com/api/v8/groups/1239455
Successful response
{
"data": {
"id":1239455,
"wid":777,
"name":"Front-end Developers",
"at":"2013-02-26T08:55:28+00:00"
}
}
DELETE https://www.toggl.com/api/v8/groups/{group_id}
Example request
curl -v -u 1971800d4d82861d8f2c1651fea4d212:api_token \
-X DELETE https://www.toggl.com/api/v8/groups/1239455
Successful request will return 200 OK
. If the user has no access to delete, you'll get a status code 4xx
Retrieving workspace groups is documented here.