EndpointsScreentime

Submit completed screentime usage segments for a session

Submit one or more completed segments of screentime usage for a k-ID session. Each event records when a span of usage began and how long it lasted. Use this endpoint when usage is known only after the fact - for example, a backend that buffers segments and uploads them periodically, or a game engine that reports session totals on shutdown. Each accepted segment adds its `durationSeconds` to the player's daily screentime total. If a segment crosses midnight in the parent's configured timezone, it is split across both dates so each day's total reflects the usage that actually happened on that date. Events are processed independently. The response carries a per-event status: * `accepted` - the segment was recorded and added to the daily total. Resubmitting an event whose `id` was already accepted is a safe no-op: it counts as `accepted` again and is not added twice, so retries after a network failure won't double-count. * `rejected` - the segment failed validation; the `reason` identifies which rule. The whole batch is rejected when the session does not exist or is revoked. Real-time enforcement signals (`Screentime.LimitWarning`, `Screentime.LimitReached`, `Screentime.BreakReminder`) are not fired from this endpoint. Use `/screentime/start` + `/screentime/end` for integrations that need those webhooks to fire at the moment a threshold is crossed.

POST
/screentime/push
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/screentime/push" \  -H "Content-Type: application/json" \  -d '{    "sessionId": "b1a6482d-5242-4b4a-aa88-3fa52595a672",    "events": [      {        "id": "9d4e2f81-7a3b-4c56-8e90-1f2a3b4c5d6e",        "durationSeconds": 1800,        "timestamp": "2026-06-24T09:00:00Z"      },      {        "id": "c1b2a3d4-5e6f-4708-9a1b-2c3d4e5f6071",        "durationSeconds": 2400,        "timestamp": "2026-06-24T13:00:00Z"      }    ]  }'
{  "sessionId": "b1a6482d-5242-4b4a-aa88-3fa52595a672",  "accepted": 2,  "rejected": 0,  "events": [    {      "id": "9d4e2f81-7a3b-4c56-8e90-1f2a3b4c5d6e",      "status": "accepted"    },    {      "id": "c1b2a3d4-5e6f-4708-9a1b-2c3d4e5f6071",      "status": "accepted"    }  ]}