EndpointsScreentime

End screentime

Ends active screentime previously started with `/screentime/start`. The duration is counted toward today's screentime usage, split across day boundaries in the schedule's timezone when the screentime crosses local midnight. Status semantics: * `accepted` - the screentime matching `id` was ended, or a retried call for a screentime that was already ended was absorbed idempotently. A `NOT_FOUND` code is returned when no screentime is active for `sessionId`, or when the `id` in this request doesn't match the `id` that started the active screentime.

POST
/screentime/end
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/end" \  -H "Content-Type: application/json" \  -d '{    "sessionId": "b1a6482d-5242-4b4a-aa88-3fa52595a672",    "id": "3f8c1d24-6b5e-4a07-9c2f-8d1e7a4b6c90",    "timestamp": "2026-06-24T16:30:00Z"  }'
{  "sessionId": "b1a6482d-5242-4b4a-aa88-3fa52595a672",  "id": "3f8c1d24-6b5e-4a07-9c2f-8d1e7a4b6c90",  "status": "accepted",  "screentime": {    "counter": {      "timeUsedTodayMinutes": 75,      "timeLimitTodayMinutes": 120,      "timeRemainingTodayMinutes": 45,      "dayResetsAt": "2026-06-25T00:00:00Z"    }  }}