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

200

Array of:

nametypedescription
atstring-
group_idinteger-
namestring-
usersArray of
nametypedescription
avatar_urlstring-
joinedboolean-
namestring-
user_idinteger-
-
workspacesArray of integer-

400

Invalid number ...

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

200

Returns the created group data.
nametypedescription
atstring-
group_idinteger-
namestring-
usersArray of
nametypedescription
avatar_urlstring-
joinedboolean-
namestring-
user_idinteger-
-
workspacesArray of integer-

400

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

User does not have access to this resource

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

200

Returns the created group data.
nametypedescription
atstring-
group_idinteger-
namestring-
usersArray of
nametypedescription
avatar_urlstring-
joinedboolean-
namestring-
user_idinteger-
-
workspacesArray of integer-

400

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

Forbidden

404

Invalid group ID.

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

200

OK

403

User does not have access to this resource

404

Invalid group ID.

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

200

Returns the result of the requested operations.
nametypedescription
failureArray of
nametypedescription
messagestring-
patchgroups.PatchInput-
-
successArray of
nametypedescription
opstring-
pathstring-
valueArray of integer-
-

400

Possible error messages:

* Invalid JSON input
* Empty or invalid patch operation
* Empty or invalid patch path
* Unknown group at organization
* Too many patches_Too many values per patch_

403

Forbidden

404

Invalid group ID.

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

200

Array of:

nametypedescription
atstring-
group_idinteger-
namestring-
usersArray of
nametypedescription
avatar_urlstring-
joinedboolean-
namestring-
user_idinteger-
-
workspacesArray of integer-

403

Forbidden

404

Resource can not be found

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

200

Array of:

nametypedescription
group_idinteger-
idinteger-
pidinteger-
widinteger-

403

User does not have access to this resource.

500

Internal Server Error

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

200

Successful operation.

403

User does not have access to this resource.

500

Internal Server Error

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

200

Successful operation.

403

User does not have access to this resource.

500

Internal Server Error
© 2023 Toggl. All rights reserved.