{"openapi":"3.1.0","info":{"title":"AtlasForge Financial API","version":"1.1.0"},"servers":[{"url":"https://atlasforgefinancial.com","description":"Production"}],"paths":{"/api/":{"get":{"summary":"Root","operationId":"root_api__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/status":{"get":{"summary":"Get Status Checks","operationId":"get_status_checks_api_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/StatusCheck"},"type":"array","title":"Response Get Status Checks Api Status Get"}}}}}},"post":{"summary":"Create Status Check","operationId":"create_status_check_api_status_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusCheckCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusCheck"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/platform/status":{"get":{"summary":"Platform Status","operationId":"platform_status_api_platform_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusOverview"}}}}}}},"/api/platform/metrics":{"get":{"summary":"Platform Metrics","operationId":"platform_metrics_api_platform_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/partner/register":{"post":{"summary":"Partner Register","operationId":"partner_register_api_auth_partner_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerRegister"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/partner/login":{"post":{"summary":"Partner Login","operationId":"partner_login_api_auth_partner_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/partner/me":{"get":{"summary":"Partner Me","operationId":"partner_me_api_auth_partner_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/admin/login":{"post":{"summary":"Admin Login","operationId":"admin_login_api_auth_admin_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/admin/me":{"get":{"summary":"Admin Me","operationId":"admin_me_api_auth_admin_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/partners/me/api-keys":{"get":{"summary":"Partner Api Keys","operationId":"partner_api_keys_api_partners_me_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ApiKeyOut"},"type":"array","title":"Response Partner Api Keys Api Partners Me Api Keys Get"}}}}}}},"/api/partners/me/api-keys/{environment}":{"put":{"summary":"Partner Update Api Key","operationId":"partner_update_api_key_api_partners_me_api_keys__environment__put","parameters":[{"name":"environment","in":"path","required":true,"schema":{"enum":["live","test"],"type":"string","title":"Environment"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partners/me/usage":{"get":{"summary":"Partner Usage","operationId":"partner_usage_api_partners_me_usage_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/server__UsageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partners/me/usage/export":{"get":{"summary":"Partner Usage Export","description":"CSV export of usage data for the partner. `summary` returns one row per day; `events` returns raw events.","operationId":"partner_usage_export_api_partners_me_usage_export_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"format","in":"query","required":false,"schema":{"enum":["summary","events"],"type":"string","default":"summary","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/partners":{"get":{"summary":"Admin List Partners","operationId":"admin_list_partners_api_admin_partners_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/usage":{"get":{"summary":"Admin Usage","operationId":"admin_usage_api_admin_usage_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/partners/{partner_id}/usage":{"get":{"summary":"Admin Partner Usage","operationId":"admin_partner_usage_api_admin_partners__partner_id__usage_get","parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/usage/export":{"get":{"summary":"Admin Usage Export","operationId":"admin_usage_export_api_admin_usage_export_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"partner_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partner Id"}},{"name":"format","in":"query","required":false,"schema":{"enum":["partners","summary","events"],"type":"string","default":"partners","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/partners/{partner_id}":{"delete":{"summary":"Admin Delete Partner","description":"Hard-delete a partner and all of their related data (events + api keys).","operationId":"admin_delete_partner_api_admin_partners__partner_id__delete","parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/partners/{partner_id}/clear-key":{"post":{"summary":"Admin Clear Key","description":"Clear the partner's key for the given environment back to blank.\nThe partner can then paste in the new value from the key email.","operationId":"admin_clear_key_api_admin_partners__partner_id__clear_key_post","parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}},{"name":"environment","in":"query","required":false,"schema":{"enum":["live","test"],"type":"string","default":"live","title":"Environment"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/partners/{partner_id}/regenerate-key":{"post":{"summary":"Admin Regenerate Key","operationId":"admin_regenerate_key_api_admin_partners__partner_id__regenerate_key_post","parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}},{"name":"environment","in":"query","required":false,"schema":{"enum":["live","test"],"type":"string","default":"live","title":"Environment"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/partners/{partner_id}/seed-demo":{"post":{"summary":"Admin Seed Demo","operationId":"admin_seed_demo_api_admin_partners__partner_id__seed_demo_post","parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":45,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/partners/{partner_id}/suspend":{"post":{"summary":"Admin Suspend","operationId":"admin_suspend_api_admin_partners__partner_id__suspend_post","parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/partners/{partner_id}/activate":{"post":{"summary":"Admin Activate","operationId":"admin_activate_api_admin_partners__partner_id__activate_post","parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"string","title":"Partner Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/external-keys":{"get":{"summary":"Admin List External Keys","operationId":"admin_list_external_keys_api_admin_external_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Admin Create External Key","description":"Register an externally-generated key. Resolves or creates the partner, then upserts.","operationId":"admin_create_external_key_api_admin_external_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalKeyCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/external-keys/{key_id}":{"delete":{"summary":"Admin Delete External Key","operationId":"admin_delete_external_key_api_admin_external_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/ingest-secret":{"get":{"summary":"Admin Get Ingest Secret","description":"Return the platform-wide ingest secret so admins can configure their external app.","operationId":"admin_get_ingest_secret_api_admin_ingest_secret_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/deletion-requests":{"get":{"summary":"Admin List Deletion Requests","description":"List GDPR deletion requests, newest first. Filter by status if given.","operationId":"admin_list_deletion_requests_api_admin_deletion_requests_get","parameters":[{"name":"status_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Filter"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/deletion-requests/{request_id}":{"patch":{"summary":"Admin Update Deletion Request","description":"Update a deletion request's status (mark in-progress, completed, cancelled).","operationId":"admin_update_deletion_request_api_admin_deletion_requests__request_id__patch","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletionRequestUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Admin Delete Deletion Request","description":"Hard-delete a deletion request record from the audit log.","operationId":"admin_delete_deletion_request_api_admin_deletion_requests__request_id__delete","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ingest/event":{"post":{"summary":"Ingest Event","operationId":"ingest_event_api_ingest_event_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ingest/events/batch":{"post":{"summary":"Ingest Events Batch","operationId":"ingest_events_batch_api_ingest_events_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestBatch"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ingest/ping":{"get":{"summary":"Ingest Ping","description":"Health probe for the ingest pipeline. Secret-protected so it can be used as a connectivity test.","operationId":"ingest_ping_api_ingest_ping_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/changelog.json":{"get":{"summary":"Changelog Json","description":"JSON Feed 1.1 — https://www.jsonfeed.org/version/1.1/","operationId":"changelog_json_api_changelog_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/changelog.rss":{"get":{"summary":"Changelog Rss","description":"RSS 2.0 feed of the platform changelog.","operationId":"changelog_rss_api_changelog_rss_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/integration-guide":{"get":{"tags":["integration-guide"],"summary":"Integration Guide Viewer","description":"Brand-styled HTML viewer with Print & Save PDF toolbar.","operationId":"integration_guide_viewer_api_v1_integration_guide_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/v1/integration-guide.html":{"get":{"tags":["integration-guide"],"summary":"Integration Guide Html Download","description":"Standalone HTML download (same content as viewer, served as a file).","operationId":"integration_guide_html_download_api_v1_integration_guide_html_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/integration-guide.md":{"get":{"tags":["integration-guide"],"summary":"Integration Guide Markdown","operationId":"integration_guide_markdown_api_v1_integration_guide_md_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/integration-guide.pdf":{"get":{"tags":["integration-guide"],"summary":"Integration Guide Pdf","operationId":"integration_guide_pdf_api_v1_integration_guide_pdf_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/me":{"get":{"tags":["v1"],"summary":"V1 Me","operationId":"v1_me_api_v1_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}}}}},"/api/v1/health":{"get":{"tags":["v1"],"summary":"V1 Health","operationId":"v1_health_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/ingest/health":{"get":{"tags":["v1"],"summary":"V1 Ingest Health","operationId":"v1_ingest_health_api_v1_ingest_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/calculate/safe-to-spend":{"post":{"tags":["v1"],"summary":"V1 Calculate Safe To Spend","description":"Compute safe-to-spend without persisting. Use `/api/v1/ingest` if you want\nAtlasForge to cache the result + fire a `calculation.updated` webhook.","operationId":"v1_calculate_safe_to_spend_api_v1_calculate_safe_to_spend_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestCalculationBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalculateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/secrets":{"get":{"tags":["v1"],"summary":"V1 Secrets","operationId":"v1_secrets_api_v1_secrets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretsResponse"}}}}}}},"/api/v1/usage":{"get":{"tags":["v1"],"summary":"V1 Usage","operationId":"v1_usage_api_v1_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1_api__UsageResponse"}}}}}}},"/api/v1/ingest/calculations":{"get":{"tags":["v1"],"summary":"V1 Calculations","operationId":"v1_calculations_api_v1_ingest_calculations_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CachedCalcList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ingest/calculation/{user_id}":{"get":{"tags":["v1"],"summary":"V1 Calculation Detail","operationId":"v1_calculation_detail_api_v1_ingest_calculation__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CachedCalcRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ingest/user/{user_id}":{"delete":{"tags":["v1"],"summary":"V1 Gdpr Delete","operationId":"v1_gdpr_delete_api_v1_ingest_user__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ingest":{"post":{"tags":["v1"],"summary":"V1 Ingest Calculation","description":"Compute + cache a safe-to-spend calculation for one end-user.","operationId":"v1_ingest_calculation_api_v1_ingest_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestCalculationBody"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalculateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks":{"get":{"tags":["v1"],"summary":"V1 Webhook Get","operationId":"v1_webhook_get_api_v1_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookConfig"}}}}}},"post":{"tags":["v1"],"summary":"V1 Webhook Set","operationId":"v1_webhook_set_api_v1_webhooks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookConfigBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookConfigCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["v1"],"summary":"V1 Webhook Delete","operationId":"v1_webhook_delete_api_v1_webhooks_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/webhooks/rotate-secret":{"post":{"tags":["v1"],"summary":"V1 Webhook Rotate","operationId":"v1_webhook_rotate_api_v1_webhooks_rotate_secret_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookConfigCreated"}}}}}}},"/api/v1/webhooks/deliveries":{"get":{"tags":["v1"],"summary":"V1 Webhook Deliveries","operationId":"v1_webhook_deliveries_api_v1_webhooks_deliveries_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["delivered","failed"],"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"},"title":"Response V1 Webhook Deliveries Api V1 Webhooks Deliveries Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/usage/alerts":{"get":{"tags":["v1"],"summary":"V1 Alerts Get","operationId":"v1_alerts_get_api_v1_usage_alerts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageAlertConfig"}}}}}},"put":{"tags":["v1"],"summary":"V1 Alerts Put","operationId":"v1_alerts_put_api_v1_usage_alerts_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageAlertBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageAlertConfig"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["v1"],"summary":"V1 Alerts Delete","operationId":"v1_alerts_delete_api_v1_usage_alerts_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/key/rotate":{"post":{"tags":["v1"],"summary":"V1 Key Rotate","description":"Rotate a partner's key.\n\nSECURITY: To prevent partners self-serving rotation, this endpoint now\nrequires an `X-Atlas-Ingest-Secret` header on top of the partner key.\nThat's the same secret only AtlasForge admins and the partner's own\nbackend share — never exposed in the portal UI.","operationId":"v1_key_rotate_api_v1_key_rotate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyRotateBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyRotateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/keys":{"put":{"tags":["v1"],"summary":"V1 Keys Paste","description":"The logged-in partner saves a key they generated in their external app.\n\nReplaces any prior key in that environment slot. After saving, the key\nimmediately authenticates `/api/v1/*` calls via X-API-Key.","operationId":"v1_keys_paste_api_v1_keys_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyPasteBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyPasteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/keys/{environment}":{"delete":{"tags":["v1"],"summary":"V1 Keys Clear","description":"Clear the partner's key in this env slot (without deleting the row).","operationId":"v1_keys_clear_api_v1_keys__environment__delete","parameters":[{"name":"environment","in":"path","required":true,"schema":{"enum":["test","live"],"type":"string","title":"Environment"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports/calculations.csv":{"get":{"tags":["v1"],"summary":"V1 Report Calculations","description":"All cached calculations for the current env, with safe-to-spend + breakdown.","operationId":"v1_report_calculations_api_v1_reports_calculations_csv_get","parameters":[{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Until"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports/usage.csv":{"get":{"tags":["v1"],"summary":"V1 Report Usage","description":"Per-month call counts + unique users + estimated bill for the last N months.","operationId":"v1_report_usage_api_v1_reports_usage_csv_get","parameters":[{"name":"months","in":"query","required":false,"schema":{"type":"integer","default":6,"title":"Months"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports/webhooks.csv":{"get":{"tags":["v1"],"summary":"V1 Report Webhooks","description":"Webhook delivery log as CSV, with optional date and status filter.","operationId":"v1_report_webhooks_api_v1_reports_webhooks_csv_get","parameters":[{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Until"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["delivered","failed"],"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/keys/sync":{"post":{"tags":["v1"],"summary":"V1 Admin Keys Sync","description":"Server-to-server: push an externally-generated API key into AtlasForge.\n\nAuth: header `X-Atlas-Ingest-Secret: <ATLAS_INGEST_SECRET>` (or `Authorization: Bearer`).\nUse this from your external dashboard whenever a partner generates or rotates a key.","operationId":"v1_admin_keys_sync_api_v1_admin_keys_sync_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeySyncBody"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeySyncResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/keys/bulk-sync":{"post":{"tags":["v1"],"summary":"V1 Admin Keys Bulk Sync","operationId":"v1_admin_keys_bulk_sync_api_v1_admin_keys_bulk_sync_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeySyncBatchBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/keys/{key_value}":{"delete":{"tags":["v1"],"summary":"V1 Admin Key Revoke","description":"Server-to-server revoke. Removes the key from `partner_api_keys`.","operationId":"v1_admin_key_revoke_api_v1_admin_keys__key_value__delete","parameters":[{"name":"key_value","in":"path","required":true,"schema":{"type":"string","title":"Key Value"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/partners/by-email/{email}":{"put":{"tags":["v1"],"summary":"V1 Admin Update Partner By Email","description":"Admin/server-to-server: update a partner's display metadata (company / contact name).\n\nAuth: `X-Atlas-Ingest-Secret: <ATLAS_INGEST_SECRET>` header.\nLookup key is the partner's email (case-insensitive).","operationId":"v1_admin_update_partner_by_email_api_v1_admin_partners_by_email__email__put","parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string","title":"Email"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerMetadataUpdateBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerMetadataUpdateResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/link/token/create":{"post":{"tags":["sandbox"],"summary":"Create Link Token","description":"Return a stub Plaid Link token (safe to display in \"Try it\" flows).","operationId":"create_link_token_api_v1_link_token_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkTokenCreateReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkTokenCreateResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/accounts/link":{"post":{"tags":["sandbox"],"summary":"Link Accounts","description":"Exchange the Plaid public_token for accounts (stub — returns deterministic set).","operationId":"link_accounts_api_v1_accounts_link_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountsLinkReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountsLinkResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/accounts":{"get":{"tags":["sandbox"],"summary":"List Accounts","description":"Return the accounts previously linked for a user (stub).","operationId":"list_accounts_api_v1_accounts_get","parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"string","description":"End-user identifier.","title":"User Id"},"description":"End-user identifier."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/transactions":{"get":{"tags":["sandbox"],"summary":"List Transactions","description":"Return deterministic transactions in the requested window (stub).","operationId":"list_transactions_api_v1_transactions_get","parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"YYYY-MM-DD","title":"Start Date"},"description":"YYYY-MM-DD"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"YYYY-MM-DD","title":"End Date"},"description":"YYYY-MM-DD"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/transfers":{"post":{"tags":["sandbox"],"summary":"Create Transfer","description":"Create a stub transfer. Idempotent when `idempotency_key` is supplied.","operationId":"create_transfer_api_v1_transfers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransfersReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/insights/cashflow":{"get":{"tags":["sandbox"],"summary":"Cashflow Forecast","description":"Project daily inflow/outflow/net + safe-to-spend for the next N days (stub).","operationId":"cashflow_forecast_api_v1_insights_cashflow_get","parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"horizon_days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":14,"title":"Horizon Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashflowResp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/request-deletion":{"post":{"tags":["account-deletion"],"summary":"Request Deletion","description":"Public, no-auth GDPR deletion request. Idempotent on email.","operationId":"request_deletion_api_auth_request_deletion_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletionRequestBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletionRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/contact":{"post":{"tags":["contact"],"summary":"Submit Contact","operationId":"submit_contact_api_contact_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactBody"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/indexnow/status":{"get":{"tags":["indexnow"],"summary":"Indexnow Status","operationId":"indexnow_status_api_admin_indexnow_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}}}}},"/api/admin/indexnow/submit":{"post":{"tags":["indexnow"],"summary":"Indexnow Submit","operationId":"indexnow_submit_api_admin_indexnow_submit_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/indexnow/submit-all-sitemap":{"post":{"tags":["indexnow"],"summary":"Indexnow Submit All Sitemap","operationId":"indexnow_submit_all_sitemap_api_admin_indexnow_submit_all_sitemap_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitResult"}}}}}}},"/api/blog/categories":{"get":{"tags":["blog"],"summary":"List Categories","operationId":"list_categories_api_blog_categories_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/blog/posts":{"get":{"tags":["blog"],"summary":"List Posts","description":"Return posts newest-first. Client filters happen server-side so a\nslow phone doesn't have to render 33 posts to filter to 3.","operationId":"list_posts_api_blog_posts_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free-text search","title":"Q"},"description":"Free-text search"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/blog/posts/{slug}":{"get":{"tags":["blog"],"summary":"Get Post","operationId":"get_post_api_blog_posts__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/blog/posts/{slug}/related":{"get":{"tags":["blog"],"summary":"Get Related Posts","operationId":"get_related_posts_api_blog_posts__slug__related_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10,"minimum":1,"default":3,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Account":{"properties":{"account_id":{"type":"string","title":"Account Id"},"name":{"type":"string","title":"Name"},"mask":{"type":"string","title":"Mask"},"type":{"type":"string","title":"Type"},"subtype":{"type":"string","title":"Subtype"},"current_balance":{"type":"number","title":"Current Balance"},"available_balance":{"type":"number","title":"Available Balance"},"iso_currency_code":{"type":"string","title":"Iso Currency Code","default":"USD"}},"type":"object","required":["account_id","name","mask","type","subtype","current_balance","available_balance"],"title":"Account"},"AccountsLinkReq":{"properties":{"public_token":{"type":"string","title":"Public Token"},"user_id":{"type":"string","title":"User Id"},"institution":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Institution"}},"type":"object","required":["public_token","user_id"],"title":"AccountsLinkReq"},"AccountsLinkResp":{"properties":{"item_id":{"type":"string","title":"Item Id"},"institution":{"additionalProperties":true,"type":"object","title":"Institution"},"accounts":{"items":{"$ref":"#/components/schemas/Account"},"type":"array","title":"Accounts"}},"type":"object","required":["item_id","institution","accounts"],"title":"AccountsLinkResp"},"ApiKeyOut":{"properties":{"id":{"type":"string","title":"Id"},"environment":{"type":"string","enum":["live","test"],"title":"Environment"},"key":{"type":"string","title":"Key"},"masked":{"type":"string","title":"Masked"},"created_at":{"type":"string","title":"Created At"},"last_rotated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Rotated At"}},"type":"object","required":["id","environment","key","masked","created_at"],"title":"ApiKeyOut"},"ApiKeyUpdate":{"properties":{"key":{"type":"string","maxLength":200,"minLength":8,"title":"Key"}},"type":"object","required":["key"],"title":"ApiKeyUpdate"},"CachedCalcList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CachedCalcRow"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["items","count"],"title":"CachedCalcList"},"CachedCalcRow":{"properties":{"end_user_id":{"type":"string","title":"End User Id"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"calculation":{"$ref":"#/components/schemas/CalculateResponse"},"calculated_at":{"type":"string","title":"Calculated At"}},"type":"object","required":["end_user_id","calculation","calculated_at"],"title":"CachedCalcRow"},"CalculateResponse":{"properties":{"safe_to_spend_today":{"type":"number","title":"Safe To Spend Today"},"daily_allowance":{"type":"number","title":"Daily Allowance"},"monthly_safe_to_spend":{"type":"number","title":"Monthly Safe To Spend"},"breakdown":{"$ref":"#/components/schemas/CalculationBreakdown"},"calculation_id":{"type":"string","title":"Calculation Id"},"calculated_at":{"type":"string","title":"Calculated At"},"partner_id":{"type":"string","title":"Partner Id"},"is_sandbox":{"type":"boolean","title":"Is Sandbox"}},"type":"object","required":["safe_to_spend_today","daily_allowance","monthly_safe_to_spend","breakdown","calculation_id","calculated_at","partner_id","is_sandbox"],"title":"CalculateResponse"},"CalculationBreakdown":{"properties":{"cash_after_buffer":{"type":"number","title":"Cash After Buffer"},"upcoming_bills_total":{"type":"number","title":"Upcoming Bills Total"},"savings_commitments":{"type":"number","title":"Savings Commitments"},"debt_commitments":{"type":"number","title":"Debt Commitments"},"discretionary_pool":{"type":"number","title":"Discretionary Pool"},"days_in_period":{"type":"integer","title":"Days In Period"}},"type":"object","required":["cash_after_buffer","upcoming_bills_total","savings_commitments","debt_commitments","discretionary_pool","days_in_period"],"title":"CalculationBreakdown"},"CashflowPoint":{"properties":{"date":{"type":"string","title":"Date"},"inflow_cents":{"type":"integer","title":"Inflow Cents"},"outflow_cents":{"type":"integer","title":"Outflow Cents"},"net_cents":{"type":"integer","title":"Net Cents"},"safe_to_spend_cents":{"type":"integer","title":"Safe To Spend Cents"}},"type":"object","required":["date","inflow_cents","outflow_cents","net_cents","safe_to_spend_cents"],"title":"CashflowPoint"},"CashflowResp":{"properties":{"horizon_days":{"type":"integer","title":"Horizon Days"},"generated_at":{"type":"string","title":"Generated At"},"points":{"items":{"$ref":"#/components/schemas/CashflowPoint"},"type":"array","title":"Points"},"runway_days":{"type":"integer","title":"Runway Days"}},"type":"object","required":["horizon_days","generated_at","points","runway_days"],"title":"CashflowResp"},"ContactBody":{"properties":{"name":{"type":"string","maxLength":120,"minLength":2,"title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"company":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Company"},"topic":{"type":"string","maxLength":40,"title":"Topic","default":"general"},"message":{"type":"string","maxLength":4000,"minLength":10,"title":"Message"},"website":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Website"}},"type":"object","required":["name","email","message"],"title":"ContactBody"},"ContactResponse":{"properties":{"received":{"type":"boolean","title":"Received"},"lead_id":{"type":"string","title":"Lead Id"},"message":{"type":"string","title":"Message"}},"type":"object","required":["received","lead_id","message"],"title":"ContactResponse"},"DeletionRequestBody":{"properties":{"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"},"name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Name"},"reason":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Reason"},"last_4_phone":{"anyOf":[{"type":"string","maxLength":4,"pattern":"^\\d{0,4}$"},{"type":"null"}],"title":"Last 4 Phone"}},"type":"object","required":["email"],"title":"DeletionRequestBody"},"DeletionRequestResponse":{"properties":{"received":{"type":"boolean","title":"Received"},"request_id":{"type":"string","title":"Request Id"},"message":{"type":"string","title":"Message"},"next_steps":{"items":{"type":"string"},"type":"array","title":"Next Steps"}},"type":"object","required":["received","request_id","message","next_steps"],"title":"DeletionRequestResponse"},"DeletionRequestUpdate":{"properties":{"status":{"type":"string","enum":["pending","in_progress","completed","cancelled"],"title":"Status"},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"}},"type":"object","required":["status"],"title":"DeletionRequestUpdate"},"ExternalKeyCreate":{"properties":{"key":{"type":"string","maxLength":200,"minLength":8,"title":"Key"},"environment":{"type":"string","enum":["test","live"],"title":"Environment"},"partner_id":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Partner Id"},"partner_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Partner Email"},"partner_company_name":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Partner Company Name"},"partner_contact_name":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Partner Contact Name"},"tier":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Tier"}},"type":"object","required":["key","environment"],"title":"ExternalKeyCreate","description":"Register a key generated in the external app. Either match an existing partner\nby `partner_id` / `partner_email`, or provide a new email + company_name to auto-create."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IncidentEntry":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"impact":{"type":"string","enum":["none","minor","major","critical"],"title":"Impact"},"status":{"type":"string","enum":["investigating","identified","monitoring","resolved"],"title":"Status"},"started_at":{"type":"string","title":"Started At"},"resolved_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolved At"},"summary":{"type":"string","title":"Summary"}},"type":"object","required":["id","title","impact","status","started_at","summary"],"title":"IncidentEntry"},"IngestBatch":{"properties":{"events":{"items":{"$ref":"#/components/schemas/IngestEvent"},"type":"array","maxItems":500,"minItems":1,"title":"Events"}},"type":"object","required":["events"],"title":"IngestBatch"},"IngestCalculationBody":{"properties":{"end_user_id":{"type":"string","maxLength":120,"minLength":1,"title":"End User Id"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"cash_balance":{"type":"number","title":"Cash Balance","default":0},"upcoming_bills":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Upcoming Bills","default":[]},"savings_commitments":{"type":"number","title":"Savings Commitments","default":0},"debt_commitments":{"type":"number","title":"Debt Commitments","default":0},"cash_buffer":{"type":"number","title":"Cash Buffer","default":0}},"type":"object","required":["end_user_id"],"title":"IngestCalculationBody"},"IngestEvent":{"properties":{"partner_id":{"type":"string","maxLength":120,"minLength":1,"title":"Partner Id"},"event_type":{"type":"string","enum":["user_signup","account_link","transaction"],"title":"Event Type"},"user_id":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"User Id"},"amount_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Amount Cents"},"category":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Category"},"institution":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Institution"},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occurred At"}},"type":"object","required":["partner_id","event_type"],"title":"IngestEvent"},"KeyPasteBody":{"properties":{"environment":{"type":"string","enum":["test","live"],"title":"Environment"},"key":{"type":"string","maxLength":200,"minLength":8,"title":"Key"}},"type":"object","required":["environment","key"],"title":"KeyPasteBody","description":"Logged-in partner pastes a key they generated in their external app."},"KeyPasteResponse":{"properties":{"environment":{"type":"string","enum":["test","live"],"title":"Environment"},"key_masked":{"type":"string","title":"Key Masked"},"saved_at":{"type":"string","title":"Saved At"},"source":{"type":"string","title":"Source","default":"portal-paste"}},"type":"object","required":["environment","key_masked","saved_at"],"title":"KeyPasteResponse"},"KeyRotateBody":{"properties":{"key_type":{"type":"string","enum":["sandbox","production"],"title":"Key Type"}},"type":"object","required":["key_type"],"title":"KeyRotateBody"},"KeyRotateResponse":{"properties":{"key_type":{"type":"string","enum":["sandbox","production"],"title":"Key Type"},"new_key":{"type":"string","title":"New Key"},"rotated_at":{"type":"string","title":"Rotated At"},"message":{"type":"string","title":"Message"}},"type":"object","required":["key_type","new_key","rotated_at","message"],"title":"KeyRotateResponse"},"KeySyncBatchBody":{"properties":{"keys":{"items":{"$ref":"#/components/schemas/KeySyncBody"},"type":"array","maxItems":500,"minItems":1,"title":"Keys"}},"type":"object","required":["keys"],"title":"KeySyncBatchBody"},"KeySyncBody":{"properties":{"key":{"type":"string","maxLength":200,"minLength":8,"title":"Key"},"environment":{"type":"string","enum":["test","live"],"title":"Environment"},"partner_id":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Partner Id"},"partner_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Partner Email"},"partner_company_name":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Partner Company Name"},"partner_contact_name":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Partner Contact Name"},"tier":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Tier"},"source":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Source","default":"external-sync"}},"type":"object","required":["key","environment"],"title":"KeySyncBody","description":"Push a single API key from the external app into AtlasForge."},"KeySyncResult":{"properties":{"partner_id":{"type":"string","title":"Partner Id"},"company_name":{"type":"string","title":"Company Name"},"email":{"type":"string","title":"Email"},"environment":{"type":"string","enum":["test","live"],"title":"Environment"},"key_masked":{"type":"string","title":"Key Masked"},"created_partner":{"type":"boolean","title":"Created Partner"},"rotated_at":{"type":"string","title":"Rotated At"},"source":{"type":"string","title":"Source"}},"type":"object","required":["partner_id","company_name","email","environment","key_masked","created_partner","rotated_at","source"],"title":"KeySyncResult"},"LinkTokenCreateReq":{"properties":{"user_id":{"type":"string","title":"User Id","examples":["usr_8M2nQ"]}},"type":"object","required":["user_id"],"title":"LinkTokenCreateReq"},"LinkTokenCreateResp":{"properties":{"link_token":{"type":"string","title":"Link Token"},"expiration":{"type":"string","title":"Expiration"},"request_id":{"type":"string","title":"Request Id"}},"type":"object","required":["link_token","expiration","request_id"],"title":"LinkTokenCreateResp"},"LoginPayload":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"LoginPayload"},"MeResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"company":{"type":"string","title":"Company"},"tier":{"type":"string","title":"Tier"},"active":{"type":"boolean","title":"Active"},"is_sandbox":{"type":"boolean","title":"Is Sandbox"},"current_key_type":{"type":"string","enum":["sandbox","production"],"title":"Current Key Type"},"sandbox_key_masked":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sandbox Key Masked"},"production_key_masked":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Production Key Masked"},"sandbox_key_rotated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sandbox Key Rotated At"},"production_key_rotated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Production Key Rotated At"},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url"},"webhook_enabled":{"type":"boolean","title":"Webhook Enabled","default":false},"usage_alert_email":{"type":"string","title":"Usage Alert Email","default":""},"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Customer Id"},"stripe_payment_method_attached":{"type":"boolean","title":"Stripe Payment Method Attached","default":false},"created_at":{"type":"string","title":"Created At"},"activated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activated At"},"expected_volume":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Volume"},"signup_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signup Source"}},"type":"object","required":["id","name","email","company","tier","active","is_sandbox","current_key_type","created_at"],"title":"MeResponse"},"PartnerMetadataUpdateBody":{"properties":{"partner_company_name":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Partner Company Name"},"partner_contact_name":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Partner Contact Name"}},"type":"object","title":"PartnerMetadataUpdateBody"},"PartnerMetadataUpdateResult":{"properties":{"partner_id":{"type":"string","title":"Partner Id"},"email":{"type":"string","title":"Email"},"company_name":{"type":"string","title":"Company Name"},"contact_name":{"type":"string","title":"Contact Name"},"updated":{"type":"boolean","title":"Updated"}},"type":"object","required":["partner_id","email","company_name","contact_name","updated"],"title":"PartnerMetadataUpdateResult"},"PartnerRegister":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"},"company_name":{"type":"string","maxLength":120,"minLength":2,"title":"Company Name"},"contact_name":{"type":"string","maxLength":120,"minLength":2,"title":"Contact Name"}},"type":"object","required":["email","password","company_name","contact_name"],"title":"PartnerRegister"},"SecretsResponse":{"properties":{"ingest_secret":{"type":"string","title":"Ingest Secret"},"header_name":{"type":"string","title":"Header Name","default":"X-Atlas-Ingest-Secret"},"scope":{"type":"string","title":"Scope","default":"/api/v1/ingest/* and /api/v1/webhooks/*"},"rotation_policy":{"type":"string","title":"Rotation Policy","default":"Rotate on demand from the Keys page."}},"type":"object","required":["ingest_secret"],"title":"SecretsResponse"},"ServiceStatus":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"status":{"type":"string","enum":["operational","degraded","outage","maintenance"],"title":"Status"},"uptime_30d":{"type":"number","title":"Uptime 30D"},"response_ms":{"type":"integer","title":"Response Ms"},"history":{"items":{"type":"string"},"type":"array","title":"History"}},"type":"object","required":["id","name","description","status","uptime_30d","response_ms","history"],"title":"ServiceStatus"},"StatusCheck":{"properties":{"id":{"type":"string","title":"Id"},"client_name":{"type":"string","title":"Client Name"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"}},"type":"object","required":["client_name"],"title":"StatusCheck"},"StatusCheckCreate":{"properties":{"client_name":{"type":"string","title":"Client Name"}},"type":"object","required":["client_name"],"title":"StatusCheckCreate"},"StatusOverview":{"properties":{"overall":{"type":"string","enum":["operational","degraded","outage","maintenance"],"title":"Overall"},"headline":{"type":"string","title":"Headline"},"last_checked":{"type":"string","title":"Last Checked"},"services":{"items":{"$ref":"#/components/schemas/ServiceStatus"},"type":"array","title":"Services"},"incidents":{"items":{"$ref":"#/components/schemas/IncidentEntry"},"type":"array","title":"Incidents"}},"type":"object","required":["overall","headline","last_checked","services","incidents"],"title":"StatusOverview"},"StatusResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"key_configured":{"type":"boolean","title":"Key Configured"},"host":{"type":"string","title":"Host"},"batch_size":{"type":"integer","title":"Batch Size"},"retry_count":{"type":"integer","title":"Retry Count"},"verification_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verification Url"},"endpoint":{"type":"string","title":"Endpoint"},"recent_submissions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Recent Submissions"}},"type":"object","required":["enabled","key_configured","host","batch_size","retry_count","verification_url","endpoint","recent_submissions"],"title":"StatusResponse"},"SubmitBody":{"properties":{"urls":{"items":{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},"type":"array","maxItems":10000,"minItems":1,"title":"Urls"}},"type":"object","required":["urls"],"title":"SubmitBody"},"SubmitResult":{"properties":{"submitted":{"type":"integer","title":"Submitted"},"skipped_duplicates":{"type":"integer","title":"Skipped Duplicates"},"batches":{"type":"integer","title":"Batches"},"ok":{"type":"boolean","title":"Ok"},"detail":{"type":"string","title":"Detail"}},"type":"object","required":["submitted","skipped_duplicates","batches","ok","detail"],"title":"SubmitResult"},"Transaction":{"properties":{"transaction_id":{"type":"string","title":"Transaction Id"},"account_id":{"type":"string","title":"Account Id"},"date":{"type":"string","title":"Date"},"name":{"type":"string","title":"Name"},"amount":{"type":"number","title":"Amount"},"iso_currency_code":{"type":"string","title":"Iso Currency Code","default":"USD"},"category":{"items":{"type":"string"},"type":"array","title":"Category"},"pending":{"type":"boolean","title":"Pending","default":false}},"type":"object","required":["transaction_id","account_id","date","name","amount","category"],"title":"Transaction"},"TransactionList":{"properties":{"transactions":{"items":{"$ref":"#/components/schemas/Transaction"},"type":"array","title":"Transactions"},"total_count":{"type":"integer","title":"Total Count"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["transactions","total_count","has_more"],"title":"TransactionList"},"TransferResp":{"properties":{"transfer_id":{"type":"string","title":"Transfer Id"},"status":{"type":"string","title":"Status"},"amount_cents":{"type":"integer","title":"Amount Cents"},"direction":{"type":"string","title":"Direction"},"account_id":{"type":"string","title":"Account Id"},"created_at":{"type":"string","title":"Created At"},"expected_settlement":{"type":"string","title":"Expected Settlement"}},"type":"object","required":["transfer_id","status","amount_cents","direction","account_id","created_at","expected_settlement"],"title":"TransferResp"},"TransfersReq":{"properties":{"account_id":{"type":"string","title":"Account Id"},"amount_cents":{"type":"integer","title":"Amount Cents"},"direction":{"type":"string","pattern":"^(debit|credit)$","title":"Direction","default":"debit"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"idempotency_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency Key"}},"type":"object","required":["account_id","amount_cents"],"title":"TransfersReq"},"UsageAlertBody":{"properties":{"thresholds":{"items":{"$ref":"#/components/schemas/UsageThreshold"},"type":"array","title":"Thresholds"},"notify_email":{"type":"string","title":"Notify Email"}},"type":"object","required":["thresholds","notify_email"],"title":"UsageAlertBody"},"UsageAlertConfig":{"properties":{"thresholds":{"items":{"$ref":"#/components/schemas/UsageThreshold"},"type":"array","title":"Thresholds","default":[]},"notify_email":{"type":"string","title":"Notify Email","default":""},"current":{"additionalProperties":true,"type":"object","title":"Current"}},"type":"object","required":["current"],"title":"UsageAlertConfig"},"UsageBucket":{"properties":{"calls":{"type":"integer","title":"Calls"},"unique_end_users":{"type":"integer","title":"Unique End Users"},"estimated_bill_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Bill Usd"}},"type":"object","required":["calls","unique_end_users"],"title":"UsageBucket"},"UsageSeries":{"properties":{"date":{"type":"string","title":"Date"},"active_users":{"type":"integer","title":"Active Users"},"accounts_linked":{"type":"integer","title":"Accounts Linked"},"transactions":{"type":"integer","title":"Transactions"},"txn_volume_cents":{"type":"integer","title":"Txn Volume Cents"}},"type":"object","required":["date","active_users","accounts_linked","transactions","txn_volume_cents"],"title":"UsageSeries"},"UsageThreshold":{"properties":{"metric":{"type":"string","enum":["unique_users","calls","bill_usd"],"title":"Metric"},"value":{"type":"number","title":"Value"},"notified_months":{"items":{"type":"string"},"type":"array","title":"Notified Months","default":[]}},"type":"object","required":["metric","value"],"title":"UsageThreshold"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WebhookConfig":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events","default":[]},"enabled":{"type":"boolean","title":"Enabled","default":false},"secret_masked":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret Masked"},"secret_set_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret Set At"}},"type":"object","title":"WebhookConfig"},"WebhookConfigBody":{"properties":{"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events","default":["calculation.updated"]},"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","required":["url"],"title":"WebhookConfigBody"},"WebhookConfigCreated":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events","default":[]},"enabled":{"type":"boolean","title":"Enabled","default":false},"secret_masked":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret Masked"},"secret_set_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret Set At"},"secret":{"type":"string","title":"Secret"}},"type":"object","required":["secret"],"title":"WebhookConfigCreated"},"WebhookDelivery":{"properties":{"id":{"type":"string","title":"Id"},"event":{"type":"string","title":"Event"},"end_user_id":{"type":"string","title":"End User Id"},"status":{"type":"string","enum":["delivered","failed"],"title":"Status"},"response_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Code"},"response_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Body"},"attempts":{"type":"integer","title":"Attempts"},"created_at":{"type":"string","title":"Created At"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"}},"type":"object","required":["id","event","end_user_id","status","attempts","created_at"],"title":"WebhookDelivery"},"server__UsageResponse":{"properties":{"range_days":{"type":"integer","title":"Range Days"},"summary":{"additionalProperties":true,"type":"object","title":"Summary"},"series":{"items":{"$ref":"#/components/schemas/UsageSeries"},"type":"array","title":"Series"},"top_categories":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Top Categories"}},"type":"object","required":["range_days","summary","series","top_categories"],"title":"UsageResponse"},"v1_api__UsageResponse":{"properties":{"month":{"type":"string","title":"Month"},"partner":{"type":"string","title":"Partner"},"production":{"$ref":"#/components/schemas/UsageBucket"},"sandbox":{"$ref":"#/components/schemas/UsageBucket"},"rate_per_user_usd":{"type":"number","title":"Rate Per User Usd"}},"type":"object","required":["month","partner","production","sandbox","rate_per_user_usd"],"title":"UsageResponse"}}}}