Skip to main content

Organizations

POST Creates a new organization

https://api.track.toggl.com/api/v9/organizations

Creates a new organization with a single workspace and assigns current user as the organization owner

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

Parameters

Body

nametyperequireddescription
namestringfalse-
workspace_namestringfalse-

Response

{"id":{"type":"integer"},"name":{"type":"string"},"workspace_id":{"type":"integer"},"workspace_name":{"type":"string"}}

GET Organization data

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

Returns organization name and current pricing plan

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

Parameters

Path

nametyperequireddescription
organization_idintegertrueNumeric ID of the organization

Response

{"admin":{"type":"boolean"},"at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"id":{"type":"integer"},"is_chargify":{"type":"boolean"},"is_multi_workspace_enabled":{"description":"IsMultiWorkspaceEnabled returns true if organization option is_multi_workspace_enabled is set","type":"boolean"},"max_workspaces":{"type":"integer"},"name":{"type":"string"},"owner":{"type":"boolean"},"pricing_plan_id":{"type":"integer"},"server_deleted_at":{"type":"string","format":"date-time"},"suspended_at":{"type":"string"},"trial_info":{"last_pricing_plan_id":{"type":"integer"},"next_payment_date":{"type":"string"},"trial":{"type":"boolean"},"trial_available":{"type":"boolean"},"trial_end_date":{"type":"string"}},"user_count":{"type":"integer"}}

PUT Updates an existing organization

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

Updates an existing organization

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

Parameters

Path

nametyperequireddescription
organization_idintegertrueNumeric ID of the organization.

Body

nametyperequireddescription
namestringfalse-

Response

OK

GET List of users in organization

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

Returns list of users in organization based on set of url parameters: Result is paginated. Pagination params are returned in headers

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

Parameters

Path

nametyperequireddescription
organization_idintegertrueNumeric ID of the organization

Query

nametyperequireddescription
filterstringfalseReturns records where name or email contains this string
active_statusstringfalseList of active inactive invited comma separated(if not present, all statuses)
only_adminsstringfalseIf true returns admins only
groupsstringfalseComma-separated list of groups ids, returns users belonging to these groups only
workspacesstringfalseComma-separated list of workspaces ids, returns users belonging to this workspaces only
pageintegerfalsePage number, default 1
per_pageintegerfalseNumber of items per page, default 50
sort_dirstringfalseValues 'asc' or 'desc', result is sorted on 'names' column, default 'asc'

Response

Successful operation

PATCH Apply changes in bulk to users in an organization

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

Apply changes in bulk to users in an organization (currently deletion only).

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

Parameters

Path

nametyperequireddescription
organization_idintegertrueNumeric ID of the organization

Body

nametyperequireddescription
deleteundefinedfalse-

Response

OK

PUT Changes a single organization-user

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

Changes a single organization-user. Can affect the following values:

curl -X PUT https://api.track.toggl.com/api/v9/organizations/{organization_id}/users/{organization_user_id} \
-H "Content-Type: application/json" \
-d '{"admin":"boolean","inactive":"boolean","labour_cost":"integer","rate_change_mode":"string"}' \
-u <email>:<password>

Parameters

Path

nametyperequireddescription
organization_idintegertrueNumeric ID of the organization

Body

nametyperequireddescription
adminbooleanfalse-
inactivebooleanfalse-
labour_costintegerfalse-
postedFieldsundefinedfalse-
rate_change_modestringfalse-

Response

OK

GET Statistics for all workspaces in the organization

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

Returns map indexed by workspace ID where each map element contains workspace admins list, members count and groups count.

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

Response

Successful operation.

PUT Change assignments of users within a workspace.

https://api.track.toggl.com/api/v9/organizations/{organization_id}/workspaces/{workspace_id}/assignments

Assign or remove users to/from a workspace or to/from groups belonging to said workspace.

curl -X PUT https://api.track.toggl.com/api/v9/organizations/{organization_id}/workspaces/{workspace_id}/assignments \
-H "Content-Type: application/json" \
-d '{"group_id":"integer","joined":"boolean","operation":"string","user_id":"integer"}' \
-u <email>:<password>

Parameters

Path

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

Body

nametyperequireddescription
group_idintegerfalse-
joinedbooleanfalse-
operationstringfalse-
user_idintegerfalse-

Response

OK
© 2022 Toggl. All rights reserved.