{"openapi":"3.0.3","info":{"title":"cambackup-rs","description":"","license":{"name":""},"version":"0.1.0"},"paths":{"/api/v1/admin/actions/{id}/":{"post":{"tags":["crate"],"operationId":"admin_action","parameters":[{"name":"id","in":"path","description":"Target user or camera ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAction"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminActionResult"}}}},"403":{"description":"Staff only"},"429":{"description":"Probe cooldown"}},"security":[{"jwt":[]}]}},"/api/v1/admin/gateways/{id}/revoke/":{"post":{"tags":["crate"],"operationId":"admin_revoke_gateway","parameters":[{"name":"id","in":"path","description":"LAN gateway ID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPlaybackRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminActionResult"}}}},"403":{"description":"Current staff access required"}},"security":[{"jwt":[]}]}},"/api/v1/admin/impersonation/":{"post":{"tags":["crate"],"operationId":"admin_admin_impersonation_start","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImpersonationRequest"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImpersonationSession"}}}},"403":{"description":"Interactive administrator password/MFA required; active ordinary target only"},"429":{"description":"Five attempts per fifteen minutes"}},"security":[{"jwt":[]}]}},"/api/v1/admin/impersonation/current/":{"delete":{"tags":["crate"],"operationId":"admin_admin_impersonation_stop","responses":{"200":{"description":"Current support credential revoked; administrator login is unchanged"},"403":{"description":"Support session required"}},"security":[{"jwt":[]}]}},"/api/v1/admin/infrastructure/":{"get":{"tags":["crate"],"operationId":"admin_infrastructure","parameters":[{"name":"offset","in":"query","description":"Page offset, 25 observations per page","required":false,"schema":{"type":"integer","format":"int64","nullable":true}},{"name":"role","in":"query","description":"host, api, worker or gateway","required":false,"schema":{"type":"string","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InfrastructurePage"}}}},"403":{"description":"Current staff role required"}},"security":[{"jwt":[]}]}},"/api/v1/admin/live/{camera}/{file}":{"get":{"tags":["crate"],"operationId":"admin_live_file","parameters":[{"name":"camera","in":"path","description":"Camera ID","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"file","in":"path","description":"index.m3u8 or numeric segment.ts","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Authenticated diagnostic live HLS"},"403":{"description":"Staff only"}},"security":[{"jwt":[]}]}},"/api/v1/admin/media/{kind}/{id}/":{"get":{"tags":["crate"],"operationId":"admin_file","parameters":[{"name":"kind","in":"path","description":"clips or snapshots","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"Saved media ID","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"reason","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AdminReason"}},{"name":"download","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Audited private media bytes","content":{"application/octet-stream":{"schema":{"type":"string"}}}},"206":{"description":"Private byte range"},"403":{"description":"Current staff access required"},"404":{"description":"Media unavailable"}},"security":[{"jwt":[]}]},"head":{"tags":["crate"],"operationId":"admin_head","parameters":[{"name":"kind","in":"path","description":"clips or snapshots","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"Saved media ID","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"reason","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AdminReason"}},{"name":"download","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Audited private media metadata"},"206":{"description":"Private byte range metadata"},"403":{"description":"Current staff access required"}},"security":[{"jwt":[]}]}},"/api/v1/admin/overview/":{"get":{"tags":["crate"],"operationId":"admin_overview","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOverview"}}}},"403":{"description":"Staff only"}},"security":[{"jwt":[]}]}},"/api/v1/admin/recordings/{id}/playback/":{"post":{"tags":["crate"],"operationId":"admin_playback","parameters":[{"name":"id","in":"path","description":"Recording ID","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPlaybackRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPlayback"}}}},"403":{"description":"Staff only"}},"security":[{"jwt":[]}]}},"/api/v1/admin/resources/{resource}/":{"get":{"tags":["crate"],"operationId":"admin_list","parameters":[{"name":"resource","in":"path","description":"Resource name","required":true,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","nullable":true}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int64","nullable":true}},{"name":"owner_id","in":"query","required":false,"schema":{"type":"integer","format":"int32","nullable":true}},{"name":"camera_id","in":"query","required":false,"schema":{"type":"integer","format":"int32","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPage"}}}},"403":{"description":"Staff only"}},"security":[{"jwt":[]}]}},"/api/v1/admin/runtime/events/":{"get":{"tags":["crate"],"operationId":"admin_runtime_events","responses":{"200":{"description":"Staff-only SSE snapshots every two seconds; data is AdminRuntime JSON","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/AdminRuntime"}}}},"403":{"description":"Staff only"}},"security":[{"jwt":[]}]}},"/api/v1/admin/segments/{id}/":{"get":{"tags":["crate"],"operationId":"admin_segment","parameters":[{"name":"id","in":"path","description":"Confirmed segment ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Private transport stream","content":{"video/mp2t":{"schema":{"type":"string"}}}},"403":{"description":"Staff only"}},"security":[{"jwt":[]}]}},"/api/v1/admin/usage/":{"get":{"tags":["crate"],"operationId":"admin_report","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageReport"}}}}},"security":[{"jwt":[]}]}},"/api/v1/auth/login":{"post":{"tags":["crate"],"operationId":"login_handler","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Login successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginOutcome"}}}},"401":{"description":"Invalid credentials"}}}},"/api/v1/auth/magic-link/":{"post":{"tags":["crate"],"operationId":"request_link","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicLinkRequest"}}},"required":true},"responses":{"200":{"description":"If eligible, a sign-in email was sent"},"503":{"description":"Service unavailable"}}}},"/api/v1/auth/magic-link/confirm/":{"post":{"tags":["crate"],"operationId":"confirm_link","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicLinkConfirm"}}},"required":true},"responses":{"200":{"description":"Signed in","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginOutcome"}}}},"400":{"description":"Invalid or expired link"}}}},"/api/v1/auth/mfa/confirm/":{"post":{"tags":["crate"],"operationId":"confirm","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaConfirm"}}},"required":true},"responses":{"200":{"description":"Second factor completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"401":{"description":"Invalid factor or expired challenge"}}}},"/api/v1/auth/oauth/exchange/":{"post":{"tags":["crate"],"operationId":"exchange","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthExchangeRequest"}}},"required":true},"responses":{"200":{"description":"Exchange one-time code bound to browser cookie","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginOutcome"}}}},"401":{"description":"Expired, revoked, reused or unbound code"}}}},"/api/v1/auth/oauth/providers/":{"get":{"tags":["crate"],"operationId":"providers","responses":{"200":{"description":"Configured sign-in providers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthProviders"}}}}}}},"/api/v1/auth/oauth/{provider}/callback/":{"get":{"tags":["crate"],"operationId":"callback","parameters":[{"name":"provider","in":"path","description":"Provider","required":true,"schema":{"type":"string"}},{"name":"state","in":"query","description":"OAuth state","required":false,"schema":{"type":"string","nullable":true}},{"name":"code","in":"query","description":"Provider authorization code","required":false,"schema":{"type":"string","nullable":true}},{"name":"error","in":"query","description":"Provider cancellation","required":false,"schema":{"type":"string","nullable":true}}],"responses":{"302":{"description":"Redirect to dashboard with one-time exchange code or error"},"404":{"description":"Provider unavailable"}}}},"/api/v1/auth/oauth/{provider}/start/":{"get":{"tags":["crate"],"operationId":"start","parameters":[{"name":"provider","in":"path","description":"Configured google or facebook provider","required":true,"schema":{"type":"string"}}],"responses":{"302":{"description":"Redirect to provider; sets browser transaction cookie"},"404":{"description":"Provider unavailable"},"503":{"description":"Sign-in unavailable"}}}},"/api/v1/auth/password-reset":{"post":{"tags":["crate"],"operationId":"password_reset_handler","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetRequest"}}},"required":true},"responses":{"200":{"description":"Reset email sent if account exists"}}}},"/api/v1/auth/password-reset-confirm":{"post":{"tags":["crate"],"operationId":"password_reset_confirm_handler","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetConfirmRequest"}}},"required":true},"responses":{"200":{"description":"Password reset successful"},"400":{"description":"Invalid or expired token"}}}},"/api/v1/auth/register":{"post":{"tags":["crate"],"operationId":"register_handler","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"201":{"description":"Registration successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"400":{"description":"Validation error"},"403":{"description":"Missing, expired or invalid signup security check"},"503":{"description":"Registration or security verification unavailable"}}}},"/api/v1/billing/":{"get":{"tags":["crate"],"operationId":"get_billing","responses":{"200":{"description":"Billing info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingDto"}}}}},"security":[{"jwt":[]}]},"post":{"tags":["crate"],"operationId":"create_card","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCardDto"}}},"required":true},"responses":{"200":{"description":"Card created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingActionResponse"}}}}},"security":[{"jwt":[]}]},"delete":{"tags":["crate"],"operationId":"delete_cards","parameters":[{"name":"card","in":"query","description":"Owned Stripe card identifier to remove","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Selected card deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingActionResponse"}}}}},"security":[{"jwt":[]}]}},"/api/v1/blog/":{"get":{"tags":["crate"],"operationId":"blog_list_articles","responses":{"200":{"description":"Blog articles","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BlogArticleDto"}}}}}}}},"/api/v1/blog/{slug}":{"get":{"tags":["crate"],"operationId":"blog_get_article","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Blog article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogArticleDto"}}}},"404":{"description":"Not found"}}}},"/api/v1/camera-brand/":{"get":{"tags":["crate"],"summary":"List distinct camera brands.","operationId":"list_brands","responses":{"200":{"description":"List of brands","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CameraBrandDto"}}}}}},"security":[{"jwt":[]}]}},"/api/v1/camera-health/{id}/":{"get":{"tags":["crate"],"operationId":"camera_connection_health","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionHealth"}}}}},"security":[{"jwt":[]}]}},"/api/v1/camera-integrations/{id}/events/":{"get":{"tags":["crate"],"operationId":"events","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TriggerEvent"}}}}}},"security":[{"jwt":[]}]},"post":{"tags":["crate"],"operationId":"trigger_owned","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerRequest"}}},"required":true},"responses":{"202":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerEvent"}}}}},"security":[{"jwt":[]}]}},"/api/v1/camera-integrations/{id}/keys/":{"get":{"tags":["crate"],"operationId":"list_keys","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KeyInfo"}}}}}},"security":[{"jwt":[]}]},"post":{"tags":["crate"],"operationId":"create_key","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyRequest"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyCreated"}}}}},"security":[{"jwt":[]}]}},"/api/v1/camera-integrations/{id}/keys/{key}/":{"delete":{"tags":["crate"],"operationId":"revoke_key","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Revoked"}},"security":[{"jwt":[]}]}},"/api/v1/camera-model/":{"get":{"tags":["crate"],"summary":"Alias for camera-brand (models).","operationId":"list_models","responses":{"200":{"description":"List of brands/models","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CameraBrandDto"}}}}}},"security":[{"jwt":[]}]}},"/api/v1/camera-policy/{id}/":{"get":{"tags":["crate"],"operationId":"get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyDocument"}}}}},"security":[{"jwt":[]}]},"put":{"tags":["crate"],"operationId":"put","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyDocument"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyDocument"}}}},"409":{"description":"Stop acquisition first or reload the revised policy"}},"security":[{"jwt":[]}]}},"/api/v1/camera-recording-playlist/{id}":{"get":{"tags":["crate"],"operationId":"camera_recording_playlist","parameters":[{"name":"playlist_token","in":"query","description":"Temporary capability returned by the authenticated recording query","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"M3U8 playlist"},"404":{"description":"No playlist data"}}}},"/api/v1/camera-recording-query/{id}":{"get":{"tags":["crate"],"operationId":"camera_recording_playlist_query","parameters":[{"name":"time","in":"query","description":"ISO 8601 seek timestamp","required":false,"schema":{"type":"string","nullable":true}},{"name":"debug","in":"query","description":"Include segment debug metadata","required":false,"schema":{"type":"string","nullable":true}},{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Playlist query info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaylistQueryResponse"}}}}},"security":[{"jwt":[]}]}},"/api/v1/camera-test-settings/":{"post":{"tags":["crate"],"summary":"Enqueue a camera settings test.","operationId":"test_camera_settings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraSettingsTestDto"}}},"required":true},"responses":{"200":{"description":"Test enqueued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraSettingsTestResponse"}}}}},"security":[{"jwt":[]}]}},"/api/v1/camera/":{"get":{"tags":["crate"],"summary":"List cameras for the authenticated user.","operationId":"list_cameras","responses":{"200":{"description":"List of cameras","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CameraDto"}}}}}},"security":[{"jwt":[]}]},"post":{"tags":["crate"],"summary":"Create a new camera.","operationId":"create_camera","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCameraDto"}}},"required":true},"responses":{"201":{"description":"Camera created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraDto"}}}}},"security":[{"jwt":[]}]}},"/api/v1/camera/{id}/":{"get":{"tags":["crate"],"summary":"Fetch one camera owned by the authenticated user.","operationId":"get_camera","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraDto"}}}},"404":{"description":"Camera not found"}},"security":[{"jwt":[]}]},"put":{"tags":["crate"],"summary":"Update a camera by ID.","operationId":"update_camera","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCameraDto"}}},"required":true},"responses":{"200":{"description":"Camera updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraDto"}}}}},"security":[{"jwt":[]}]},"delete":{"tags":["crate"],"summary":"Delete a camera by ID.","operationId":"delete_camera","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Delete status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteStatus"}}}}},"security":[{"jwt":[]}]}},"/api/v1/cameraevents/":{"get":{"tags":["crate"],"operationId":"camera_events_list","parameters":[{"name":"before_id","in":"query","description":"Fetch older detections before this ID","required":false,"schema":{"type":"integer","format":"int32","nullable":true}},{"name":"limit","in":"query","description":"Page size 1..100; defaults to 100","required":false,"schema":{"type":"integer","format":"int64","nullable":true}}],"responses":{"200":{"description":"Camera events","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CameraEventItem"}}}}}},"security":[{"jwt":[]}]}},"/api/v1/cameraevents/{id}":{"delete":{"tags":["crate"],"operationId":"camera_events_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"201":{"description":"Deleted"}},"security":[{"jwt":[]}]}},"/api/v1/clip-link/":{"get":{"tags":["crate"],"operationId":"clip_link","parameters":[{"name":"camera_id","in":"query","description":"Owned camera","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"start","in":"query","description":"ISO 8601 clip start","required":true,"schema":{"type":"string"}},{"name":"end","in":"query","description":"ISO 8601 clip end","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Clip scheduled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClipLinkResponse"}}}}},"security":[{"jwt":[]}]}},"/api/v1/contact/":{"post":{"tags":["crate"],"operationId":"submit","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactRequest"}}},"required":true},"responses":{"200":{"description":"Contact message accepted by the configured mail provider"},"400":{"description":"Invalid message"},"403":{"description":"Security verification failed"},"409":{"description":"Submission outcome pending or ID reused with different content"},"429":{"description":"Too many messages"},"503":{"description":"Mail or submission tracking unavailable"}}}},"/api/v1/events/":{"get":{"tags":["crate"],"summary":"A live subscription rechecks account/session status every five seconds.","description":"Password changes, account disablement, and token expiration close it; the\nbrowser's reconnect then receives the normal authentication failure.","operationId":"events_handler","responses":{"200":{"description":"Authenticated account event stream; session and API-token status rechecked every five seconds"}},"security":[{"jwt":[]}]}},"/api/v1/facerecognition/":{"get":{"tags":["crate"],"operationId":"list_face_recognitions","parameters":[{"name":"before_id","in":"query","description":"Fetch older detections before this ID","required":false,"schema":{"type":"integer","format":"int32","nullable":true}},{"name":"limit","in":"query","description":"Page size 1..100; defaults to 100","required":false,"schema":{"type":"integer","format":"int64","nullable":true}}],"responses":{"200":{"description":"Face recognitions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FaceRecognitionDto"}}}}}},"security":[{"jwt":[]}]},"post":{"tags":["crate"],"operationId":"create_face_processing","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFaceRequest"}}},"required":true},"responses":{"202":{"description":"Face processing queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaJobResponse"}}}},"404":{"description":"Snapshot not found"},"503":{"description":"Face detector is not configured"}},"security":[{"jwt":[]}]}},"/api/v1/facerecognition/compare/":{"post":{"tags":["crate"],"operationId":"compare_faces","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompareFacesRequest"}}},"required":true},"responses":{"200":{"description":"Similarity of two owned face descriptors; no identity assignment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FaceComparison"}}}},"404":{"description":"Face not found"},"422":{"description":"Compatible embeddings unavailable"}},"security":[{"jwt":[]}]}},"/api/v1/facerecognition/{id}/":{"put":{"tags":["crate"],"operationId":"rename_face","parameters":[{"name":"id","in":"path","description":"Owned face detection","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameFaceRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FaceRecognitionDto"}}}},"404":{"description":"Face not found"}},"security":[{"jwt":[]}]}},"/api/v1/feature-access/":{"get":{"tags":["crate"],"operationId":"commercial_access_status","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureAccess"}}}}},"security":[{"jwt":[]}]}},"/api/v1/gateway/device/cameras/":{"post":{"tags":["crate"],"operationId":"register","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayCamera"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayCameraResult"}}}}}}},"/api/v1/gateway/pair/":{"post":{"tags":["crate"],"operationId":"pair","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairResponse"}}}},"429":{"description":"Pairing capacity reached"}}}},"/api/v1/gateway/pair/{id}/":{"get":{"tags":["crate"],"operationId":"poll","parameters":[{"name":"id","in":"path","description":"Gateway or pairing ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairCheck"}}}}}}},"/api/v1/gateways/":{"get":{"tags":["crate"],"operationId":"list","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayList"}}}}},"security":[{"jwt":[]}]}},"/api/v1/gateways/pair/":{"post":{"tags":["crate"],"operationId":"approve","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovePair"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovedGateway"}}}}},"security":[{"jwt":[]}]}},"/api/v1/gateways/{id}/":{"delete":{"tags":["crate"],"operationId":"revoke","parameters":[{"name":"id","in":"path","description":"Gateway or pairing ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Gateway revoked; existing footage retained"}},"security":[{"jwt":[]}]}},"/api/v1/get-facerecognition/":{"get":{"tags":["crate"],"operationId":"get_face_recognition","parameters":[{"name":"job_id","in":"query","description":"Owned face processing job","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Face recognition result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetFaceRecognitionResponse"}}}}},"security":[{"jwt":[]}]}},"/api/v1/ingest/":{"get":{"tags":["crate"],"operationId":"ingest_list","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestList"}}}}},"security":[{"jwt":[]}]},"post":{"tags":["crate"],"operationId":"ingest_create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestCreate"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestCredential"}}}},"503":{"description":"Push service unavailable"}},"security":[{"jwt":[]}]}},"/api/v1/ingest/{id}/":{"delete":{"tags":["crate"],"operationId":"ingest_revoke","parameters":[{"name":"id","in":"path","description":"Owned push camera ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Publisher revoked; saved footage retained","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestRevoked"}}}}},"security":[{"jwt":[]}]}},"/api/v1/ingest/{id}/rotate/":{"post":{"tags":["crate"],"operationId":"ingest_rotate","parameters":[{"name":"id","in":"path","description":"Owned push camera ID","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestCredential"}}}}},"security":[{"jwt":[]}]}},"/api/v1/integration-events/":{"post":{"tags":["crate"],"operationId":"trigger","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerRequest"}}},"required":true},"responses":{"202":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerEvent"}}}}},"security":[{"integrationKey":[]}]}},"/api/v1/jobs/{id}/":{"get":{"tags":["crate"],"operationId":"status","parameters":[{"name":"id","in":"path","description":"Owned background job","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Job status and completed result metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStatus"}}}},"404":{"description":"Job not found"}},"security":[{"jwt":[]}]}},"/api/v1/mcp/":{"post":{"tags":["crate"],"operationId":"handle","requestBody":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}},"required":true},"responses":{"200":{"description":"Authenticated stateless MCP JSON-RPC: discovery, tools/list and tools/call"},"403":{"description":"Dedicated API token or allowed origin required"}}}},"/api/v1/media/{key}":{"get":{"tags":["crate"],"operationId":"serve","parameters":[{"name":"key","in":"path","description":"Owned object key","required":true,"schema":{"type":"string"}},{"name":"uid","in":"query","description":"Signed capability owner","required":false,"schema":{"type":"integer","format":"int32","nullable":true}},{"name":"exp","in":"query","description":"Signed capability expiry","required":false,"schema":{"type":"integer","format":"int64","nullable":true,"minimum":0}},{"name":"signature","in":"query","description":"Temporary media signature","required":false,"schema":{"type":"string","nullable":true}}],"responses":{"200":{"description":"Owned media bytes; also supports HEAD and Range/206"},"206":{"description":"Requested byte range"},"401":{"description":"Bearer JWT, media:read API token or valid signed capability required"}}}},"/api/v1/oauth-link/{provider}/":{"post":{"tags":["crate"],"operationId":"link_start","parameters":[{"name":"provider","in":"path","description":"Configured provider to connect","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthLinkRequest"}}},"required":true},"responses":{"200":{"description":"Browser-bound provider authorization URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthLinkResponse"}}}},"400":{"description":"Current password verification required"},"401":{"description":"Authentication required"},"404":{"description":"Provider unavailable"}},"security":[{"jwt":[]}]}},"/api/v1/onvif/profiles/":{"post":{"tags":["crate"],"operationId":"profiles","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnvifRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnvifResult"}}}},"422":{"description":"Camera resolution failed"}},"security":[{"jwt":[]}]}},"/api/v1/plan/":{"get":{"tags":["crate"],"operationId":"list_plans","parameters":[{"name":"camera","in":"query","description":"Camera ID to compare plans against","required":false,"schema":{"type":"integer","format":"int32","nullable":true}}],"responses":{"200":{"description":"List of plans with upgrade/downgrade actions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CameraPlanDto"}}}}}},"security":[{"jwt":[]}]}},"/api/v1/public-stream/":{"get":{"tags":["crate"],"operationId":"list_public_streams","responses":{"200":{"description":"List of public streams","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicStreamList"}}}}},"security":[{"jwt":[]}]},"post":{"tags":["crate"],"operationId":"create_public_stream","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePublicStreamDto"}}},"required":true},"responses":{"201":{"description":"Public stream created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicStreamDto"}}}}},"security":[{"jwt":[]}]}},"/api/v1/public-stream/{id}/":{"get":{"tags":["crate"],"operationId":"get_public_stream","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Public stream found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicStreamDto"}}}},"404":{"description":"Not found"}},"security":[{"jwt":[]}]},"put":{"tags":["crate"],"operationId":"update_public_stream","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePublicStreamDto"}}},"required":true},"responses":{"200":{"description":"Public stream updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicStreamDto"}}}}},"security":[{"jwt":[]}]},"delete":{"tags":["crate"],"operationId":"delete_public_stream","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Public stream deleted"}},"security":[{"jwt":[]}]}},"/api/v1/public-watch/{key}/":{"get":{"tags":["crate"],"operationId":"info","parameters":[{"name":"key","in":"path","description":"Revocable public share key","required":true,"schema":{"type":"string"}},{"name":"resume","in":"query","required":false,"schema":{"type":"boolean","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicWatchInfo"}}}},"404":{"description":"Share unavailable or revoked"}}}},"/api/v1/public-watch/{key}/index.m3u8":{"get":{"tags":["crate"],"operationId":"playlist","parameters":[{"name":"key","in":"path","description":"Public share key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/vnd.apple.mpegurl":{"schema":{"type":"string"}}}},"404":{"description":"Share unavailable or revoked"},"503":{"description":"Stream connecting; retry"}}}},"/api/v1/public-watch/{key}/segment-{sequence}.ts":{"get":{"tags":["crate"],"operationId":"segment","parameters":[{"name":"key","in":"path","description":"Public share key","required":true,"schema":{"type":"string"}},{"name":"sequence","in":"path","description":"Segment sequence number","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"video/mp2t":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Segment or share unavailable"}}}},"/api/v1/push/":{"get":{"tags":["crate"],"operationId":"push_status","responses":{"200":{"description":"Owned active devices and VAPID public key; interactive session required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushStatus"}}}}}},"post":{"tags":["crate"],"operationId":"push_register","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushRegister"}}},"required":true},"responses":{"200":{"description":"Register or update this browser; endpoint never returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushSaved"}}}}}}},"/api/v1/push/{id}/":{"delete":{"tags":["crate"],"operationId":"push_revoke","parameters":[{"name":"id","in":"path","description":"Owned device identifier","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Revoke an owned browser device and cancel pending pushes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushResult"}}}}}}},"/api/v1/push/{id}/test/":{"post":{"tags":["crate"],"operationId":"push_test","parameters":[{"name":"id","in":"path","description":"Owned device identifier","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"202":{"description":"Queue one visible test; at most once a minute per device","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushResult"}}}}}}},"/api/v1/pusher/":{"post":{"tags":["crate"],"operationId":"pusher_auth","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PusherAuthRequest"}}},"required":true},"responses":{"200":{"description":"Pusher auth response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PusherAuthResponse"}}}},"403":{"description":"Forbidden"}},"security":[{"jwt":[]}]}},"/api/v1/recording-entitlement/{id}/":{"get":{"tags":["crate"],"operationId":"recording_entitlement","parameters":[{"name":"id","in":"path","description":"Owned camera","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Current cloud recording access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordingEntitlement"}}}},"404":{"description":"Camera not found"}},"security":[{"jwt":[]}]}},"/api/v1/recording-timeline/{id}":{"get":{"tags":["crate"],"operationId":"camera_recording_timeline","parameters":[{"name":"range","in":"query","description":"1h, 2h, 3h, 6h, 12h or 24h; defaults to 6h","required":false,"schema":{"type":"string","nullable":true}},{"name":"date","in":"query","description":"Account-local date YYYY-MM-DD","required":false,"schema":{"type":"string","nullable":true}},{"name":"time","in":"query","description":"ISO 8601 time or time on the selected date","required":false,"schema":{"type":"string","nullable":true}},{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Recording timeline","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimelineResponse"}}}}},"security":[{"jwt":[]}]}},"/api/v1/security/api-tokens/":{"get":{"tags":["crate"],"operationId":"security_list","responses":{"200":{"description":"Token metadata and available scopes; never secret values","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiTokenList"}}}}}},"post":{"tags":["crate"],"operationId":"security_create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiToken"}}},"required":true},"responses":{"201":{"description":"Created: secret shown once","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiTokenCreated"}}}}}}},"/api/v1/security/api-tokens/{id}/":{"delete":{"tags":["crate"],"operationId":"security_revoke","parameters":[{"name":"id","in":"path","description":"Owned token identifier","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Revoked owned token"}}}},"/api/v1/security/mfa/":{"get":{"tags":["crate"],"operationId":"security_status","responses":{"200":{"description":"MFA status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaStatus"}}}}}}},"/api/v1/security/mfa/disable/":{"post":{"tags":["crate"],"operationId":"security_disable","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityProof"}}},"required":true},"responses":{"200":{"description":"MFA disabled after password and factor; replacement session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityChange"}}}}}}},"/api/v1/security/mfa/enable/":{"post":{"tags":["crate"],"operationId":"security_enable","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaEnable"}}},"required":true},"responses":{"200":{"description":"MFA enabled; replacement session and one-time recovery codes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityChange"}}}}}}},"/api/v1/security/mfa/recovery-codes/":{"post":{"tags":["crate"],"operationId":"security_replace_codes","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityProof"}}},"required":true},"responses":{"200":{"description":"Replace recovery codes after password and factor; replacement session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityChange"}}}}}}},"/api/v1/security/mfa/setup/":{"post":{"tags":["crate"],"operationId":"security_setup","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityProof"}}},"required":true},"responses":{"200":{"description":"Temporary authenticator setup; no MFA change until confirmation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaSetup"}}}}}}},"/api/v1/snapshot/":{"get":{"tags":["crate"],"operationId":"list_snapshots","parameters":[{"name":"camera_id","in":"query","required":false,"schema":{"type":"integer","format":"int32","nullable":true}},{"name":"limit","in":"query","description":"Default 100, maximum 100. Results use descending immutable IDs.","required":false,"schema":{"type":"integer","format":"int64","nullable":true}},{"name":"before_id","in":"query","required":false,"schema":{"type":"integer","format":"int32","nullable":true}},{"name":"format","in":"query","description":"jpeg selects still images; gif selects recorded animations.","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/SnapshotFormat"}],"nullable":true}}],"responses":{"200":{"description":"List of snapshots","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotList"}}}}},"security":[{"jwt":[]}]},"post":{"tags":["crate"],"operationId":"create_snapshot","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSnapshotDto"}}},"required":true},"responses":{"202":{"description":"Snapshot capture queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaJobResponse"}}}}},"security":[{"jwt":[]}]}},"/api/v1/snapshot/delete/":{"post":{"tags":["crate"],"operationId":"delete_snapshot_alt","requestBody":{"description":"","content":{"application/json":{"schema":{}}},"required":true},"responses":{"200":{"description":"Snapshot deleted"}},"security":[{"jwt":[]}]}},"/api/v1/snapshot/{id}/":{"get":{"tags":["crate"],"operationId":"get_snapshot","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Snapshot found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotDto"}}}},"404":{"description":"Not found"}},"security":[{"jwt":[]}]},"put":{"tags":["crate"],"operationId":"update_snapshot","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSnapshotDto"}}},"required":true},"responses":{"200":{"description":"Snapshot updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotDto"}}}}},"security":[{"jwt":[]}]},"delete":{"tags":["crate"],"operationId":"delete_snapshot","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Snapshot deleted"}},"security":[{"jwt":[]}]}},"/api/v1/software-version/":{"get":{"tags":["crate"],"operationId":"software_version","responses":{"200":{"description":"Software version info","content":{"application/json":{"schema":{}}}}}}},"/api/v1/start-record/":{"post":{"tags":["crate"],"operationId":"start_record","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartRecordDto"}}},"required":true},"responses":{"201":{"description":"Recording started","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartRecordResponse"}}}}},"security":[{"jwt":[]}]}},"/api/v1/stop-record/":{"post":{"tags":["crate"],"operationId":"stop_record","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StopRecordDto"}}},"required":true},"responses":{"201":{"description":"Recording stopped","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StopRecordResponse"}}}}},"security":[{"jwt":[]}]}},"/api/v1/stream-ping/":{"post":{"tags":["crate"],"operationId":"stream_ping","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamPingDto"}}},"required":true},"responses":{"200":{"description":"Ping response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamPingResponse"}}}}},"security":[{"jwt":[]}]}},"/api/v1/stream-segments/{file}":{"get":{"tags":["crate"],"operationId":"serve_segment","parameters":[{"name":"file","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Segment redirect"}}}},"/api/v1/stream-stop/{id}":{"get":{"tags":["crate"],"operationId":"stop_stream","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Stream stop status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamStopResponse"}}}}},"security":[{"jwt":[]}]}},"/api/v1/stream-url/{id}":{"get":{"tags":["crate"],"operationId":"get_stream_url","parameters":[{"name":"resume","in":"query","required":false,"schema":{"type":"boolean","nullable":true}},{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Stream URL info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamUrlResponse"}}}}},"security":[{"jwt":[]}]}},"/api/v1/subscription/":{"get":{"tags":["crate"],"operationId":"list_subscriptions","responses":{"200":{"description":"Subscriptions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionDto"}}}}}},"security":[{"jwt":[]}]},"post":{"tags":["crate"],"operationId":"create_subscription","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriptionDto"}}},"required":true},"responses":{"200":{"description":"Subscription created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionActionResponse"}}}}},"security":[{"jwt":[]}]},"delete":{"tags":["crate"],"operationId":"delete_subscription","parameters":[{"name":"camera","in":"query","description":"Owned camera whose exact subscription is canceled immediately","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Subscription deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionActionResponse"}}}}},"security":[{"jwt":[]}]}},"/api/v1/subscription/payment/":{"post":{"tags":["crate"],"operationId":"recover_payment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRecoveryDto"}}},"required":true},"responses":{"200":{"description":"Verified payment status and optional owned Stripe payment page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionActionResponse"}}}}},"security":[{"jwt":[]}]}},"/api/v1/subscription/preview/":{"post":{"tags":["crate"],"operationId":"preview_subscription","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriptionDto"}}},"required":true},"responses":{"200":{"description":"Read-only estimate of the immediate invoice, before payment confirmation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPreviewResponse"}}}}},"security":[{"jwt":[]}]}},"/api/v1/support/":{"get":{"tags":["crate"],"operationId":"list_articles","responses":{"200":{"description":"Support articles","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgebaseArticleDto"}}}}}}}},"/api/v1/support/{id}":{"get":{"tags":["crate"],"operationId":"get_article","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Support article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgebaseArticleDto"}}}},"404":{"description":"Not found"}}}},"/api/v1/timezone-list/":{"get":{"tags":["crate"],"operationId":"list_timezones","responses":{"200":{"description":"List of timezones","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}}},"security":[{"jwt":[]}]}},"/api/v1/token/refresh/":{"post":{"tags":["crate"],"operationId":"refresh_token_handler","responses":{"200":{"description":"Refreshed interactive JWT without changing its session generation"},"403":{"description":"Personal API tokens cannot refresh into interactive sessions"}},"security":[{"jwt":[]}]}},"/api/v1/user/":{"get":{"tags":["crate"],"operationId":"get_current_user","responses":{"200":{"description":"Current user","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserDto"}}}}}},"security":[{"jwt":[]}]}},"/api/v1/user/{id}/":{"put":{"tags":["crate"],"operationId":"update_current_user","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserDto"}}},"required":true},"responses":{"200":{"description":"Updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDto"}}}}},"security":[{"jwt":[]}]}},"/api/v1/video-clip/":{"get":{"tags":["crate"],"operationId":"list_video_clips","responses":{"200":{"description":"List of video clips","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoClipList"}}}}},"security":[{"jwt":[]}]},"post":{"tags":["crate"],"operationId":"create_video_clip","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVideoClipDto"}}},"required":true},"responses":{"202":{"description":"Video clip export queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaJobResponse"}}}}},"security":[{"jwt":[]}]}},"/api/v1/video-clip/{id}/":{"get":{"tags":["crate"],"operationId":"get_video_clip","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Video clip found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoClipDto"}}}},"404":{"description":"Not found"}},"security":[{"jwt":[]}]},"put":{"tags":["crate"],"operationId":"update_video_clip","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateVideoClipDto"}}},"required":true},"responses":{"200":{"description":"Video clip updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoClipDto"}}}}},"security":[{"jwt":[]}]},"delete":{"tags":["crate"],"operationId":"delete_video_clip","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Video clip deleted"}},"security":[{"jwt":[]}]}},"/api/v1/video-recording/":{"get":{"tags":["crate"],"operationId":"list_recordings","parameters":[{"name":"limit","in":"query","description":"Page size 1–100; default 50","required":false,"schema":{"type":"integer","format":"int64","nullable":true}},{"name":"before_id","in":"query","description":"Older than this recording ID","required":false,"schema":{"type":"integer","format":"int32","nullable":true}},{"name":"camera_id","in":"query","description":"Filter owned camera","required":false,"schema":{"type":"integer","format":"int32","nullable":true}}],"responses":{"200":{"description":"List of video recordings","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VideoRecordDto"}}}}}},"security":[{"jwt":[]}]}},"/api/v1/video-recording/{id}/":{"get":{"tags":["crate"],"operationId":"get_recording","parameters":[{"name":"id","in":"path","description":"Owned recording session","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Recording session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoRecordDto"}}}},"404":{"description":"Recording not found"}},"security":[{"jwt":[]}]},"delete":{"tags":["crate"],"operationId":"delete_recording","parameters":[{"name":"id","in":"path","description":"Finalized owned recording session","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Recording revoked; storage cleanup queued"},"404":{"description":"Recording not found"},"409":{"description":"Recording is still active"}},"security":[{"jwt":[]}]}},"/webhooks/stripe/":{"post":{"tags":["crate"],"operationId":"stripe_webhook","requestBody":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}},"required":true},"responses":{"200":{"description":"Webhook processed"},"400":{"description":"Invalid payload"}}}}},"components":{"schemas":{"AdminAction":{"type":"object","required":["action","reason"],"properties":{"action":{"$ref":"#/components/schemas/AdminOperation"},"reason":{"$ref":"#/components/schemas/AdminReason"}},"additionalProperties":false},"AdminActionResult":{"type":"object","required":["message"],"properties":{"job_id":{"type":"integer","format":"int64","nullable":true},"message":{"type":"string"}}},"AdminMediaQuery":{"type":"object","required":["reason"],"properties":{"download":{"type":"boolean"},"reason":{"$ref":"#/components/schemas/AdminReason"}},"additionalProperties":false},"AdminOperation":{"type":"string","enum":["activate_user","deactivate_user","revoke_sessions","revoke_publisher","view_recording","preview_live","stop_stream","test_camera","record_sample","stop_recording","revoke_shares","revoke_share","activate_camera","deactivate_camera","view_clip","download_clip","view_snapshot","download_snapshot"]},"AdminOverview":{"type":"object","required":["counts","configuration","redis_reachable"],"properties":{"configuration":{},"counts":{},"redis_reachable":{"type":"boolean"}}},"AdminPage":{"type":"object","required":["results","total"],"properties":{"next_offset":{"type":"integer","format":"int64","nullable":true},"results":{"type":"array","items":{}},"total":{"type":"integer","format":"int64"}}},"AdminPlayback":{"type":"object","required":["segments","truncated"],"properties":{"segments":{"type":"array","items":{"$ref":"#/components/schemas/AdminSegment"}},"truncated":{"type":"boolean"}}},"AdminPlaybackRequest":{"type":"object","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/AdminReason"}},"additionalProperties":false},"AdminReason":{"type":"string","enum":["support","security","verification"]},"AdminRuntime":{"type":"object","required":["observed_at","counts"],"properties":{"counts":{},"observed_at":{"type":"string"}}},"AdminSegment":{"type":"object","required":["id","duration","start","end"],"properties":{"duration":{"type":"number","format":"double"},"end":{"type":"number","format":"double"},"id":{"type":"integer","format":"int32"},"start":{"type":"number","format":"double"}}},"ApiTokenCreated":{"type":"object","required":["id","name","prefix","token","scopes","expires_at"],"properties":{"expires_at":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"prefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"token":{"type":"string"}}},"ApiTokenInfo":{"type":"object","required":["id","name","prefix","scopes","created_at","expires_at","active"],"properties":{"active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"last_used_at":{"type":"string","format":"date-time","nullable":true},"name":{"type":"string"},"prefix":{"type":"string"},"revoked_at":{"type":"string","format":"date-time","nullable":true},"scopes":{"type":"array","items":{"type":"string"}}}},"ApiTokenList":{"type":"object","required":["results","available_scopes","mcp_url","developer_api","access_message"],"properties":{"access_message":{"type":"string"},"available_scopes":{"type":"array","items":{"type":"string"}},"developer_api":{"type":"boolean"},"mcp_url":{"type":"string"},"results":{"type":"array","items":{"$ref":"#/components/schemas/ApiTokenInfo"}}}},"ApprovePair":{"type":"object","required":["code"],"properties":{"code":{"type":"string"}},"additionalProperties":false},"ApprovedGateway":{"type":"object","required":["gateway_id"],"properties":{"gateway_id":{"type":"string","format":"uuid"}}},"AuthUserDto":{"type":"object","required":["id","username","email","first_name","last_name","is_staff"],"properties":{"email":{"type":"string"},"first_name":{"type":"string"},"id":{"type":"integer","format":"int32"},"is_staff":{"type":"boolean"},"last_name":{"type":"string"},"username":{"type":"string"}}},"BillingActionResponse":{"type":"object","required":["status"],"properties":{"extraInfo":{"type":"string","nullable":true},"status":{"type":"boolean"}}},"BillingDto":{"type":"object","required":["stripecard_set"],"properties":{"stripecard_set":{"type":"array","items":{"$ref":"#/components/schemas/StripeCardDto"}}}},"BlogArticleDto":{"type":"object","required":["id","title","slug","body","published"],"properties":{"body":{"type":"string"},"created_at":{"type":"string","format":"date-time","nullable":true},"id":{"type":"integer","format":"int32"},"image":{"type":"string","nullable":true},"published":{"type":"boolean"},"short_body":{"type":"string","nullable":true},"slug":{"type":"string"},"title":{"type":"string"}}},"CameraBrandDto":{"type":"object","required":["id","brand"],"properties":{"brand":{"type":"string"},"id":{"type":"integer","format":"int32"}}},"CameraDto":{"type":"object","required":["id","name","status","recordings","recording_active","username","port","rtsp_port","url","password","recording_on","offline_notify","recording_alerts_configured","recording_alert_grace_seconds","recording_label","recognizer_tags"],"properties":{"camera":{"type":"integer","format":"int32","nullable":true},"connection_health":{"$ref":"#/components/schemas/ConnectionHealth"},"custom_url":{"type":"string","nullable":true},"id":{"type":"integer","format":"int32"},"model":{"type":"string","nullable":true},"model_id":{"type":"integer","format":"int32","nullable":true},"name":{"type":"string"},"offline_notify":{"type":"boolean"},"password":{"type":"string"},"plan":{"allOf":[{"$ref":"#/components/schemas/PlanDto"}],"nullable":true},"port":{"type":"string"},"push_ingest":{"type":"boolean"},"recognizer_tags":{},"recording_active":{"type":"boolean"},"recording_alert_grace_seconds":{"type":"integer","format":"int64","minimum":0},"recording_alerts_configured":{"type":"boolean"},"recording_label":{"type":"string"},"recording_on":{"type":"boolean"},"recording_time":{"type":"integer","format":"int64","nullable":true},"recordings":{"type":"boolean"},"rtsp_port":{"type":"string"},"slug":{"type":"string","nullable":true},"status":{"type":"string"},"thumbnail":{"type":"string","nullable":true},"thumbnail_url":{"type":"string","nullable":true},"updated_at":{"type":"string","format":"date-time","nullable":true},"url":{"type":"string"},"username":{"type":"string"}}},"CameraEventItem":{"type":"object","required":["type","data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FaceRecognitionDto"}},"type":{"type":"string"}}},"CameraPlanDto":{"type":"object","required":["name","small_digit","action","class","id"],"properties":{"action":{"type":"string"},"amount_minor":{"type":"integer","format":"int32","nullable":true},"class":{"type":"string"},"currency":{"type":"string","nullable":true},"id":{"type":"integer","format":"int32"},"interval":{"type":"string","nullable":true},"interval_count":{"type":"integer","format":"int32","nullable":true},"name":{"type":"string"},"price":{"type":"string","nullable":true},"small_digit":{"type":"string"},"title":{"type":"string","nullable":true}}},"CameraSettingsTestDto":{"type":"object","properties":{"brand":{"type":"string","nullable":true},"camera_address":{"type":"string"},"camera_password":{"type":"string","nullable":true},"camera_port":{"type":"string","nullable":true},"camera_rtsp_port":{"type":"string","nullable":true},"camera_username":{"type":"string","nullable":true},"custom_url":{"type":"string","nullable":true},"mode":{"type":"string","nullable":true}}},"CameraSettingsTestResponse":{"type":"object","required":["status","token"],"properties":{"status":{"type":"boolean"},"token":{"type":"string","format":"uuid"}}},"CapturePolicy":{"type":"object","properties":{"animated_preview":{"type":"boolean","description":"Store bounded GIF samples of recorded footage; disabled by default.","default":false},"audio":{"type":"boolean","default":true},"automatic_faces":{"type":"boolean","default":false},"face_interval_seconds":{"type":"integer","format":"int32","default":300,"minimum":0},"fps":{"type":"integer","format":"int32","default":null,"nullable":true,"minimum":0},"masks":{"type":"array","items":{"$ref":"#/components/schemas/PrivacyMask"},"default":[]},"max_width":{"type":"integer","format":"int32","description":"None preserves source resolution. Never upscale.","default":null,"nullable":true,"minimum":0},"monitor_connection":{"type":"boolean","default":true},"preview_interval_seconds":{"type":"integer","format":"int32","default":300,"minimum":0},"quality":{"type":"integer","format":"int32","description":"x264 constant rate factor: lower means higher quality and larger files.","default":23,"minimum":0}},"additionalProperties":false},"ClipLinkDto":{"type":"object","required":["start","end","camera_id"],"properties":{"camera_id":{"type":"integer","format":"int32"},"end":{"type":"string"},"start":{"type":"string"}}},"ClipLinkResponse":{"type":"object","required":["status","job_id"],"properties":{"job_id":{"type":"integer","format":"int64"},"status":{"type":"string"}}},"CompareFacesRequest":{"type":"object","required":["face_id","other_face_id"],"properties":{"face_id":{"type":"integer","format":"int32"},"other_face_id":{"type":"integer","format":"int32"}},"additionalProperties":false},"ConnectionHealth":{"type":"object","required":["state"],"properties":{"failure_since":{"type":"string","format":"date-time","nullable":true},"last_success_at":{"type":"string","format":"date-time","nullable":true},"observed_at":{"type":"string","format":"date-time","nullable":true},"source":{"type":"string","nullable":true},"state":{"type":"string"}}},"ContactRequest":{"type":"object","required":["name","email","message","submission_id"],"properties":{"email":{"type":"string"},"message":{"type":"string"},"name":{"type":"string"},"submission_id":{"type":"string","description":"Keep the same random ID when retrying an uncertain submission."},"turnstile_token":{"type":"string","nullable":true},"website":{"type":"string"}},"additionalProperties":false},"CreateApiToken":{"type":"object","required":["name","scopes","ttl_days","password"],"properties":{"code":{"type":"string"},"name":{"type":"string"},"password":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"ttl_days":{"type":"integer","format":"int64"}}},"CreateCameraDto":{"type":"object","required":["name"],"properties":{"active":{"type":"boolean"},"camera_id":{"type":"integer","format":"int32"},"custom_url":{"type":"string","nullable":true},"name":{"type":"string"},"offline_notify":{"type":"boolean"},"password":{"type":"string"},"port":{"type":"string"},"recording_on":{"type":"boolean"},"rtsp_port":{"type":"string"},"status":{"type":"string"},"url":{"type":"string"},"username":{"type":"string"}}},"CreateCardDto":{"type":"object","properties":{"token":{"type":"string","nullable":true}}},"CreateFaceRequest":{"type":"object","required":["snapshot_id"],"properties":{"snapshot_id":{"type":"integer","format":"int32"}},"additionalProperties":false},"CreatePublicStreamDto":{"type":"object","required":["camera_id"],"properties":{"active":{"type":"boolean","nullable":true},"camera_id":{"type":"integer","format":"int32"},"key":{"type":"string","nullable":true}}},"CreateSnapshotDto":{"type":"object","required":["camera_id"],"properties":{"camera_id":{"type":"integer","format":"int32"},"format":{"$ref":"#/components/schemas/SnapshotFormat"},"note":{"type":"string","nullable":true}},"additionalProperties":false},"CreateSubscriptionDto":{"type":"object","properties":{"camera":{"type":"integer","format":"int32","nullable":true},"plan":{"type":"integer","format":"int32","nullable":true},"proration_date":{"type":"integer","format":"int64","description":"Timestamp returned by invoice preview; preserves the quoted proration calculation.","nullable":true}}},"CreateVideoClipDto":{"type":"object","required":["camera_id","start_time","end_time"],"properties":{"camera_id":{"type":"integer","format":"int32"},"end_time":{"type":"string"},"name":{"type":"string","nullable":true},"start_time":{"type":"string"}},"additionalProperties":false},"DeleteSnapshotResponse":{"type":"object","required":["status"],"properties":{"msg":{"type":"string","nullable":true},"status":{"type":"boolean"}}},"DeleteStatus":{"type":"object","required":["status"],"properties":{"extraInfo":{"type":"string","nullable":true},"status":{"type":"boolean"}}},"FaceComparison":{"type":"object","required":["cosine_similarity","model"],"properties":{"cosine_similarity":{"type":"number","format":"double"},"model":{"type":"string"}}},"FaceRecognitionDto":{"type":"object","required":["id","name"],"properties":{"created_at":{"type":"string","format":"date-time","nullable":true},"id":{"type":"integer","format":"int32"},"image":{"type":"string","nullable":true},"name":{"type":"string"},"original_image":{"type":"string","nullable":true},"video_segment":{"type":"integer","format":"int32","nullable":true}}},"FeatureAccess":{"type":"object","required":["developer_api","widget_camera_ids","required_plans","message"],"properties":{"developer_api":{"type":"boolean"},"message":{"type":"string"},"required_plans":{"type":"array","items":{"type":"string"}},"widget_camera_ids":{"type":"array","items":{"type":"integer","format":"int32"}}}},"FirstSegmentInfo":{"type":"object","required":["video_record","video_record_created_at","video_record_created_at_in_user_timezone","start","end"],"properties":{"duration":{"type":"number","format":"double","nullable":true},"end":{"type":"number","format":"double"},"start":{"type":"number","format":"double"},"video_record":{"type":"integer","format":"int32"},"video_record_created_at":{"type":"string"},"video_record_created_at_in_user_timezone":{"type":"string"}}},"GatewayCamera":{"type":"object","required":["local_id","name"],"properties":{"local_id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"additionalProperties":false},"GatewayCameraResult":{"type":"object","required":["camera_id"],"properties":{"camera_id":{"type":"integer","format":"int32"}}},"GatewayInfo":{"type":"object","required":["id","name","created_at","expires_at","online","streams","cameras"],"properties":{"cameras":{"type":"array","items":{}},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"last_seen_at":{"type":"string","format":"date-time","nullable":true},"name":{"type":"string"},"online":{"type":"boolean"},"revoked_at":{"type":"string","format":"date-time","nullable":true},"streams":{"type":"integer","minimum":0}}},"GatewayList":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/GatewayInfo"}}}},"GetFaceRecognitionResponse":{"type":"object","required":["job_id","status","faces","processed","locations","face_list"],"properties":{"error":{"type":"string","nullable":true},"face_list":{"type":"array","items":{"type":"string"}},"faces":{"type":"integer","format":"int32"},"job_id":{"type":"integer","format":"int64"},"locations":{"type":"string"},"processed":{"type":"boolean"},"status":{"type":"string"}}},"ImpersonationRequest":{"type":"object","required":["user_id","reason","password"],"properties":{"code":{"type":"string"},"password":{"type":"string"},"reason":{"$ref":"#/components/schemas/AdminReason"},"user_id":{"type":"integer","format":"int32"}},"additionalProperties":false},"ImpersonationSession":{"type":"object","required":["id","token","expires_at","user"],"properties":{"expires_at":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"token":{"type":"string","description":"Independent, read-only support credential. Shown once; never an account JWT."},"user":{"$ref":"#/components/schemas/UserDto"}}},"InfrastructurePage":{"type":"object","required":["observed_at","nodes","total"],"properties":{"next_offset":{"type":"integer","format":"int64","nullable":true},"nodes":{"type":"array","items":{}},"observed_at":{"type":"string"},"total":{"type":"integer","format":"int64"}}},"IngestCreate":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}},"additionalProperties":false},"IngestCredential":{"type":"object","required":["camera_id","expires_at","username","password","rtmps_url","rtsps_url","srt_url","srt_passphrase"],"properties":{"camera_id":{"type":"integer","format":"int32"},"expires_at":{"type":"string","format":"date-time"},"password":{"type":"string"},"rtmps_url":{"type":"string"},"rtsps_url":{"type":"string"},"srt_passphrase":{"type":"string"},"srt_url":{"type":"string"},"username":{"type":"string"}}},"IngestInfo":{"type":"object","required":["camera_id","name","connected","expires_at","active"],"properties":{"active":{"type":"boolean"},"camera_id":{"type":"integer","format":"int32"},"connected":{"type":"boolean"},"expires_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"observed_at":{"type":"string","format":"date-time","nullable":true}}},"IngestList":{"type":"object","required":["available","cameras"],"properties":{"available":{"type":"boolean"},"cameras":{"type":"array","items":{"$ref":"#/components/schemas/IngestInfo"}}}},"IngestRevoked":{"type":"object","required":["revoked","disconnected"],"properties":{"disconnected":{"type":"boolean"},"revoked":{"type":"boolean"}}},"JobStatus":{"type":"object","required":["id","job_id"],"properties":{"completed_at":{"type":"string","format":"date-time","nullable":true},"created_at":{"type":"string","format":"date-time","nullable":true},"error":{"type":"string","nullable":true},"id":{"type":"integer","format":"int64"},"job_id":{"type":"integer","format":"int64"},"result":{"nullable":true},"started_at":{"type":"string","format":"date-time","nullable":true},"status":{"type":"string","nullable":true}}},"KeyCreated":{"type":"object","required":["id","token","expires_at"],"properties":{"expires_at":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"token":{"type":"string"}}},"KeyInfo":{"type":"object","required":["id","name","created_at","expires_at"],"properties":{"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"revoked_at":{"type":"string","format":"date-time","nullable":true}}},"KeyRequest":{"type":"object","required":["name","ttl_days"],"properties":{"name":{"type":"string"},"ttl_days":{"type":"integer","format":"int32","minimum":0}},"additionalProperties":false},"KnowledgebaseArticleDto":{"type":"object","required":["id","title","body"],"properties":{"body":{"type":"string"},"created_at":{"type":"string","format":"date-time","nullable":true},"id":{"type":"integer","format":"int32"},"title":{"type":"string"}}},"LoginOutcome":{"oneOf":[{"$ref":"#/components/schemas/LoginResponse"},{"$ref":"#/components/schemas/MfaChallenge"}]},"LoginRequest":{"type":"object","required":["email","password"],"properties":{"email":{"type":"string"},"password":{"type":"string"}}},"LoginResponse":{"type":"object","required":["token","user"],"properties":{"token":{"type":"string"},"user":{"$ref":"#/components/schemas/AuthUserDto"}}},"MagicLinkConfirm":{"type":"object","required":["token"],"properties":{"token":{"type":"string"}}},"MagicLinkRequest":{"type":"object","required":["email"],"properties":{"email":{"type":"string"}}},"MediaJobResponse":{"type":"object","required":["job_id","status"],"properties":{"error":{"type":"string","nullable":true},"job_id":{"type":"integer","format":"int64"},"result":{"nullable":true},"status":{"type":"string"}}},"MfaChallenge":{"type":"object","required":["mfa_required","challenge","expires_in"],"properties":{"challenge":{"type":"string"},"expires_in":{"type":"integer","format":"int32"},"mfa_required":{"type":"boolean"}}},"MfaConfirm":{"type":"object","required":["challenge","code"],"properties":{"challenge":{"type":"string"},"code":{"type":"string"}}},"MfaEnable":{"type":"object","required":["code"],"properties":{"code":{"type":"string"}}},"MfaSetup":{"type":"object","required":["secret","otpauth_uri","expires_in"],"properties":{"expires_in":{"type":"integer","format":"int32"},"otpauth_uri":{"type":"string"},"secret":{"type":"string"}}},"MfaStatus":{"type":"object","required":["enabled","recovery_codes_remaining"],"properties":{"enabled":{"type":"boolean"},"recovery_codes_remaining":{"type":"integer","minimum":0}}},"OAuthExchangeRequest":{"type":"object","required":["code"],"properties":{"code":{"type":"string"}}},"OAuthLinkRequest":{"type":"object","required":["password"],"properties":{"password":{"type":"string"}}},"OAuthLinkResponse":{"type":"object","required":["authorize_url"],"properties":{"authorize_url":{"type":"string"}}},"OAuthProvider":{"type":"object","required":["id","name","start_url"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"start_url":{"type":"string"}}},"OAuthProviders":{"type":"object","required":["providers"],"properties":{"providers":{"type":"array","items":{"$ref":"#/components/schemas/OAuthProvider"}}}},"OnvifProfile":{"type":"object","required":["token","name","stream_url"],"properties":{"encoding":{"type":"string","nullable":true},"height":{"type":"integer","format":"int32","nullable":true,"minimum":0},"name":{"type":"string"},"stream_url":{"type":"string"},"token":{"type":"string"},"width":{"type":"integer","format":"int32","nullable":true,"minimum":0}}},"OnvifRequest":{"type":"object","required":["device_url"],"properties":{"device_url":{"type":"string"},"password":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"OnvifResult":{"type":"object","required":["profiles"],"properties":{"profiles":{"type":"array","items":{"$ref":"#/components/schemas/OnvifProfile"}}}},"PairCheck":{"type":"object","required":["approved"],"properties":{"approved":{"type":"boolean"},"gateway_id":{"type":"string","format":"uuid","nullable":true}}},"PairRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}},"additionalProperties":false},"PairResponse":{"type":"object","required":["id","token","code","expires_in"],"properties":{"code":{"type":"string"},"expires_in":{"type":"integer","format":"int32","minimum":0},"id":{"type":"string","format":"uuid"},"token":{"type":"string"}}},"PasswordResetConfirmRequest":{"type":"object","required":["token","new_password"],"properties":{"new_password":{"type":"string"},"token":{"type":"string"}}},"PasswordResetRequest":{"type":"object","required":["email"],"properties":{"email":{"type":"string"}}},"PaymentRecoveryDto":{"type":"object","required":["camera"],"properties":{"camera":{"type":"integer","format":"int32"}}},"PlanDto":{"type":"object","required":["id","name","quota_size","quota_camera","quota_per_second","audio_allowed","quota_bitrate","quota_days_recording","active","visible"],"properties":{"active":{"type":"boolean"},"audio_allowed":{"type":"boolean"},"id":{"type":"integer","format":"int32"},"name":{"type":"string"},"quota_bitrate":{"type":"integer","format":"int32"},"quota_camera":{"type":"integer","format":"int32"},"quota_days_recording":{"type":"integer","format":"int32"},"quota_per_second":{"type":"number","format":"double"},"quota_size":{"type":"number","format":"double"},"title":{"type":"string","nullable":true},"visible":{"type":"boolean"}}},"PlaylistQueryParams":{"type":"object","properties":{"debug":{"type":"string","nullable":true},"time":{"type":"string","nullable":true}}},"PlaylistQueryResponse":{"type":"object","required":["status"],"properties":{"days":{"type":"integer","format":"int32","nullable":true},"debug_list":{"type":"array","items":{"type":"array","items":{"allOf":[{"type":"number","format":"double","nullable":true},{"type":"string","format":"date-time","nullable":true}]}},"nullable":true},"error":{"type":"string","nullable":true},"extra_info":{"type":"string","nullable":true},"first_segment":{"allOf":[{"$ref":"#/components/schemas/FirstSegmentInfo"}],"nullable":true},"input_received":{"nullable":true},"status":{"type":"boolean"},"token":{"type":"string","nullable":true}}},"PlaylistTokenQuery":{"type":"object","required":["playlist_token"],"properties":{"playlist_token":{"type":"string"}}},"PolicyDocument":{"type":"object","required":["revision","policy"],"properties":{"policy":{"$ref":"#/components/schemas/CapturePolicy"},"revision":{"type":"integer","format":"int64"}}},"PrivacyMask":{"type":"object","required":["x","y","width","height"],"properties":{"height":{"type":"integer","format":"int32","minimum":0},"width":{"type":"integer","format":"int32","minimum":0},"x":{"type":"integer","format":"int32","description":"Coordinates in 1/10000 of the full frame. Opaque black, never blur.","minimum":0},"y":{"type":"integer","format":"int32","minimum":0}},"additionalProperties":false},"PublicStreamDto":{"type":"object","required":["id","camera_id","key","active","share_url","playlist_url"],"properties":{"active":{"type":"boolean"},"camera_id":{"type":"integer","format":"int32"},"created_at":{"type":"string","format":"date-time","nullable":true},"id":{"type":"integer","format":"int32"},"key":{"type":"string"},"playlist_url":{"type":"string"},"share_url":{"type":"string"},"updated_at":{"type":"string","format":"date-time","nullable":true}}},"PublicStreamList":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/PublicStreamDto"}}}},"PublicWatchInfo":{"type":"object","required":["camera_name","status","playlist_url"],"properties":{"camera_name":{"type":"string"},"playlist_url":{"type":"string"},"status":{"type":"string"}}},"PushDevice":{"type":"object","required":["id","name","camera_alerts","media_ready","expires_at"],"properties":{"camera_alerts":{"type":"boolean"},"expires_at":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"last_accepted_at":{"type":"string","format":"date-time","nullable":true},"media_ready":{"type":"boolean"},"name":{"type":"string"}}},"PushKeys":{"type":"object","required":["p256dh","auth"],"properties":{"auth":{"type":"string"},"p256dh":{"type":"string"}},"additionalProperties":false},"PushRegister":{"type":"object","required":["endpoint","keys","name","camera_alerts","media_ready"],"properties":{"camera_alerts":{"type":"boolean"},"endpoint":{"type":"string"},"keys":{"$ref":"#/components/schemas/PushKeys"},"media_ready":{"type":"boolean"},"name":{"type":"string"}},"additionalProperties":false},"PushResult":{"type":"object","required":["ok"],"properties":{"ok":{"type":"boolean"}}},"PushSaved":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}}},"PushStatus":{"type":"object","required":["configured","results"],"properties":{"configured":{"type":"boolean"},"public_key":{"type":"string","nullable":true},"results":{"type":"array","items":{"$ref":"#/components/schemas/PushDevice"}}}},"PusherAuthRequest":{"type":"object","required":["channel_name","socket_id"],"properties":{"channel_name":{"type":"string"},"socket_id":{"type":"string"}}},"PusherAuthResponse":{"type":"object","required":["auth"],"properties":{"auth":{"type":"string"}}},"RecordingEntitlement":{"type":"object","required":["allowed","source","message","trial_days"],"properties":{"allowed":{"type":"boolean"},"message":{"type":"string"},"source":{"type":"string","description":"trial, subscription, legacy_plan, or unavailable"},"trial_days":{"type":"integer","format":"int32"},"trial_ends_at":{"type":"string","format":"date-time","nullable":true}}},"RegisterRequest":{"type":"object","required":["email","password"],"properties":{"email":{"type":"string"},"password":{"type":"string"},"turnstile_token":{"type":"string","description":"Single-use Cloudflare Turnstile proof for the signup action.","nullable":true},"username":{"type":"string","nullable":true}}},"RenameFaceRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}},"additionalProperties":false},"SecurityChange":{"type":"object","required":["session","recovery_codes"],"properties":{"recovery_codes":{"type":"array","items":{"type":"string"}},"session":{"$ref":"#/components/schemas/LoginResponse"}}},"SecurityProof":{"type":"object","required":["password"],"properties":{"code":{"type":"string"},"password":{"type":"string"}}},"SnapshotDto":{"type":"object","required":["id","media_type"],"properties":{"camera_id":{"type":"integer","format":"int32","nullable":true},"created_at":{"type":"string","format":"date-time","nullable":true},"id":{"type":"integer","format":"int32"},"image":{"type":"string","nullable":true},"info":{"type":"string","nullable":true},"media_type":{"type":"string","description":"Animated previews contain recorded footage, never a live camera feed."},"note":{"type":"string","nullable":true}}},"SnapshotFormat":{"type":"string","enum":["jpeg","gif"]},"SnapshotList":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/SnapshotDto"}}}},"SnapshotQueryParams":{"type":"object","properties":{"before_id":{"type":"integer","format":"int32","nullable":true},"camera_id":{"type":"integer","format":"int32","nullable":true},"format":{"allOf":[{"$ref":"#/components/schemas/SnapshotFormat"}],"nullable":true},"limit":{"type":"integer","format":"int64","description":"Default 100, maximum 100. Results use descending immutable IDs.","nullable":true}}},"StartRecordDto":{"type":"object","required":["camera"],"properties":{"camera":{"type":"integer","format":"int32"},"record_time":{"type":"integer","format":"int32","nullable":true}}},"StartRecordResponse":{"type":"object","required":["status"],"properties":{"msg":{"type":"string","nullable":true},"status":{"type":"boolean"}}},"StopRecordDto":{"type":"object","required":["camera"],"properties":{"camera":{"type":"integer","format":"int32"}}},"StopRecordResponse":{"type":"object","required":["status"],"properties":{"msg":{"type":"string","nullable":true},"status":{"type":"boolean"}}},"StorageUsage":{"type":"object","description":"Saved media represented by owned database records, excluding temporary\nworking files. Missing legacy/face sizes are explicit rather than assumed zero.","required":["known_bytes","unmeasured_objects"],"properties":{"known_bytes":{"type":"number","format":"double"},"unmeasured_objects":{"type":"integer","format":"int64"}}},"StreamPingDto":{"type":"object","required":["stream_key"],"properties":{"stream_key":{"type":"string"}}},"StreamPingResponse":{"type":"object","required":["status"],"properties":{"ping":{"type":"string","nullable":true},"status":{"type":"boolean"}}},"StreamStopResponse":{"type":"object","required":["status"],"properties":{"status":{"type":"boolean"},"url-invalidated":{"type":"string","nullable":true}}},"StreamUrlResponse":{"type":"object","required":["status"],"properties":{"camera_stream_url":{"type":"string","nullable":true},"status":{"type":"boolean"},"stream_key":{"type":"string","nullable":true}}},"StripeCardDto":{"type":"object","required":["id","last4","exp_month","exp_year"],"properties":{"exp_month":{"type":"integer","format":"int32"},"exp_year":{"type":"integer","format":"int32"},"id":{"type":"string"},"last4":{"type":"integer","format":"int32"}}},"SubscriptionActionResponse":{"type":"object","required":["status","payment_required"],"properties":{"camera_id":{"type":"string","nullable":true},"error":{"type":"string","nullable":true},"extraInfo":{"type":"string","nullable":true},"payment_required":{"type":"boolean"},"payment_state":{"type":"string","nullable":true},"payment_url":{"type":"string","nullable":true},"status":{"type":"boolean"}}},"SubscriptionDto":{"type":"object","required":["camera","status","payment_pending"],"properties":{"camera":{"type":"integer","format":"int32"},"customer":{"type":"string","nullable":true},"id":{"type":"string","nullable":true},"payment_pending":{"type":"boolean"},"pending_plan":{"type":"integer","format":"int32","nullable":true},"plan":{"type":"integer","format":"int32","nullable":true},"status":{"type":"string"}}},"SubscriptionPreviewResponse":{"type":"object","required":["amount_due_minor","currency","expires_at"],"properties":{"amount_due_minor":{"type":"integer","format":"int64"},"currency":{"type":"string"},"expires_at":{"type":"integer","format":"int64"},"proration_date":{"type":"integer","format":"int64","nullable":true}}},"TimelineEvent":{"type":"object","required":["event","class_name","content","start","end","tooltip"],"properties":{"class_name":{"type":"string"},"content":{"type":"string"},"end":{"type":"string"},"event":{"type":"string"},"start":{"type":"string"},"tooltip":{"type":"string"}}},"TimelineQueryParams":{"type":"object","properties":{"date":{"type":"string","nullable":true},"range":{"type":"string"},"time":{"type":"string","nullable":true}}},"TimelineResponse":{"type":"object","required":["events","date","aware_date"],"properties":{"aware_date":{"type":"string"},"date":{"type":"string"},"end":{"type":"string","nullable":true},"events":{"type":"array","items":{"$ref":"#/components/schemas/TimelineEvent"}},"start":{"type":"string","nullable":true}}},"TriggerEvent":{"type":"object","required":["id","camera_id","external_id","name","duration","occurred_at","capture_state"],"properties":{"camera_id":{"type":"integer","format":"int32"},"capture_state":{"type":"string"},"duration":{"type":"integer","format":"int32"},"external_id":{"type":"string"},"id":{"type":"integer","format":"int64"},"job_id":{"type":"integer","format":"int64","nullable":true},"name":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}}},"TriggerRequest":{"type":"object","required":["external_id","name","duration"],"properties":{"duration":{"type":"integer","format":"int32","description":"0 creates a bookmark only. 1–3600 requests future capture, not pre-roll.","minimum":0},"external_id":{"type":"string","description":"Stable identifier of the external operation, e.g. a POS transaction ID."},"name":{"type":"string"}},"additionalProperties":false},"UpdateCameraDto":{"type":"object","properties":{"active":{"type":"boolean","nullable":true},"camera_id":{"type":"integer","format":"int32","nullable":true},"custom_url":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"offline_notify":{"type":"boolean","nullable":true},"password":{"type":"string","nullable":true},"port":{"type":"string","nullable":true},"recording_on":{"type":"boolean","nullable":true},"rtsp_port":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"username":{"type":"string","nullable":true}}},"UpdatePublicStreamDto":{"type":"object","properties":{"active":{"type":"boolean","nullable":true},"key":{"type":"string","nullable":true},"rotate_key":{"type":"boolean"}}},"UpdateSnapshotDto":{"type":"object","properties":{"note":{"type":"string","nullable":true}},"additionalProperties":false},"UpdateUserDto":{"type":"object","properties":{"email":{"type":"string","nullable":true},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"new_password":{"type":"string","nullable":true},"old_password":{"type":"string","nullable":true},"timezone":{"type":"string","nullable":true},"verify_password":{"type":"string","nullable":true}}},"UpdateVideoClipDto":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}},"additionalProperties":false},"UsageReport":{"type":"object","required":["observed_at","global","users","history","inventory","measurement"],"properties":{"global":{},"history":{"type":"array","items":{}},"inventory":{"type":"array","items":{}},"measurement":{"type":"string"},"observed_at":{"type":"string"},"users":{"type":"array","items":{}}}},"UserDto":{"type":"object","required":["is_staff","id","userprofile","storage_usage","email","username","valid_payment_method","active_recuring_plan"],"properties":{"active_recuring_plan":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","nullable":true},"disk_usage":{"type":"number","format":"double","description":"Total known saved-media bytes only when every referenced size is known.","nullable":true},"email":{"type":"string"},"id":{"type":"integer","format":"int32"},"is_staff":{"type":"boolean"},"storage_usage":{"$ref":"#/components/schemas/StorageUsage"},"user_hash":{"type":"string","description":"Legacy third-party integration identifier; unset until that integration is configured.","nullable":true},"username":{"type":"string"},"userprofile":{"$ref":"#/components/schemas/UserProfileDto"},"valid_payment_method":{"type":"boolean"}}},"UserProfileDto":{"type":"object","required":["id","timezone","current_timezone"],"properties":{"current_timezone":{"type":"string"},"id":{"type":"integer","format":"int32"},"name":{"type":"string","nullable":true},"timezone":{"type":"string"}}},"VideoClipDto":{"type":"object","required":["id","storage","file_name","video_url"],"properties":{"camera_id":{"type":"integer","format":"int32","nullable":true},"created_at":{"type":"string","format":"date-time","nullable":true},"duration":{"type":"number","format":"double","nullable":true},"file_name":{"type":"string"},"file_size":{"type":"number","format":"double","nullable":true},"id":{"type":"integer","format":"int32"},"name":{"type":"string","nullable":true},"storage":{"type":"string"},"updated_at":{"type":"string","format":"date-time","nullable":true},"video_url":{"type":"string"}}},"VideoClipList":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/VideoClipDto"}}}},"VideoRecordDto":{"type":"object","required":["id","camera_id","active","date_range"],"properties":{"active":{"type":"boolean"},"camera":{"type":"string","nullable":true},"camera_id":{"type":"integer","format":"int32"},"date_range":{"type":"string"},"end_time":{"type":"string","nullable":true},"id":{"type":"integer","format":"int32"},"size":{"type":"number","format":"double","nullable":true},"start_time":{"type":"string","nullable":true}}}},"securitySchemes":{"integrationKey":{"type":"http","scheme":"bearer"},"jwt":{"type":"http","scheme":"bearer"}}}}