Activity Categories · Timeglass API
The two-level category tree used to classify tracked activities.
List Activity Categories
GET /v1/activity-categories
Query parameters
limit· integercursor· stringinclude_archived· booleanexternal_id· string · Your own id for this record, such as its id in the tool you sync from. Unique in the workspace.
Response 200
data· array of object · requiredactivity_category_id· string · uuid · requiredname· string · requireddescription· string · nullable · requiredparent_category_id· string · uuid · nullable · requiredexternal_id· string · nullable · Your own id for this record, such as its id in the tool you sync from. Unique in the workspace.archived_at· string · timestamp · nullable · requiredcreated_at· string · timestamp · required
next_cursor· string · nullable · required
curl "https://api.timeglass.ai/v1/activity-categories" \
-H "Authorization: Bearer $TIMEGLASS_API_KEY"
Create an Activity Category
POST /v1/activity-categories
Requires a key with the read_write scope.
Request body
name· string · requireddescription· stringparent_category_id· string · uuidexternal_id· string · Your own id for this record, such as its id in the tool you sync from. Unique in the workspace.
Response 201
category· object · requiredactivity_category_id· string · uuid · requiredname· string · requireddescription· string · nullable · requiredparent_category_id· string · uuid · nullable · requiredexternal_id· string · nullable · Your own id for this record, such as its id in the tool you sync from. Unique in the workspace.archived_at· string · timestamp · nullable · requiredcreated_at· string · timestamp · required
curl -X POST "https://api.timeglass.ai/v1/activity-categories" \
-H "Authorization: Bearer $TIMEGLASS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Globex"
}'
Update an Activity Category
PATCH /v1/activity-categories/{categoryId}
Requires a key with the read_write scope.
Path parameters
categoryId· string · uuid · required
Request body
name· stringdescription· stringparent_category_id· string · uuid · nullableexternal_id· string · nullable · Your own id for this record, such as its id in the tool you sync from. Unique in the workspace.
Response 200
category· object · requiredactivity_category_id· string · uuid · requiredname· string · requireddescription· string · nullable · requiredparent_category_id· string · uuid · nullable · requiredexternal_id· string · nullable · Your own id for this record, such as its id in the tool you sync from. Unique in the workspace.archived_at· string · timestamp · nullable · requiredcreated_at· string · timestamp · required
curl -X PATCH "https://api.timeglass.ai/v1/activity-categories/4bfe4a4b-c86b-4b8e-b3f5-3d1c4a2e9f10" \
-H "Authorization: Bearer $TIMEGLASS_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
Delete an Activity Category
DELETE /v1/activity-categories/{categoryId}
Requires a key with the read_write scope.
Path parameters
categoryId· string · uuid · required
curl -X DELETE "https://api.timeglass.ai/v1/activity-categories/4bfe4a4b-c86b-4b8e-b3f5-3d1c4a2e9f10" \
-H "Authorization: Bearer $TIMEGLASS_API_KEY"
Archive an Activity Category
POST /v1/activity-categories/{categoryId}/archive
Requires a key with the read_write scope.
Path parameters
categoryId· string · uuid · required
Response 200
archived_category_ids· array of string · uuid · required
curl -X POST "https://api.timeglass.ai/v1/activity-categories/4bfe4a4b-c86b-4b8e-b3f5-3d1c4a2e9f10/archive" \
-H "Authorization: Bearer $TIMEGLASS_API_KEY"
Restore an Activity Category
POST /v1/activity-categories/{categoryId}/restore
Requires a key with the read_write scope.
Path parameters
categoryId· string · uuid · required
Response 200
category· object · requiredactivity_category_id· string · uuid · requiredname· string · requireddescription· string · nullable · requiredparent_category_id· string · uuid · nullable · requiredexternal_id· string · nullable · Your own id for this record, such as its id in the tool you sync from. Unique in the workspace.archived_at· string · timestamp · nullable · requiredcreated_at· string · timestamp · required
curl -X POST "https://api.timeglass.ai/v1/activity-categories/4bfe4a4b-c86b-4b8e-b3f5-3d1c4a2e9f10/restore" \
-H "Authorization: Bearer $TIMEGLASS_API_KEY"