GET /events List events

Returns events since the provided cursor. Events are notifications — they tell you what changed, not the data itself. Use cursor-based pagination to process sequentially.

ParameterInTypeRequiredDescription
cursorquerystringoptionalResume from this position (omit to start from the beginning)
user_idquerystringoptionalFilter events for a specific user
limitqueryintegeroptionalMaximum events per page (default: 100)

Example Request

bash
curl -X GET \
  "https://api.sonarhealth.co/v1/events" \
  -H "Authorization: Bearer $TOKEN"

Response 200 Events with cursor for next page

json
{
  "events": [
    {
      "event_id": "evt_01HX4M9ABC",
      "event_type": "data.updated",
      "metrics": [
        "resting_heart_rate",
        "heart_rate_variability",
        "steps"
      ],
      "user_id": "usr_abc123",
      "device_id": "dev_garmin_456",
      "timestamp": "2025-01-15T14:22:00Z"
    },
    {
      "event_id": "evt_01HX4M9ABD",
      "event_type": "score.updated",
      "scores": [
        "recovery_score",
        "sleep_score"
      ],
      "user_id": "usr_abc123",
      "timestamp": "2025-01-15T14:23:12Z"
    }
  ],
  "cursor": "evt_01HX4M9ABD",
  "has_more": true
}