Skip to main content

Workspace

Time entries belong to a specific workspace. When you sign up, a Default Workspace is automatically created. You can also sign up for a Toggl Track account via invitation into a workspace. As described in the previous page, workspaces belong to an organization; though keep your organization_id ready, we are going to need it.

Create a Workspace

Creating a new workspace is easy as follow:

curl -u <email>:<password> \
-H "Content-Type: application/json" \
-d '{"admins": [0],"default_currency": "string","default_hourly_rate": 0,"initial_pricing_plan": 0,"name": "string","only_admins_may_create_projects": true,"only_admins_see_billable_rates": true,"only_admins_see_team_dashboard": true,"organizationID": 0,"projects_billable_by_default": true,"rounding": 0,"rounding_minutes": 0}' \
-X POST https://api.track.toggl.com/api/v9/organizations/{organization_id}/workspaces

Well, that's a lot of body parameters. Don't be scared, most of them have default values. Here is a simpler version of the request:

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

Workspace details

You can easily retrieve workspace details:

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

The response is too long to be copied here (😅). Check it yourself! In the response, you can find helpful information such as subscription, card, and plan details, including the parameters stated in the previous section.

You can use statistics endpoint to retrieve workspace counters:

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

You will receive the number of members, groups and admins in the workspace:

{ "admins": [1], "groups_count": 1, "members_count": 10 }

User workspaces

The full list of workspaces that a user belongs to can be obtained:

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

In the next page, we are going to describe how you can organize your time entries in your workspace using Projects.

© 2024 Toggl. All rights reserved.