Skip to main content

Groups

GET List of groups in organization with user and workspace assignments

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

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

curl  https://api.track.toggl.com/api/v9/organizations/{organization_id}/groups \
-H "Content-Type: application/json" \
-u <email>:<password>

Parameters

Path

nametyperequireddescription
organization_idintegertrueNumeric ID of the organization

Query

nametyperequireddescription
namestringfalseReturns records where name contains this string
workspacestringfalseID of workspace. Returns groups assigned to this workspace

Response

[
{
"at": {
"type": "string"
},
"group_id": {
"type": "integer"
},
"name": {
"type": "string"
},
"users": {
"items": [
{
"avatar_url": {
"type": "string"
},
"joined": {
"type": "boolean"
},
"name": {
"type": "string"
},
"user_id": {
"type": "integer"
}
}
]
},
"workspaces": {
"type": [
"integer"
]
}
}
]

POST Create group

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

Creates a group in the specified organization

curl -X POST https://api.track.toggl.com/api/v9/organizations/{organization_id}/groups \
-H "Content-Type: application/json" \
-d '{"name":"string","users":["integer"],"workspaces":["integer"]}' \
-u <email>:<password>

Parameters

Path

nametyperequireddescription
organization_idintegertrueNumeric ID of the organization.

Body

nametypedescription
namestringGroup name
usersArray of integerGroup users, optional
workspacesArray of integerGroup workspaces, optional

Response

{
"at": {
"type": "string"
},
"group_id": {
"type": "integer"
},
"name": {
"type": "string"
},
"users": {
"items": [
{
"avatar_url": {
"type": "string"
},
"joined": {
"type": "boolean"
},
"name": {
"type": "string"
},
"user_id": {
"type": "integer"
}
}
]
},
"workspaces": {
"type": [
"integer"
]
}
}

PUT Edit group

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

Edits a group in the specified organization

curl -X PUT https://api.track.toggl.com/api/v9/organizations/{organization_id}/groups/{group_id} \
-H "Content-Type: application/json" \
-d '{"name":"string","users":["integer"],"workspaces":["integer"]}' \
-u <email>:<password>

Parameters

Path

nametyperequireddescription
organization_idintegertrueNumeric ID of the organization.

Body

nametypedescription
namestringGroup name
usersArray of integerGroup users, optional
workspacesArray of integerGroup workspaces, optional

Response

{
"at": {
"type": "string"
},
"group_id": {
"type": "integer"
},
"name": {
"type": "string"
},
"users": {
"items": [
{
"avatar_url": {
"type": "string"
},
"joined": {
"type": "boolean"
},
"name": {
"type": "string"
},
"user_id": {
"type": "integer"
}
}
]
},
"workspaces": {
"type": [
"integer"
]
}
}

DELETE Deletes group

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

Deletes a group from the specified organization

curl -X DELETE https://api.track.toggl.com/api/v9/organizations/{organization_id}/groups/{group_id} \
-H "Content-Type: application/json" \
-u <email>:<password>

Parameters

Path

nametyperequireddescription
organization_idintegertrueNumeric ID of the organization.
group_idintegertrueNumeric ID of the group.

Response

OK

PATCH Patch group

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

Patches a group in the specified organization. Patches are applied individually.

curl -X PATCH https://api.track.toggl.com/api/v9/organizations/{organization_id}/groups/{group_id} \
-H "Content-Type: application/json" \
-u <email>:<password>

Parameters

Path

nametyperequireddescription
organization_idintegertrueNumeric ID of the organization.
group_idintegertrueNumeric ID of the group.

Response

{
"failure": {
"items": [
{
"message": {
"type": "string"
},
"patch": {
"type": "groups.PatchInput"
}
}
]
},
"success": {
"items": [
{
"op": {
"type": "string"
},
"path": {
"type": "string"
},
"value": {
"type": [
"integer"
]
}
}
]
}
}

GET List of groups in a workspace within an organization with user assignments.

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  https://api.track.toggl.com/api/v9/organizations/{organization_id}/workspaces/{workspace_id}/groups \
-H "Content-Type: application/json" \
-u <email>:<password>

Parameters

Path

nametyperequireddescription
organization_idintegertrueNumeric ID of the organization
workspace_idintegertrueNumeric ID of the workspace within the organization

Response

[
{
"at": {
"type": "string"
},
"group_id": {
"type": "integer"
},
"name": {
"type": "string"
},
"users": {
"items": [
{
"avatar_url": {
"type": "string"
},
"joined": {
"type": "boolean"
},
"name": {
"type": "string"
},
"user_id": {
"type": "integer"
}
}
]
},
"workspaces": {
"type": [
"integer"
]
}
}
]

GET Get workspace project groups.

https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_groups

Get project groups for given workspace.

curl  https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_groups \
-H "Content-Type: application/json" \
-u <email>:<password>

Parameters

Path

nametyperequireddescription
workspace_idintegertrueNumeric ID of the workspace

Query

nametyperequireddescription
project_idsstringtrueProject IDs separated by comma.

Response

[
{
"group_id": {
"type": "integer"
},
"id": {
"type": "integer"
},
"pid": {
"type": "integer"
},
"wid": {
"type": "integer"
}
}
]

POST Adds group to project.

https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_groups

Adds group to project for given workspace.

curl -X POST https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_groups \
-H "Content-Type: application/json" \
-d '{"group_id":"integer","project_id":"integer"}' \
-u <email>:<password>

Parameters

Path

nametyperequireddescription
workspace_idintegertrueNumeric ID of the workspace

Body

nametypedescription
group_idintegerGroup ID
project_idintegerProject ID

Response

Successful operation.

DELETE Remove project group.

https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_groups/{project_group_id}

Remove project group for a given workspace.

curl -X DELETE https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_groups/{project_group_id} \
-H "Content-Type: application/json" \
-u <email>:<password>

Parameters

Path

nametyperequireddescription
workspace_idintegertrueNumeric ID of the workspace
project_group_idintegertrueNumeric ID of the project group

Response

Successful operation.
© 2022 Toggl. All rights reserved.