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

nametypedescription
namestring-
workspace_namestring-

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"
},
"is_unified": {
"type": "boolean"
},
"max_workspaces": {
"type": "integer"
},
"name": {
"type": "string"
},
"owner": {
"type": "boolean"
},
"payment_methods": {
"type": "string"
},
"pricing_plan_id": {
"type": "integer"
},
"server_deleted_at": {
"type": "string",
"format": "date-time"
},
"suspended_at": {
"type": "string"
},
"trial_info": {
"object": {
"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

nametypedescription
namestring-

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

[
{
"admin": {
"type": "boolean"
},
"avatar_url": {
"type": "string"
},
"can_edit_email": {
"type": "boolean"
},
"email": {
"type": "string"
},
"groups": {
"items": [
{
"group_id": {
"type": "integer"
},
"name": {
"type": "string"
}
}
]
},
"id": {
"type": "integer"
},
"inactive": {
"type": "boolean"
},
"invitation_code": {
"type": "string"
},
"joined": {
"type": "boolean"
},
"name": {
"type": "string"
},
"owner": {
"type": "boolean"
},
"user_id": {
"type": "integer"
},
"workspaces": {
"items": [
{
"admin": {
"type": "boolean"
},
"name": {
"type": "string"
},
"workspace_id": {
"type": "integer"
}
}
]
}
}
]

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 '{"delete":["integer"]}' \
-u <email>:<password>

Parameters

Path

nametyperequireddescription
organization_idintegertrueNumeric ID of the organization

Body

nametypedescription
deleteArray of integer-

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 '{"email":"string","groups":["integer"],"inactive":"boolean","name":"string","organization_admin":"boolean","workspaces":[{"admin":"boolean","name":"string","workspace_id":"integer"}]}' \
-u <email>:<password>

Parameters

Path

nametyperequireddescription
organization_idintegertrueNumeric ID of the organization

Body

nametypedescription
emailstring-
groupsArray of integer-
inactiveboolean-
namestring-
organization_adminboolean-
workspacesArray of
nametypedescription
adminboolean-
namestring-
workspace_idinteger-
-

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

nametypedescription
group_idinteger-
joinedboolean-
operationstring-
user_idinteger-

Response

OK
© 2022 Toggl. All rights reserved.