{"openapi":"3.1.0","info":{"title":"TopMod API","version":"1.0.0","description":"Read-only access to your TopMod sessions and evidence (replays and clips), with\ntheir video, keyboard/mouse/controller input and capture fields, for your own\ntools and pipelines.\n\n## Authentication\n\nAn organization admin creates API keys in **Organization Settings › API keys**.\nEach key can read only the workspaces chosen for it. Send the key on every\nrequest:\n\n```\nAuthorization: Bearer tm_AbCd1234_…\n```\n\nThe full key is shown once, when it's created. Store it like a password. If\nit's lost or leaked, revoke it in the same place and create a new one;\nrevoking takes effect on the key's next request. Keys can expire; an expired\nor revoked key gets `401 unauthorized`.\n\n## A typical sync\n\n1. `GET /workspaces` to find the workspace and project IDs your key can read.\n2. `GET /sessions?from=…&to=…` for each period you want (up to 31 days per\n   request), following `next_cursor` until it's `null`.\n3. For each session, `GET /sessions/{id}/evidence` for its replay and clips.\n4. For each piece of evidence:\n   - `GET /evidence/{id}/media` for signed video and thumbnail URLs. Download\n     within an hour, when the URLs expire; request again for fresh ones.\n   - `GET /evidence/{id}/inputs` for keyboard, mouse and controller input,\n     60 seconds at a time, following `next_from_ms` until it's `null`.\n\n## Paging\n\nLists return `data` and `next_cursor`. Pass `next_cursor` back as\n`cursor` (with the same other parameters) to get the next page; `null` means\nthere are no more. Cursors are opaque: don't build or change them. `limit` is\n1–100 (default 50).\n\n## Times\n\nAll timestamps are RFC 3339 in UTC. Offsets (`start_offset_ms`,\n`end_offset_ms`) are milliseconds from the start of the session's\nrecording. Input samples' `t_ms` is milliseconds from the start of that\nevidence's own video, so it lines up with the video file.\n\n## People\n\nPeople are identified only by ID (`reporter_id`). Names and emails are never\nreturned.\n\n## Rate limits\n\nEach key allows 60 requests a minute by default. Every response carries:\n\n- `X-RateLimit-Limit`: requests allowed per minute\n- `X-RateLimit-Remaining`: requests left in the current minute\n- `X-RateLimit-Reset`: when the minute ends (Unix seconds)\n\nOver the limit, you get `429 rate_limited` with `Retry-After` (seconds). If\nyou need a higher limit, contact TopMod support.\n\n## Errors\n\nErrors have one shape:\n\n```json\n{ \"error\": { \"code\": \"not_found\", \"message\": \"Session not found.\" }, \"request_id\": \"01a1f54d-…\" }\n```\n\n| Status | `code` | Meaning |\n|---|---|---|\n| 400 | `invalid_request` | A parameter is missing or invalid; `message` says which |\n| 401 | `unauthorized` | Missing, invalid, revoked or expired key |\n| 404 | `not_found` | No such item, or it's outside your key's workspaces |\n| 405 | `method_not_allowed` | The API is read-only: use `GET` |\n| 429 | `rate_limited` | Too many requests; wait `Retry-After` seconds |\n| 500 | `internal` | Our side; retry, and quote the `request_id` if it persists |\n\nEvery response, including errors, has a `request_id` (also in the\n`X-Request-Id` header). Your organization's admins can see every request in\nthe usage log.\n\n## Compatibility\n\nFields may be added to responses at any time; ignore ones you don't know.\nBreaking changes only come with a new version (`/v2`).","contact":{"name":"TopMod support","url":"https://app.topmod.dev"}},"servers":[{"url":"https://api.topmod.dev/v1","description":"Production"},{"url":"https://staging-api.topmod.dev/v1","description":"Staging"},{"url":"https://dev-api.topmod.dev/v1","description":"Dev"}],"security":[{"ApiKey":[]}],"tags":[{"name":"Workspaces","description":"What your key can read."},{"name":"Sessions","description":"A tester's test session: the root of its evidence."},{"name":"Evidence","description":"A session's replay and clips, with their video and inputs."},{"name":"Service","description":"Health and API description. No key needed."}],"paths":{"/workspaces":{"get":{"tags":["Workspaces"],"operationId":"listWorkspaces","summary":"List the workspaces and projects your key can read","description":"Use this to find the IDs to filter sessions by.","responses":{"200":{"description":"The workspaces in the key's scope, each with its projects.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Workspace"}},"request_id":{"type":"string"}}},"example":{"data":[{"id":"b0000000-0000-0000-0000-000000000001","name":"Fortnite QA","projects":[{"id":"c0000000-0000-0000-0000-000000000005","name":"Season 12 regression","status":"active"}]}],"request_id":"01a1f54d-5d15-730f-bdbb-7ff1a84feca4"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/sessions":{"get":{"tags":["Sessions"],"operationId":"listSessions","summary":"List sessions that started in a time range","description":"Sessions whose `started_at` is at or after `from` and before `to`, oldest first. The range can be at most 31 days; page through longer periods.","parameters":[{"name":"from","in":"query","required":true,"description":"Start of the range (inclusive), RFC 3339 with a time zone.","schema":{"type":"string","format":"date-time"},"example":"2026-11-01T00:00:00Z"},{"name":"to","in":"query","required":true,"description":"End of the range (exclusive), RFC 3339 with a time zone. At most 31 days after `from`.","schema":{"type":"string","format":"date-time"},"example":"2026-11-08T00:00:00Z"},{"name":"workspace_id","in":"query","description":"Only sessions in this workspace.","schema":{"type":"string","format":"uuid"}},{"name":"project_id","in":"query","description":"Only sessions in this project.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"description":"One page of sessions.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Session"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page; `null` when there are no more."},"request_id":{"type":"string"}}},"example":{"data":[{"id":"01a1f540-9f0c-7b6b-a5b0-a5ffbf9d2da2","workspace_id":"b0000000-0000-0000-0000-000000000001","project_id":"c0000000-0000-0000-0000-000000000005","reporter_id":"d1000000-0000-0000-0000-000000000003","name":"Forest level regression pass","description":"Build 1.4.2, full traversal of the Forest level.","category":"regression","category_label":"Regression","status":"completed","started_at":"2026-11-03T14:20:15.360373+00:00","ended_at":"2026-11-03T14:50:15.360373+00:00","duration_ms":1800000,"capture_fields":[{"key":"area","label":"Area","type":"single_select","value":"Forest","start_offset_ms":0,"end_offset_ms":900000},{"key":"area","label":"Area","type":"single_select","value":"Cave","start_offset_ms":900000,"end_offset_ms":null},{"key":"branch","label":"Branch","type":"text","value":"release/1.4","start_offset_ms":0,"end_offset_ms":null}]}],"next_cursor":"eyJzdGFydGVkX2F0Ijoi…","request_id":"01a1f54d-5d15-730f-bdbb-7ff1a84feca4"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/sessions/{id}":{"get":{"tags":["Sessions"],"operationId":"getSession","summary":"Get one session","parameters":[{"name":"id","in":"path","required":true,"description":"The session's ID.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The session.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Session"},"request_id":{"type":"string"}}},"example":{"data":{"id":"01a1f540-9f0c-7b6b-a5b0-a5ffbf9d2da2","workspace_id":"b0000000-0000-0000-0000-000000000001","project_id":"c0000000-0000-0000-0000-000000000005","reporter_id":"d1000000-0000-0000-0000-000000000003","name":"Forest level regression pass","description":"Build 1.4.2, full traversal of the Forest level.","category":"regression","category_label":"Regression","status":"completed","started_at":"2026-11-03T14:20:15.360373+00:00","ended_at":"2026-11-03T14:50:15.360373+00:00","duration_ms":1800000,"capture_fields":[{"key":"area","label":"Area","type":"single_select","value":"Forest","start_offset_ms":0,"end_offset_ms":900000},{"key":"area","label":"Area","type":"single_select","value":"Cave","start_offset_ms":900000,"end_offset_ms":null},{"key":"branch","label":"Branch","type":"text","value":"release/1.4","start_offset_ms":0,"end_offset_ms":null}]},"request_id":"01a1f54d-…"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/sessions/{id}/evidence":{"get":{"tags":["Evidence"],"operationId":"listSessionEvidence","summary":"List a session's replay and clips","description":"Ordered by where they start in the recording.","parameters":[{"name":"id","in":"path","required":true,"description":"The session's ID.","schema":{"type":"string","format":"uuid"}},{"name":"type","in":"query","description":"Comma-separated: `replay`, `clip`, or both (the default).","schema":{"type":"string"},"example":"clip"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"description":"One page of evidence.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","request_id"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Evidence"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page; `null` when there are no more."},"request_id":{"type":"string"}}},"example":{"data":[{"id":"01a1f541-1c2d-7e3f-8a9b-0c1d2e3f4a5b","session_id":"01a1f540-9f0c-7b6b-a5b0-a5ffbf9d2da2","workspace_id":"b0000000-0000-0000-0000-000000000001","project_id":"c0000000-0000-0000-0000-000000000005","type":"clip","name":"Falls through the floor near the bridge","description":null,"reporter_id":"d1000000-0000-0000-0000-000000000003","start_offset_ms":905000,"end_offset_ms":935000,"duration_ms":30000,"created_at":"2026-11-03T14:36:02.118204+00:00","capture_fields":[{"key":"area","label":"Area","type":"single_select","value":"Cave","start_offset_ms":900000,"end_offset_ms":null},{"key":"branch","label":"Branch","type":"text","value":"release/1.4","start_offset_ms":0,"end_offset_ms":null}]}],"next_cursor":null,"request_id":"01a1f54d-…"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/evidence/{id}":{"get":{"tags":["Evidence"],"operationId":"getEvidence","summary":"Get one replay or clip","parameters":[{"name":"id","in":"path","required":true,"description":"The evidence's ID.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The evidence.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Evidence"},"request_id":{"type":"string"}}},"example":{"data":{"id":"01a1f541-1c2d-7e3f-8a9b-0c1d2e3f4a5b","session_id":"01a1f540-9f0c-7b6b-a5b0-a5ffbf9d2da2","workspace_id":"b0000000-0000-0000-0000-000000000001","project_id":"c0000000-0000-0000-0000-000000000005","type":"clip","name":"Falls through the floor near the bridge","description":null,"reporter_id":"d1000000-0000-0000-0000-000000000003","start_offset_ms":905000,"end_offset_ms":935000,"duration_ms":30000,"created_at":"2026-11-03T14:36:02.118204+00:00","capture_fields":[{"key":"area","label":"Area","type":"single_select","value":"Cave","start_offset_ms":900000,"end_offset_ms":null},{"key":"branch","label":"Branch","type":"text","value":"release/1.4","start_offset_ms":0,"end_offset_ms":null}]},"request_id":"01a1f54d-…"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/evidence/{id}/media":{"get":{"tags":["Evidence"],"operationId":"getEvidenceMedia","summary":"Get signed URLs for the video and thumbnail","description":"URLs work for one hour, straight from storage: download within that time, or request again for fresh ones. When a file can't be downloaded, `url` is `null` and `reason` says why.","parameters":[{"name":"id","in":"path","required":true,"description":"The evidence's ID.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The video and thumbnail, each `null` if the evidence has none.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Media"},"request_id":{"type":"string"}}},"example":{"data":{"evidence_id":"01a1f541-1c2d-7e3f-8a9b-0c1d2e3f4a5b","video":{"url":"https://…/events/01a1f541-…/clip.mp4?X-Amz-Signature=…","expires_at":"2026-11-20T13:00:00.000Z","reason":null,"content_type":"video/mp4","size_bytes":18234112,"width":1920,"height":1080,"duration_ms":30000},"thumbnail":null},"request_id":"01a1f54d-…"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/evidence/{id}/inputs":{"get":{"tags":["Evidence"],"operationId":"getEvidenceInputs","summary":"Get keyboard, mouse and controller input, 60 seconds at a time","description":"Input recorded during the evidence: key presses, mouse movement, clicks and scrolling, and controller state.\n\nMouse movement is recorded about once a millisecond while the mouse moves, so a request covers at most 60 seconds. Start at `from_ms=0` and follow `next_from_ms` until it's `null`.\n\n`t_ms` is milliseconds from the start of this evidence's own video. Each device is `null` when it wasn't recorded, and `devices` says why.","parameters":[{"name":"id","in":"path","required":true,"description":"The evidence's ID.","schema":{"type":"string","format":"uuid"}},{"name":"from_ms","in":"query","description":"Start of the window (inclusive), in ms from the start of the video. Default 0.","schema":{"type":"integer","minimum":0}},{"name":"to_ms","in":"query","description":"End of the window (exclusive). At most 60000 after `from_ms`; default `from_ms` + 60000.","schema":{"type":"integer","minimum":1}},{"name":"devices","in":"query","description":"Comma-separated: any of `keyboard`, `mouse`, `controller`. Default all three.","schema":{"type":"string"},"example":"keyboard,mouse"}],"responses":{"200":{"description":"Input in the window.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["data","request_id"],"properties":{"data":{"$ref":"#/components/schemas/Inputs"},"request_id":{"type":"string"}}},"example":{"data":{"evidence_id":"01a1f541-1c2d-7e3f-8a9b-0c1d2e3f4a5b","from_ms":0,"to_ms":60000,"next_from_ms":null,"devices":{"keyboard":"ok","mouse":"ok","controller":"not_recorded"},"keyboard":[{"t_ms":1000,"key":"W","pressed":true,"key_code":87,"scan_code":17,"modifiers":0,"from_controller":false},{"t_ms":1450,"key":"W","pressed":false,"key_code":87,"scan_code":17,"modifiers":0,"from_controller":false}],"mouse":[{"t_ms":500.125,"x":1280,"y":720,"dx":-3,"dy":1,"wheel":0,"button":null,"pressed":false,"from_controller":false},{"t_ms":1210,"x":1277,"y":721,"dx":0,"dy":0,"wheel":0,"button":"Left","pressed":true,"from_controller":false}],"controller":null},"request_id":"01a1f54d-…"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/health":{"get":{"tags":["Service"],"operationId":"health","summary":"Check the API is up","security":[],"responses":{"200":{"description":"The API is up.","content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"const":"ok"}}},"example":{"status":"ok"}}}}}}}},"components":{"securitySchemes":{"ApiKey":{"type":"http","scheme":"bearer","bearerFormat":"tm_{prefix}_{secret}","description":"An API key from Organization Settings › API keys."}},"parameters":{"Cursor":{"name":"cursor","in":"query","description":"The `next_cursor` from the previous page. Omit for the first page.","schema":{"type":"string"}},"Limit":{"name":"limit","in":"query","description":"Items per page, 1–100.","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}},"headers":{"X-Request-Id":{"description":"Identifies this request in your usage log.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current minute.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"When the current minute ends, in Unix seconds.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"responses":{"InvalidRequest":{"description":"A parameter is missing or invalid.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"invalid_request","message":"The date range can be at most 31 days."},"request_id":"01a1f54d-27cc-758d-b47a-92afdacad542"}}}},"Unauthorized":{"description":"Missing, invalid, revoked or expired API key.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"unauthorized","message":"Missing, invalid, revoked or expired API key. Send it as \"Authorization: Bearer tm_…\"."},"request_id":"01a1f54d-27cc-758d-b47a-92afdacad542"}}}},"NotFound":{"description":"No such item, or it's outside your key's workspaces.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"not_found","message":"Session not found."},"request_id":"01a1f54d-27cc-758d-b47a-92afdacad542"}}}},"RateLimited":{"description":"Too many requests.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"rate_limited","message":"Too many requests. This key allows 60 a minute."},"request_id":"01a1f54d-27cc-758d-b47a-92afdacad542"}}}},"Internal":{"description":"Something went wrong on our side.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"internal","message":"Something went wrong on our side. Please try again."},"request_id":"01a1f54d-27cc-758d-b47a-92afdacad542"}}}}},"schemas":{"Error":{"type":"object","required":["error","request_id"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"enum":["invalid_request","unauthorized","not_found","method_not_allowed","rate_limited","internal"]},"message":{"type":"string","description":"Human-readable; may change. Use `code` in your logic."}}},"request_id":{"type":["string","null"],"description":"Null only when the request never reached the key check."}}},"Workspace":{"type":"object","required":["id","name","projects"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"projects":{"type":"array","items":{"type":"object","required":["id","name","status"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","description":"The project's status, e.g. `active` or `complete`."}}}}}},"CaptureField":{"type":"object","description":"One stretch of time a capture field (e.g. Area, Branch, CL) had a value. A field changed mid-session has several, in order.","required":["key","label","type","value","start_offset_ms","end_offset_ms"],"properties":{"key":{"type":"string","description":"Stable field key."},"label":{"type":"string","description":"The field's name when the value was recorded."},"type":{"enum":["single_select","text","number"]},"value":{"type":["string","number","null"],"description":"`null` when the field was cleared."},"start_offset_ms":{"type":"integer","description":"When this value started, in ms from the start of the recording."},"end_offset_ms":{"type":["integer","null"],"description":"When it ended (exclusive); `null` means it ran to the end."}}},"Session":{"type":"object","required":["id","workspace_id","project_id","reporter_id","name","description","category","category_label","status","started_at","ended_at","duration_ms","capture_fields"],"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"reporter_id":{"type":"string","format":"uuid","description":"The tester who recorded it. Only the ID is ever returned."},"name":{"type":["string","null"]},"description":{"type":["string","null"]},"category":{"enum":["regression","bug_reproduction","test_case","exploratory","smoke_test","performance_test","something_else"]},"category_label":{"type":"string","description":"The category as shown in TopMod; the tester's own text for `something_else`."},"status":{"enum":["active","completed","archived","failed"],"description":"`active` while still recording."},"started_at":{"type":"string","format":"date-time"},"ended_at":{"type":["string","null"],"format":"date-time"},"duration_ms":{"type":["integer","null"]},"capture_fields":{"type":"array","items":{"$ref":"#/components/schemas/CaptureField"}}}},"Evidence":{"type":"object","required":["id","session_id","workspace_id","project_id","type","name","description","reporter_id","start_offset_ms","end_offset_ms","duration_ms","created_at","capture_fields"],"properties":{"id":{"type":"string","format":"uuid"},"session_id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"type":{"enum":["replay","clip"],"description":"`replay` is the whole session recording; `clip` is a moment saved from it."},"name":{"type":["string","null"]},"description":{"type":["string","null"]},"reporter_id":{"type":"string","format":"uuid"},"start_offset_ms":{"type":["integer","null"],"description":"Where it starts in the recording."},"end_offset_ms":{"type":["integer","null"]},"duration_ms":{"type":["integer","null"]},"created_at":{"type":"string","format":"date-time"},"capture_fields":{"type":"array","description":"The capture field values active when it starts.","items":{"$ref":"#/components/schemas/CaptureField"}}}},"MediaFile":{"type":"object","required":["url","expires_at","reason","content_type","size_bytes","width","height","duration_ms"],"properties":{"url":{"type":["string","null"],"description":"Signed download URL, or `null` (see `reason`)."},"expires_at":{"type":["string","null"],"format":"date-time"},"reason":{"enum":[null,"removed_by_retention","processing","failed","storage_unavailable"],"description":"Why there's no URL: removed under your data retention policy, still uploading, upload failed, or storage temporarily unreachable."},"content_type":{"type":["string","null"]},"size_bytes":{"type":["integer","null"]},"width":{"type":["integer","null"]},"height":{"type":["integer","null"]},"duration_ms":{"type":["integer","null"]}}},"Media":{"type":"object","required":["evidence_id","video","thumbnail"],"properties":{"evidence_id":{"type":"string","format":"uuid"},"video":{"oneOf":[{"$ref":"#/components/schemas/MediaFile"},{"type":"null"}]},"thumbnail":{"oneOf":[{"$ref":"#/components/schemas/MediaFile"},{"type":"null"}]}}},"DeviceStatus":{"enum":["ok","not_recorded","processing","removed_by_retention","too_large","unreadable","storage_unavailable"],"description":"`ok`, or why the device's samples are `null`."},"KeyboardSample":{"type":"object","required":["t_ms","key","pressed","key_code","scan_code","modifiers","from_controller"],"properties":{"t_ms":{"type":"number","description":"Milliseconds from the start of the video (microsecond precision)."},"key":{"type":"string","description":"Key name, e.g. `W`, `Space`, `LShift`."},"pressed":{"type":"boolean","description":"`true` on key-down, `false` on key-up."},"key_code":{"type":["integer","null"],"description":"Windows virtual-key code. `null` in older recordings."},"scan_code":{"type":["integer","null"]},"modifiers":{"type":["integer","null"],"description":"Bitmask: Alt=1, Ctrl=2, Shift=4, Win=8."},"from_controller":{"type":"boolean","description":"Sent by a controller emulating a keyboard."}}},"MouseSample":{"type":"object","required":["t_ms","x","y","dx","dy","wheel","button","pressed","from_controller"],"properties":{"t_ms":{"type":"number"},"x":{"type":["integer","null"],"description":"Absolute screen X in pixels (negative on a monitor left of the main one). `null` when not recorded."},"y":{"type":["integer","null"]},"dx":{"type":"integer","description":"Relative movement since the previous sample (raw mouse units)."},"dy":{"type":"integer"},"wheel":{"type":"integer","description":"Scroll, in WHEEL_DELTA units (±120 per notch)."},"button":{"type":["string","null"],"description":"`Left`, `Right`, `Middle`, `X1`, `X2`; `null` for movement and scroll."},"pressed":{"type":"boolean"},"from_controller":{"type":"boolean"}}},"ControllerSample":{"type":"object","required":["t_ms","controller_id","event","buttons","left_stick","right_stick","vendor_id"],"properties":{"t_ms":{"type":"number"},"controller_id":{"type":["string","null"]},"event":{"enum":["state","connected","disconnected"],"description":"A full state snapshot, or a connect/disconnect marker."},"buttons":{"type":"object","additionalProperties":{"type":"boolean"},"description":"dpad_up, dpad_down, dpad_left, dpad_right, start, select, left_shoulder, right_shoulder, a, b, x, y, l3, r3, left_trigger, right_trigger."},"left_stick":{"$ref":"#/components/schemas/Stick"},"right_stick":{"$ref":"#/components/schemas/Stick"},"vendor_id":{"type":["integer","null"]}}},"Stick":{"type":"object","required":["x","y"],"properties":{"x":{"type":"integer","description":"-32768 to 32767."},"y":{"type":"integer"}}},"Inputs":{"type":"object","required":["evidence_id","from_ms","to_ms","next_from_ms","devices"],"properties":{"evidence_id":{"type":"string","format":"uuid"},"from_ms":{"type":"integer"},"to_ms":{"type":"integer"},"next_from_ms":{"type":["integer","null"],"description":"Pass as `from_ms` for the next window; `null` at the end."},"devices":{"type":"object","description":"One entry per requested device.","additionalProperties":{"$ref":"#/components/schemas/DeviceStatus"}},"keyboard":{"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/KeyboardSample"}},{"type":"null"}]},"mouse":{"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/MouseSample"}},{"type":"null"}]},"controller":{"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/ControllerSample"}},{"type":"null"}]}}}}}}