Activity Categories · Timeglass API

The two-level category tree used to classify tracked activities.

List Activity Categories

GET /v1/activity-categories

Query parameters

  • limit · integer
  • cursor · string
  • include_archived · boolean

Response 200

  • data · array of object · required
    • activity_category_id · string · uuid · required
    • name · string · required
    • description · string · nullable · required
    • parent_category_id · string · uuid · nullable · required
    • archived_at · string · timestamp · nullable · required
    • created_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 · required
  • description · string
  • parent_category_id · string · uuid

Response 201

  • category · object · required
    • activity_category_id · string · uuid · required
    • name · string · required
    • description · string · nullable · required
    • parent_category_id · string · uuid · nullable · required
    • archived_at · string · timestamp · nullable · required
    • created_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 · string
  • description · string
  • parent_category_id · string · uuid · nullable

Response 200

  • category · object · required
    • activity_category_id · string · uuid · required
    • name · string · required
    • description · string · nullable · required
    • parent_category_id · string · uuid · nullable · required
    • archived_at · string · timestamp · nullable · required
    • created_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 · required
    • activity_category_id · string · uuid · required
    • name · string · required
    • description · string · nullable · required
    • parent_category_id · string · uuid · nullable · required
    • archived_at · string · timestamp · nullable · required
    • created_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"