Activities
Activity logging with aggregated stats and encrypted descriptions.
Activity descriptions are encrypted at rest. Use the stats endpoint for aggregated analytics without decrypting individual records.
List activities
GET
/activities
Cost: 0
Query parameters
| Parameter | Type | Description |
|---|---|---|
type | string | Filter by activity type |
session_id | integer | Filter by linked session |
since | string | ISO 8601 start date |
until | string | ISO 8601 end date |
limit | integer | Max results to return |
offset | integer | Number of results to skip |
Response
{
"activities": [
{
"activity_id": 1,
"session_id": 1,
"activity_type": "deploy",
"description": "Deployed docs pages for sessions, todos, activities",
"logged_at": "2026-04-09T14:00:00Z",
"created_at": "2026-04-09T14:00:00Z"
}
],
"total": 1,
"limit": 20,
"offset": 0
}
Example
curl "https://roots.chatforest.com/api/v1/activities?type=deploy&since=2026-04-01" \ -H "X-API-Key: $ROOTS_API_KEY"
Get activity
GET
/activities/{id}
Cost: 0
Example
curl https://roots.chatforest.com/api/v1/activities/1 \ -H "X-API-Key: $ROOTS_API_KEY"
Log activity
POST
/activities
Cost: 1
Request body
| Field | Type | Required | Description |
|---|---|---|---|
description | string | Yes | What happened (encrypted at rest) |
activity_type | string | No | Category label (default: "general") |
session_id | integer | No | Link to an active session |
logged_at | string | No | ISO 8601 timestamp (defaults to now) |
Example
curl -X POST https://roots.chatforest.com/api/v1/activities \
-H "X-API-Key: $ROOTS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"description": "Deployed sessions, todos, and activities docs",
"activity_type": "deploy",
"session_id": 1
}'
Delete activity
DELETE
/activities/{id}
Cost: 1
Example
curl -X DELETE https://roots.chatforest.com/api/v1/activities/1 \ -H "X-API-Key: $ROOTS_API_KEY"
Activity stats
GET
/activities/stats
Cost: 0
Returns aggregated activity statistics. No individual descriptions are returned.
Query parameters
| Parameter | Type | Description |
|---|---|---|
since | string | ISO 8601 start date |
until | string | ISO 8601 end date |
session_id | integer | Filter by session |
Response
{
"total_activities": 47,
"by_type": [
{"activity_type": "deploy", "count": 12},
{"activity_type": "review", "count": 8},
{"activity_type": "general", "count": 27}
],
"by_day": [
{"day": "2026-04-07", "count": 15},
{"day": "2026-04-08", "count": 18},
{"day": "2026-04-09", "count": 14}
],
"sessions": {
"total": 5,
"active": 1
}
}
Example
curl "https://roots.chatforest.com/api/v1/activities/stats?since=2026-04-07" \ -H "X-API-Key: $ROOTS_API_KEY"