{"openapi":"3.1.0","info":{"title":"Admiral API","version":"0.1.0"},"paths":{"/health":{"get":{"summary":"Health","description":"Liveness, and it has to mean something.\n\nThis is the ALB's health check (infra/ecs.tf), so what it returns\ndecides whether a task keeps receiving traffic. It used to return\n`ok` unconditionally — so a task whose database connection had died\nstayed in the target group and kept answering requests it could not\nserve, and the load balancer had no way to route around it.\n\nThe query is deliberately the cheapest one there is. A health check\nruns every 30 seconds per task forever; anything that touches real\ntables would be a permanent load, and anything slow would turn a\nbusy database into a failed deploy.\n\nIt is also cached for a few seconds, because this endpoint is\nunauthenticated and has to be — the ALB cannot present a credential.\nProbing per request meant anyone who could reach the load balancer\ncould open a database connection per request, for free, without\nsigning in: a health check that can be used to exhaust the pool it\nexists to report on. The cache makes a flood cost one `SELECT 1`\nevery `_HEALTH_TTL` no matter how fast it arrives, and the ALB's\n30-second interval is far longer than that, so the check it gets is\nalways freshly measured.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/holdouts/live":{"get":{"tags":["holdouts"],"summary":"Live Holdouts","description":"Every split still running in the caller's workspaces, with what the\nswitch-off needs. Membership only, never product access: after a plan\nlapses the campaign pages do not load, and Billing (which does) lists\nthese so a split still running in his account can always be switched\noff (Greptile on #467).","operationId":"live_holdouts_holdouts_live_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/providers":{"get":{"tags":["providers"],"summary":"Providers","operationId":"providers_providers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/accounts":{"get":{"tags":["accounts"],"summary":"List Accounts","operationId":"list_accounts_accounts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/accounts/privacy":{"get":{"tags":["accounts"],"summary":"Privacy Accounts","operationId":"privacy_accounts_accounts_privacy_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/accounts/connect-mcc":{"post":{"tags":["accounts"],"summary":"Connect Mcc","operationId":"connect_mcc_accounts_connect_mcc_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectMccRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/mcc-tree":{"get":{"tags":["accounts"],"summary":"Mcc Tree","description":"Operator-only enumeration using Admiral's shared manager credential.\n\nCustomer connections use their own OAuth authorization. Being signed in\nto Admiral does not grant access to the shared manager's client accounts.","operationId":"mcc_tree_accounts_mcc_tree_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/accounts/{account_id}/frequency":{"post":{"tags":["accounts"],"summary":"Set Frequency","operationId":"set_frequency_accounts__account_id__frequency_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FrequencyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/voice-settings":{"patch":{"tags":["accounts"],"summary":"Set Voice Settings","description":"Talk voice settings. voice_provider survives as an internal routing\noverride (ops/debug) — the UI no longer offers it; users choose a\nLANGUAGE and routing follows. The language must be one Admiral can\nactually speak: an unlisted tag would silently mis-transcribe the whole\ncall, which is exactly the failure this allowlist exists to prevent.","operationId":"set_voice_settings_accounts__account_id__voice_settings_patch","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceSettingsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/activate":{"post":{"tags":["accounts"],"summary":"Activate","description":"Activate syncing for an account. Connecting never requires a budget —\nan account with no live spend still connects and syncs; the cockpit shows\na soft 'add budget to start getting leads' nudge instead of blocking.","operationId":"activate_accounts__account_id__activate_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/disconnect":{"post":{"tags":["accounts"],"summary":"Disconnect","description":"Disconnect an ad account: syncing stops and the stored login is\ndeleted. This is the privacy policy's \"disconnect from Settings\" —\ndistinct from account deletion, so already-synced data stays visible.\nThe scheduler never dispatches a disconnected account, and the billing\nceiling frees the seat (connected_accounts excludes this status).\nReconnecting is the normal OAuth flow; the provider-side grant can only\nbe fully revoked on the provider's own permissions page.","operationId":"disconnect_accounts__account_id__disconnect_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}":{"delete":{"tags":["accounts"],"summary":"Delete Account","description":"Remove an account from Admiral completely — every synced row, every\nreceipt, the account itself. The ad account on the provider's side is\nuntouched. Gated behind disconnect so nobody deletes a live, syncing\naccount in one click.","operationId":"delete_account_accounts__account_id__delete","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/sync":{"post":{"tags":["accounts"],"summary":"Sync Now","description":"Kick an immediate snapshot for this account (no-op if one is running).","operationId":"sync_now_accounts__account_id__sync_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/sync-status":{"get":{"tags":["accounts"],"summary":"Sync Status","operationId":"sync_status_accounts__account_id__sync_status_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/budget-status":{"get":{"tags":["accounts"],"summary":"Budget Status","description":"Advisory only: does the account have any enabled campaign with a budget?\nDrives the cockpit nudge — never gates connection or syncing.","operationId":"budget_status_accounts__account_id__budget_status_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/timeseries":{"get":{"tags":["accounts"],"summary":"Timeseries","description":"True daily performance from GAQL segments.date — account totals per day\nplus per-campaign period totals. Backfilled 30 days on the first sync.","operationId":"timeseries_accounts__account_id__timeseries_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account 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"}}}}}}},"/accounts/{account_id}/recommendations":{"get":{"tags":["accounts"],"summary":"Recommendations","description":"The proposals queue, in the shape the cockpit has always consumed.","operationId":"recommendations_accounts__account_id__recommendations_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/recommendations/{rec_id}/apply":{"post":{"tags":["accounts"],"summary":"Apply Recommendation","operationId":"apply_recommendation_accounts__account_id__recommendations__rec_id__apply_post","parameters":[{"name":"rec_id","in":"path","required":true,"schema":{"type":"string","title":"Rec Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApplyBody"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/recommendations/{rec_id}/dismiss":{"post":{"tags":["accounts"],"summary":"Dismiss Recommendation","operationId":"dismiss_recommendation_accounts__account_id__recommendations__rec_id__dismiss_post","parameters":[{"name":"rec_id","in":"path","required":true,"schema":{"type":"string","title":"Rec Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/google/start":{"get":{"tags":["oauth"],"summary":"Start","operationId":"start_oauth_google_start_get","parameters":[{"name":"product","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product"}},{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Account Id"}},{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["oauth"],"summary":"Start","operationId":"start_oauth_google_start_get","parameters":[{"name":"product","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product"}},{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Account Id"}},{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/google/callback":{"get":{"tags":["oauth"],"summary":"Callback","operationId":"callback_oauth_google_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/meta/start":{"get":{"tags":["oauth"],"summary":"Start","operationId":"start_oauth_meta_start_get","parameters":[{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Account Id"}},{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["oauth"],"summary":"Start","operationId":"start_oauth_meta_start_get","parameters":[{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Account Id"}},{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/meta/callback":{"get":{"tags":["oauth"],"summary":"Callback","operationId":"callback_oauth_meta_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/{provider}/selection/{selection_id}":{"get":{"tags":["oauth"],"summary":"Read Selection","operationId":"read_selection_oauth__provider__selection__selection_id__get","parameters":[{"name":"provider","in":"path","required":true,"schema":{"enum":["google","meta"],"type":"string","title":"Provider"}},{"name":"selection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Selection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["oauth"],"summary":"Select Accounts","operationId":"select_accounts_oauth__provider__selection__selection_id__post","parameters":[{"name":"provider","in":"path","required":true,"schema":{"enum":["google","meta"],"type":"string","title":"Provider"}},{"name":"selection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Selection Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelectAccounts"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org":{"get":{"tags":["org"],"summary":"Get Org","operationId":"get_org_org_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"patch":{"tags":["org"],"summary":"Rename Org","operationId":"rename_org_org_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/health":{"patch":{"tags":["org"],"summary":"Set Health Mode","description":"Health mode and the paths to keep tags off (app/health_mode.py). Owners only, like the name: it\ndecides what Admiral stores about the workspace's leads. The paths take effect on the next Tag Manager\ninstall; one already published keeps what it was published with until it is installed again.","operationId":"set_health_mode_org_health_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/invites":{"post":{"tags":["org"],"summary":"Create Invite","operationId":"create_invite_org_invites_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/invites/{invite_id}":{"delete":{"tags":["org"],"summary":"Revoke Invite","operationId":"revoke_invite_org_invites__invite_id__delete","parameters":[{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invite Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/invites/accept":{"post":{"tags":["org"],"summary":"Accept Invite","operationId":"accept_invite_org_invites_accept_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/members/{user_id}":{"delete":{"tags":["org"],"summary":"Remove Member","operationId":"remove_member_org_members__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/delete":{"post":{"tags":["org"],"summary":"Delete Workspace And Data","description":"Delete the workspace and every row it owns, the drafts kept under the\nowner's email before sign-in, and (when they belong to no other\nworkspace) their sign-in, so the same email can start fresh.\n\nA paid plan is told to stop renewing before anything commits: if the\npayment provider can't be reached, nothing is deleted, because a\nworkspace deleted with its plan still renewing would keep charging a card\nwith nothing behind it. Admiral's own home workspace refuses: it receives every lead\n(docs/lessons/a-refusal-only-the-visitor-reads-is-silent.md).","operationId":"delete_workspace_and_data_org_delete_post","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteWorkspaceBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/campaigns":{"get":{"tags":["campaigns"],"summary":"List Campaigns","operationId":"list_campaigns_accounts__account_id__campaigns_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/campaigns/scope":{"post":{"tags":["campaigns"],"summary":"Set Scope","description":"Track/Ignore is an Admiral preference, not a provider mutation — it\nnever rides execute_mutation and nothing changes in Google or Meta\n(spec I3). Validates every id before writing anything.","operationId":"set_scope_accounts__account_id__campaigns_scope_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScopeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/campaigns/{campaign_id}/status":{"post":{"tags":["campaigns"],"summary":"Set Status","operationId":"set_status_accounts__account_id__campaigns__campaign_id__status_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/campaigns/{campaign_id}/budget":{"post":{"tags":["campaigns"],"summary":"Set Budget","operationId":"set_budget_accounts__account_id__campaigns__campaign_id__budget_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/campaigns/diagnostics":{"get":{"tags":["campaigns"],"summary":"Diagnostics","operationId":"diagnostics_accounts__account_id__campaigns_diagnostics_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/campaigns/insights/auction":{"get":{"tags":["campaigns"],"summary":"Auction Insights","description":"Per-campaign impression share: how much of the available auction each\ncampaign actually showed in, and what it lost the rest to.","operationId":"auction_insights_accounts__account_id__campaigns_insights_auction_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/ad-groups":{"get":{"tags":["ad-groups"],"summary":"List Ad Groups","operationId":"list_ad_groups_accounts__account_id__ad_groups_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"include_ignored","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Ignored"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["ad-groups"],"summary":"Create","description":"Add an ad group to a campaign. Google-only: Meta ad sets carry\ntargeting and budget that this shape can't express, so creating one\nthere needs its own surface rather than a silently-wrong default.","operationId":"create_accounts__account_id__ad_groups_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAdGroupRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/ad-groups/{ad_group_id}/status":{"post":{"tags":["ad-groups"],"summary":"Set Status","operationId":"set_status_accounts__account_id__ad_groups__ad_group_id__status_post","parameters":[{"name":"ad_group_id","in":"path","required":true,"schema":{"type":"string","title":"Ad Group Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdGroupStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/signup":{"post":{"tags":["analytics"],"summary":"Signup Completed","operationId":"signup_completed_analytics_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/heard":{"post":{"tags":["analytics"],"summary":"Heard About","description":"The answer to \"How did you hear about Admiral?\" (row 2.5, 7 Oct 2026).\n\nAsked once, optionally, on the first screen after sign up rather than on\nthe sign-up card: sign up is the step that limits customers, and a box\nthere is one more thing between a visitor and an account\n(desks/engineering/output/2026-10-07-launch-rows/heard-about-placement).\nThe first answer is kept on the person's signup_succeeded row, beside\nthe click ids the same row already carries, so one row says both what\nthe person says brought them and what the click says did. It goes to\nPostHog as its own event, once.","operationId":"heard_about_analytics_heard_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeardBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/identity":{"get":{"tags":["analytics"],"summary":"Identity Flags","description":"Whether the signed-in person is one of us, for PostHog's internal flag,\nand which workspace they are in, for its organization group.\n\nThe browser asks at every sign-in, not only at sign-up: the sign-up\nhandoff runs once, in the first day, so it would never reach the people\nwho already had accounts. The operator list stays on the server; the\nbrowser learns one boolean about the person already signed in.\n\nThe workspace is the one `get_or_create_org` would pick (most recently\njoined), read without creating one: a lookup that makes a workspace\nwould count a person who never finished signing up as a customer.","operationId":"identity_flags_analytics_identity_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/accounts/{account_id}/keywords":{"get":{"tags":["keywords"],"summary":"List Keywords","operationId":"list_keywords_accounts__account_id__keywords_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"minimum":1,"default":2000,"title":"Limit"}},{"name":"campaign","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign"}},{"name":"include_ignored","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Ignored"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/keywords/{criterion_id}/status":{"post":{"tags":["keywords"],"summary":"Set Status","operationId":"set_status_accounts__account_id__keywords__criterion_id__status_post","parameters":[{"name":"criterion_id","in":"path","required":true,"schema":{"type":"string","title":"Criterion Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeywordStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/keywords/{criterion_id}/bid":{"post":{"tags":["keywords"],"summary":"Set Bid","operationId":"set_bid_accounts__account_id__keywords__criterion_id__bid_post","parameters":[{"name":"criterion_id","in":"path","required":true,"schema":{"type":"string","title":"Criterion Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeywordBidRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/keywords/add":{"post":{"tags":["keywords"],"summary":"Add","operationId":"add_accounts__account_id__keywords_add_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddKeywordsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/search-terms/review":{"get":{"tags":["search-terms"],"summary":"Review","description":"Costly terms with zero conversions — the negatives punch-list.","operationId":"review_accounts__account_id__search_terms_review_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"min_cost","in":"query","required":false,"schema":{"type":"number","default":50.0,"title":"Min Cost"}},{"name":"include_ignored","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Ignored"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/search-terms":{"get":{"tags":["search-terms"],"summary":"All Terms","description":"Every search term of the latest run, costliest first.\n\n`campaign` narrows to one campaign's terms IN the query, before the limit\n(2026-09-24, a campaign's own Searches tab): filtered in the browser after\nan account-wide cut, a campaign whose terms all sat below it read as having\nnone. Google reports a term by campaign NAME, so this matches the name.\n\n`total` is how many terms match before the limit (Greptile on #238): the\nroom counts its rows by status, and a count over the costliest N reads as\na count over all of them unless the page knows there were more. Ignored\ncampaigns are excluded IN the query for the same reason — dropped after\nthe cut, they left fewer rows than the limit with more still unread.","operationId":"all_terms_accounts__account_id__search_terms_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":500,"title":"Limit"}},{"name":"include_ignored","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Ignored"}},{"name":"campaign","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/search-terms/negatives":{"post":{"tags":["search-terms"],"summary":"Add Negatives","operationId":"add_negatives_accounts__account_id__search_terms_negatives_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NegativesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/places":{"get":{"tags":["places"],"summary":"List Places","operationId":"list_places_accounts__account_id__places_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/places/presence":{"post":{"tags":["places"],"summary":"Show Only Where Picked","description":"Stop showing to people who are merely INTERESTED in the places picked.\n\nOne campaign per call on purpose. Batching several into one transaction\nloses the receipt for every write that already landed at Google when a\nlater one fails — the caller loops and reports per campaign instead.","operationId":"show_only_where_picked_accounts__account_id__places_presence_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresenceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/creatives":{"get":{"tags":["creatives"],"summary":"List Creatives","operationId":"list_creatives_accounts__account_id__creatives_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"include_ignored","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Ignored"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/creatives/meta-insights":{"get":{"tags":["creatives"],"summary":"Meta Insights","description":"How Meta actually spent one campaign — the Advantage+ opacity, in\nplain language, with the money beside it.\n\nThis is a reading, not a decision. Advantage+ concentration is frequently\ncorrect, so filing it in the decisions ledger would put something that is\nnot a fix among things that are.","operationId":"meta_insights_accounts__account_id__creatives_meta_insights_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"campaign_id","in":"query","required":true,"schema":{"type":"string","title":"Campaign Id"}},{"name":"include_ignored","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Ignored"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/creatives/asset-performance":{"get":{"tags":["creatives"],"summary":"Asset Performance","description":"Per-headline/description performance — the RSA optimization signal.","operationId":"asset_performance_accounts__account_id__creatives_asset_performance_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/creatives/rsa":{"post":{"tags":["creatives"],"summary":"Create Rsa","operationId":"create_rsa_accounts__account_id__creatives_rsa_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRsaRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/creatives/{ad_id}/status":{"post":{"tags":["creatives"],"summary":"Set Ad Status","operationId":"set_ad_status_accounts__account_id__creatives__ad_id__status_post","parameters":[{"name":"ad_id","in":"path","required":true,"schema":{"type":"string","title":"Ad Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/creatives/{ad_id}/appeal":{"post":{"tags":["creatives"],"summary":"Appeal Ad","description":"Appeal a policy-disapproved Google ad without leaving Admiral.\n\nThe mutation reads Google's live policy state first, so a stale card\ncan't file a pointless appeal: approved and under-review ads 409 with\nthe reason, and non-exemptible strikes come back with Google's own\nwords. On success the identical ad is resubmitted with the struck\ntopics named for re-review, the struck original is paused, and the\nreceipt lands in the Log like any other change.","operationId":"appeal_ad_accounts__account_id__creatives__ad_id__appeal_post","parameters":[{"name":"ad_id","in":"path","required":true,"schema":{"type":"string","title":"Ad Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/alerts":{"get":{"tags":["alerts"],"summary":"List Alerts","operationId":"list_alerts_accounts__account_id__alerts_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"include_resolved","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Resolved"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/alerts/{alert_id}/resolve":{"post":{"tags":["alerts"],"summary":"Resolve","operationId":"resolve_accounts__account_id__alerts__alert_id__resolve_post","parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"integer","title":"Alert Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/alerts/{alert_id}/snooze":{"post":{"tags":["alerts"],"summary":"Snooze Alert","description":"Stop emailing about this KIND of alert on this account.\n\nKeyed on the type rather than this one row: a low balance escalating\nfrom heads-up to urgent is a different alert, and re-interrupting\nsomebody who has already said \"I know\" is the behaviour this exists to\nend.\n\n`days=0` is the undo, and is why the route does not need a DELETE.","operationId":"snooze_alert_accounts__account_id__alerts__alert_id__snooze_post","parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"integer","title":"Alert Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnoozeBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/audit":{"get":{"tags":["audit"],"summary":"Timeline","description":"One merged timeline: Admiral mutations + diff-engine changes +\nGoogle-UI change_events (source='google_ui').","operationId":"timeline_accounts__account_id__audit_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"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"}}}}}}},"/accounts/{account_id}/audit/mutations/{mutation_id}":{"get":{"tags":["audit"],"summary":"Receipt","description":"One receipt by id (board B44) — the same shape the timeline lists,\nplus the other legs of its group, so the page needs no 1000-row read\nto find an older change. Another tenant's id is the same 404 as a\nmissing one.","operationId":"receipt_accounts__account_id__audit_mutations__mutation_id__get","parameters":[{"name":"mutation_id","in":"path","required":true,"schema":{"type":"integer","title":"Mutation Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/audit/mutations/{mutation_id}/revert":{"post":{"tags":["audit"],"summary":"Revert","operationId":"revert_accounts__account_id__audit_mutations__mutation_id__revert_post","parameters":[{"name":"mutation_id","in":"path","required":true,"schema":{"type":"integer","title":"Mutation Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/stream":{"get":{"tags":["stream"],"summary":"Stream","operationId":"stream_accounts__account_id__stream_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","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"}}}}}}},"/accounts/{account_id}/stream/unread":{"get":{"tags":["stream"],"summary":"Unread","description":"How many stream events this reader has not opened the room for.\nBefore the first visit everything counts — a new account's first\nalert should light the rail, not wait for a visit that clears it.","operationId":"unread_accounts__account_id__stream_unread_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/stream/seen":{"post":{"tags":["stream"],"summary":"Seen","description":"The room was opened: move this reader's mark to now. One row per\nreader per account, so a second visit updates rather than duplicates.","operationId":"seen_accounts__account_id__stream_seen_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/voice/session":{"post":{"tags":["voice"],"summary":"Mint Session","operationId":"mint_session_accounts__account_id__voice_session_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/voice/session/{sid}":{"get":{"tags":["voice"],"summary":"Poll Session","operationId":"poll_session_accounts__account_id__voice_session__sid__get","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sid"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/voice/session/{sid}/confirm-resolved":{"post":{"tags":["voice"],"summary":"Confirm Resolved","operationId":"confirm_resolved_accounts__account_id__voice_session__sid__confirm_resolved_post","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sid"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmResolved"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/voice/session/{sid}/end":{"post":{"tags":["voice"],"summary":"End Session","operationId":"end_session_accounts__account_id__voice_session__sid__end_post","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sid"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/overview":{"get":{"tags":["overview"],"summary":"Overview","operationId":"overview_accounts__account_id__overview_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/breakdowns":{"get":{"tags":["overview"],"summary":"Breakdowns","description":"Analytics slices for the Today room: device split + top search terms.\nBoth read the latest snapshot run.","operationId":"breakdowns_accounts__account_id__breakdowns_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/pacing":{"get":{"tags":["overview"],"summary":"Pacing","description":"Where this month's spend lands if nothing changes.\n\nBoth sides of the comparison are scoped to tracked campaigns — see\npipeline/pacing.account_pacing for why mixing the two bases quietly\nturns a healthy account into one running 60% under budget.","operationId":"pacing_accounts__account_id__pacing_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/benchmarks":{"get":{"tags":["overview"],"summary":"Account Benchmarks","description":"This account's rates against Admiral's other accounts — or a sentence\nsaying why there is no benchmark yet. Never a median of three accounts.","operationId":"account_benchmarks_accounts__account_id__benchmarks_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/fleet":{"get":{"tags":["fleet"],"summary":"Fleet","description":"Operator triage across every account in the caller's orgs.\n\nEach account reports two totals, each labelled with its basis: a 30-day\nwindow from daily_rollups (comparable to the Channels table above it) and\nthe provider's own all-time figure. It used to report one unlabelled\nnumber summed from the latest run's campaign rows — which drops removed\ncampaigns and means \"last 30 days\" on Meta but \"all time\" on Google.\nA window that was never read carries `window_unread` saying why.","operationId":"fleet_fleet_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/fleet/compare":{"get":{"tags":["fleet"],"summary":"Fleet Compare","operationId":"fleet_compare_fleet_compare_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"}}}}}}},"/fleet/pairs":{"get":{"tags":["pairs"],"summary":"List Pairs","operationId":"list_pairs_fleet_pairs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["pairs"],"summary":"Create Pair","operationId":"create_pair_fleet_pairs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/fleet/pairs/{pair_id}":{"delete":{"tags":["pairs"],"summary":"Delete Pair","operationId":"delete_pair_fleet_pairs__pair_id__delete","parameters":[{"name":"pair_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Pair Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/fleet/pairs/{pair_id}/action":{"post":{"tags":["pairs"],"summary":"Pair Action","description":"One receipt, two channels. The server resolves every prev value and\nfloor itself — the client sends only intent (+ an idempotency key).","operationId":"pair_action_fleet_pairs__pair_id__action_post","parameters":[{"name":"pair_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Pair Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairActionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/fleet/experiments":{"get":{"tags":["experiments"],"summary":"List Experiments","operationId":"list_experiments_fleet_experiments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["experiments"],"summary":"Create Experiment","operationId":"create_experiment_fleet_experiments_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/fleet/experiments/preflight":{"get":{"tags":["experiments"],"summary":"Preflight","description":"Is a test between these two worth starting?\n\nRead from the last 30 days of both campaigns: for every link without a\nrunning test, or, given `a_*` and `b_*`, for any two campaigns before\nthey are linked. It warns; it never blocks — Admiral proposes, the user\ndisposes.","operationId":"preflight_fleet_experiments_preflight_get","parameters":[{"name":"a_account","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"A Account"}},{"name":"a_campaign","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"A Campaign"}},{"name":"b_account","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"B Account"}},{"name":"b_campaign","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"B Campaign"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/fleet/experiments/{experiment_id}/end":{"post":{"tags":["experiments"],"summary":"End Experiment","description":"End a running test now and record what it found.\n\nClassified on evidence alone — the user asked, so the day counters\ndon't get a vote. Ending writes nothing to Google or Meta; it freezes\na finding. Any budget move it suggests still lands as a proposal to\napprove.","operationId":"end_experiment_fleet_experiments__experiment_id__end_post","parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Experiment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/fleet/experiments/{experiment_id}/archive":{"post":{"tags":["experiments"],"summary":"Archive Experiment","operationId":"archive_experiment_fleet_experiments__experiment_id__archive_post","parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Experiment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/fleet/experiments/{experiment_id}/publish-creatives":{"post":{"tags":["experiments"],"summary":"Publish Creatives","description":"Same concept, both channels, one grouped receipt. Both ads land\nPAUSED; the Facebook Page id is the explicit gate — no Page, no Meta\ncreative. Scoped to direct-token accounts per the app-review note.","operationId":"publish_creatives_fleet_experiments__experiment_id__publish_creatives_post","parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Experiment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/holdouts/preflight":{"get":{"tags":["holdouts"],"summary":"Holdout Preflight","description":"Can this campaign hold one, and how long would a reading take at\neach share. Reads only.","operationId":"holdout_preflight_accounts__account_id__holdouts_preflight_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"campaign_id","in":"query","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/holdouts":{"get":{"tags":["holdouts"],"summary":"List Holdouts","description":"Every hold-out on the account, newest first, or one campaign's.\nMembership only, like the switch: a lapsed plan must still see the split\nthat is running in its account in order to switch it off.","operationId":"list_holdouts_accounts__account_id__holdouts_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"campaign_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["holdouts"],"summary":"Start Holdout","operationId":"start_holdout_accounts__account_id__holdouts_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HoldoutCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/holdouts/{holdout_id}":{"get":{"tags":["holdouts"],"summary":"Get Holdout","operationId":"get_holdout_accounts__account_id__holdouts__holdout_id__get","parameters":[{"name":"holdout_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Holdout Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/holdouts/{holdout_id}/end":{"post":{"tags":["holdouts"],"summary":"End Holdout","description":"Switch off. Membership only, never product access: a split that is\nstill running in his account must stay switchable after a plan lapses.","operationId":"end_holdout_accounts__account_id__holdouts__holdout_id__end_post","parameters":[{"name":"holdout_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Holdout Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/impact":{"get":{"tags":["impact"],"summary":"Impact","description":"Outcomes: daily leads/spend series with Admiral's actions overlaid.\nBaseline = first half of the window; current = second half.","operationId":"impact_accounts__account_id__impact_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":60,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/copilot/chat":{"post":{"tags":["copilot"],"summary":"Chat","operationId":"chat_accounts__account_id__copilot_chat_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/copilot/usage":{"get":{"tags":["copilot"],"summary":"Usage Summary","description":"Chat spend observability: daily message counts + token totals and an\nintent breakdown, straight from the metering rows.","operationId":"usage_summary_accounts__account_id__copilot_usage_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account 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"}}}}}}},"/accounts/{account_id}/copilot/execute-action":{"post":{"tags":["copilot"],"summary":"Execute Action","description":"Executes an Admiral AI-proposed action AFTER the user confirmed it in\nthe UI. Same mutation path as manual actions; logged with source='agent'.","operationId":"execute_action_accounts__account_id__copilot_execute_action_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteActionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/copilot/search-terms-analysis":{"post":{"tags":["copilot"],"summary":"Search Terms Analysis","operationId":"search_terms_analysis_accounts__account_id__copilot_search_terms_analysis_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/anthropic":{"post":{"tags":["webhooks"],"summary":"Anthropic Webhook","operationId":"anthropic_webhook_webhooks_anthropic_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/webhooks/google-risc":{"post":{"tags":["webhooks"],"summary":"Google Risc Webhook","description":"Google Cross-Account Protection push delivery.\n\nThe body is a Security Event Token — a JWT, not JSON — and its signature\nis the authentication. Reject anything that doesn't verify; acknowledge\neverything that does with 202 so Google's retry budget is saved for real\noutages. jwt.PyJWTError covers signature, issuer, and audience failures\nin one catch because the caller can't act on the distinction anyway.","operationId":"google_risc_webhook_webhooks_google_risc_post","responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/webhooks/razorpay":{"post":{"tags":["webhooks"],"summary":"Razorpay Webhook","description":"Razorpay subscription lifecycle.\n\nSignature first, then insert-or-skip on the provider event id — a\nredelivery must be a no-op, not a second state transition. Unknown\nevents 200 so Razorpay stops retrying them.","operationId":"razorpay_webhook_webhooks_razorpay_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/webhooks/dodo":{"post":{"tags":["webhooks"],"summary":"Dodo Webhook","description":"Dodo lifecycle and payment events, accepted only when signed.","operationId":"dodo_webhook_webhooks_dodo_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/webhooks/resend":{"post":{"tags":["webhooks"],"summary":"Resend Webhook","description":"Delivery events from Resend — the half of sending Admiral was deaf to.\n\nResend returns 200 the moment it ACCEPTS a message. The bounce or the\nspam complaint arrives here, minutes later, and until this endpoint\nexisted nothing in the product ever learned that a send had failed at\nthe far end. A dead owner address kept getting the daily low-balance\nmail indefinitely, which is exactly the pattern mailbox providers read\nas an unmaintained list — and Resend's acceptable-use policy attaches\naccount closure to the resulting numbers.\n\nAnswers 200 to anything it understands OR safely ignores, so Resend\nstops retrying; only a bad signature is refused.","operationId":"resend_webhook_webhooks_resend_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/webhooks/vapi":{"post":{"tags":["webhooks"],"summary":"Vapi Webhook","operationId":"vapi_webhook_webhooks_vapi_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/webhooks/bolna":{"post":{"tags":["webhooks"],"summary":"Bolna Webhook","operationId":"bolna_webhook_webhooks_bolna_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/accounts/{account_id}/automation":{"get":{"tags":["automation"],"summary":"Get Automation","operationId":"get_automation_accounts__account_id__automation_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/automation/rules/{rule_id}":{"patch":{"tags":["automation"],"summary":"Patch Rule","operationId":"patch_rule_accounts__account_id__automation_rules__rule_id__patch","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RulePatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/automation/posture":{"post":{"tags":["automation"],"summary":"Set Posture","description":"How much Admiral may do without asking — every rule, in one write.\n\nThe page used to send one PATCH per rule. A failure half-way left the\nearlier rules changed and the page showing the old posture; on a Meta\naccount, which has no rule that may act alone, \"handle the safe stuff\"\nreported success and changed nothing; and \"ask me everything\" left rules\nthat were off, off, while promising every rule would ask. One request,\none transaction, and the whole posture:\n\n  ask   every rule on, every rule asks\n  safe  the rules that can only ever stop money act alone; every other\n        rule is on and asks — refused where no rule can act alone","operationId":"set_posture_accounts__account_id__automation_posture_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostureBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/automation/guardrails":{"patch":{"tags":["automation"],"summary":"Patch Guardrails","operationId":"patch_guardrails_accounts__account_id__automation_guardrails_patch","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardrailsPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/automation/agent-runs":{"post":{"tags":["automation"],"summary":"Manual Run","operationId":"manual_run_accounts__account_id__automation_agent_runs_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualRunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/chat/threads":{"get":{"tags":["chat"],"summary":"List Threads","operationId":"list_threads_accounts__account_id__chat_threads_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["chat"],"summary":"Create Thread","operationId":"create_thread_accounts__account_id__chat_threads_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateThread"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/chat/threads/{thread_id}":{"get":{"tags":["chat"],"summary":"Read Thread","operationId":"read_thread_accounts__account_id__chat_threads__thread_id__get","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["chat"],"summary":"Delete Thread","operationId":"delete_thread_accounts__account_id__chat_threads__thread_id__delete","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/chat/threads/{thread_id}/messages":{"post":{"tags":["chat"],"summary":"Append Message","description":"Talk appends what was said and decided OUT LOUD — spoken turns,\nresolved decisions, the call receipt — into the same thread as the\ntyped turns, so a conversation survives the panel closing. `content`\nis the plain sentence the model reads as conversation; `meta` is how\nthe thread renders the row (kind: spoken | decision | receipt). Typed\nturns are persisted by the model call itself, never through here.\n\nTrust: a spoken row is the caller's word, like an imported transcript.\nA receipt row is materialised server-side and an applied decision is\nrefused outright (see _materialise and app.chat_attach) — the browser\ncannot claim a change it did not make, relabel one, or attach one twice.","operationId":"append_message_accounts__account_id__chat_threads__thread_id__messages_post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppendMessage"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/chat/threads/import":{"post":{"tags":["chat"],"summary":"Import Threads","description":"One-time migration path for the old localStorage transcripts.","operationId":"import_threads_accounts__account_id__chat_threads_import_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/memory":{"get":{"tags":["chat"],"summary":"List Memory","operationId":"list_memory_accounts__account_id__memory_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["chat"],"summary":"Put Note","description":"Create or replace one note.","operationId":"put_note_accounts__account_id__memory_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__chat_memory__NoteBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["chat"],"summary":"Delete Note","operationId":"delete_note_accounts__account_id__memory_delete","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"path","in":"query","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/setup-audit":{"get":{"tags":["setup-audit"],"summary":"Setup Audit","operationId":"setup_audit_accounts__account_id__setup_audit_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/launch/parse-products":{"post":{"tags":["launch"],"summary":"Parse Products","description":"Product-CSV connector: any store export (Shopify, Amazon, a plain\nsheet) → normalized product list the draft grounds itself in. The\nbrowser reads the file and posts its text — no multipart plumbing.","operationId":"parse_products_accounts__account_id__launch_parse_products_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseProductsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/launch/creative/generate-image":{"post":{"tags":["launch"],"summary":"Generate Creative Image","description":"AI ad-image generation (flag-gated). Generates from a draft's scanned\nbrand context when draft_id is given, or standalone from `prompt` alone\n(the Studio room) — at least one of the two is required. Feeds the\n\"Generate ad creative\" panel in MetaEditor and the Studio gallery.","operationId":"generate_creative_image_accounts__account_id__launch_creative_generate_image_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateCreativeImageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/launch/geo-search":{"get":{"tags":["launch"],"summary":"Geo Search","description":"Type-ahead for the location editor. Read-only.","operationId":"geo_search_accounts__account_id__launch_geo_search_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"country","in":"query","required":false,"schema":{"type":"string","default":"","title":"Country"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/launch/funds":{"get":{"tags":["launch"],"summary":"Funds","description":"What is actually left in the ad account, before anything is launched.\n\nThe numbers already existed — `pipeline/funds_reader.py` reads both\nproviders for the daily low-balance sweep — but nothing exposed them to\nthe customer, so the flow could create a campaign, turn it on, and leave\nit sitting in an account with no money behind it. The provider says\nnothing: it accepts the campaign and simply never serves.\n\nReported, never judged. `balance_micros` is null for an account with no\nprepaid balance to read — a Google account on monthly invoicing has\nnone, and neither does one whose budget could not be read — and those\ntwo are indistinguishable from here, so this says null and the screen\nsays it cannot tell rather than inventing a zero.\n\n`tax_rate` is the sales tax the provider adds on top of every figure its\nAPI reports, so the caller can print the number the provider's own\nbilling screen prints. India's 18% GST on ad spend is the case that\nmatters: ₹3,000 loaded is ₹2,542 of deliverable spend.","operationId":"funds_accounts__account_id__launch_funds_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/launch/languages":{"get":{"tags":["launch"],"summary":"Languages","description":"Every language a campaign may target. Read-only, fetched live — a\nchecked-in id table would rot without anyone noticing.","operationId":"languages_accounts__account_id__launch_languages_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/launch/meta-pages":{"get":{"tags":["launch"],"summary":"Meta Pages","description":"The Facebook Pages this token can run ads for — the ad's page_id is\nthe human's pick, never inferred. pages_show_list is Standard access.","operationId":"meta_pages_accounts__account_id__launch_meta_pages_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/launch/meta-lead-forms":{"get":{"tags":["launch"],"summary":"Meta Lead Forms","description":"The instant forms a Page already has, for the ad to collect leads in.\n\nRead, never created. A lead form carries a privacy-policy URL and legal\nquestion text that belong to the advertiser; inventing either on their\nbehalf is not something software should do, and a form with a wrong\nprivacy URL is the advertiser's liability rather than Admiral's.\n\nThe reading itself lives in providers/meta/lead_forms.py, because the\npush re-checks the same thing and two readers is how a picker and a\nlauncher come to disagree about which forms are live.","operationId":"meta_lead_forms_accounts__account_id__launch_meta_lead_forms_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"page_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Page Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/launch/meta-geo-search":{"get":{"tags":["launch"],"summary":"Meta Geo Search","description":"Country type-ahead from Meta's own geo database — fetched, never a\nchecked-in table (geo-search precedent). Countries only: the launch\ntargets whole countries; city-level slicing is an Ads Manager job.","operationId":"meta_geo_search_accounts__account_id__launch_meta_geo_search_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/launch/demand-check":{"post":{"tags":["launch"],"summary":"Demand Check","description":"Is anyone searching for this? — asked before a rupee moves.\n\nThe wizard used to take a website and a budget and say nothing about\nwhether the business had any search demand at all; you found that out by\nspending. This reads the same pages the drafter would read, asks Google's\nown Keyword Planner about them, and answers on screen — including the\nunflattering half, which words the site leads with that nobody searches.\n\nRead-only against Google, and it writes no draft: calling it commits the\ncaller to nothing.","operationId":"demand_check_accounts__account_id__launch_demand_check_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DemandCheckRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/launch/drafts":{"post":{"tags":["launch"],"summary":"Create Draft","operationId":"create_draft_accounts__account_id__launch_drafts_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDraftRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["launch"],"summary":"List Drafts","operationId":"list_drafts_accounts__account_id__launch_drafts_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/launch/drafts/{draft_id}":{"get":{"tags":["launch"],"summary":"Get Draft","operationId":"get_draft_accounts__account_id__launch_drafts__draft_id__get","parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Draft Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["launch"],"summary":"Patch Draft","operationId":"patch_draft_accounts__account_id__launch_drafts__draft_id__patch","parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Draft Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchDraftRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/launch/drafts/{draft_id}/validate":{"post":{"tags":["launch"],"summary":"Validate Draft","operationId":"validate_draft_accounts__account_id__launch_drafts__draft_id__validate_post","parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Draft Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/launch/drafts/{draft_id}/push":{"post":{"tags":["launch"],"summary":"Push Draft","operationId":"push_draft_accounts__account_id__launch_drafts__draft_id__push_post","parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Draft Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/launch/drafts/{draft_id}/upload-video":{"post":{"tags":["launch"],"summary":"Upload Video","description":"Publish a picked Studio video to YouTube (UNLISTED) and stamp the\nreturned id onto the draft's plan.\n\nSCOPE-GATED end to end: flag-gated (video_campaign_enabled_for) so the\nendpoint is invisible to accounts the reviewer hasn't opted in, and the\nupload itself needs the youtube.upload scope, which is only granted on\nthe flag-gated re-consent path. Until Google verifies that scope, a real\ncall returns Google's insufficient-permission error verbatim (502) —\nthat's the honest state, not a fake success. The campaign builder does\nNOT depend on this: a youtube_video_id can also be pasted directly (the\neditor's paste box, and the reviewer's live smoke).","operationId":"upload_video_accounts__account_id__launch_drafts__draft_id__upload_video_post","parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Draft Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadVideoRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/launch/drafts/{draft_id}/discard":{"post":{"tags":["launch"],"summary":"Discard Draft","operationId":"discard_draft_accounts__account_id__launch_drafts__draft_id__discard_post","parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Draft Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/media":{"get":{"tags":["media"],"summary":"List Media","description":"The Studio gallery: every image generated for this account, newest\nfirst, each carrying a fresh presigned URL. A bucket that isn't\nconfigured degrades to null urls rather than a broken page — the rows\n(and their prompts) are still real history.","operationId":"list_media_accounts__account_id__media_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/media/{media_id}":{"get":{"tags":["media"],"summary":"Get Media","operationId":"get_media_accounts__account_id__media__media_id__get","parameters":[{"name":"media_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Media Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/media/reference":{"post":{"tags":["media"],"summary":"Upload Reference Image","description":"Upload a brand asset (logo, product photo) as a reference image —\na `media` row with kind=\"reference\", the same S3-backed store as\ngenerated creative. Later generation calls pass its id back as one of\nup to 3 `reference_media_ids` (app/ai/creative_image.py) so on-brand\noutput is conditioned on it. Flag-gated on the same creative_gen flag\nas generation: a reference with nothing to feed isn't worth exposing.","operationId":"upload_reference_image_accounts__account_id__media_reference_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadReferenceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/creative/generate-video":{"post":{"tags":["creative-video"],"summary":"Generate Video","description":"Starts a video job and returns immediately — poll\nGET .../video-jobs/{job_id} for progress. Feeds the Studio room's\n\"Generate video\" panel.","operationId":"generate_video_accounts__account_id__creative_generate_video_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateVideoRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/creative/video-jobs/{job_id}":{"get":{"tags":["creative-video"],"summary":"Get Video Job","description":"Status poll — account-scoped like every other room, so another\naccount's job id 404s here exactly like a missing one.","operationId":"get_video_job_accounts__account_id__creative_video_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/creative/video-jobs":{"get":{"tags":["creative-video"],"summary":"List Video Jobs","description":"Recent video jobs for this account, newest first — the Studio\nroom's video history, alongside GET .../media's image gallery.","operationId":"list_video_jobs_accounts__account_id__creative_video_jobs_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/plans":{"get":{"tags":["billing"],"summary":"Plans","description":"Public catalogue — the same numbers the marketing page renders.\n\nPrice is a (tier, band) pair, so the catalogue ships the whole grid\nrather than one number per tier. A null price means that tier is not\nsold at that spend, which the page renders as a dash — never as free.","operationId":"plans_billing_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing":{"get":{"tags":["billing"],"summary":"Current","operationId":"current_billing_get","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/checkout":{"post":{"tags":["billing"],"summary":"Checkout","operationId":"checkout_billing_checkout_post","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/wallet":{"get":{"tags":["billing"],"summary":"Wallet","description":"The wallet in words: balance, the statement, every service's price,\nand the packs. Any member may read it; only an owner may top up.","operationId":"wallet_billing_wallet_get","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/topup":{"post":{"tags":["billing"],"summary":"Topup","description":"One-time checkout for a top-up pack. Bought only on this explicit\nrequest (CREDIT_POLICY); the signed webhook is what credits the wallet.","operationId":"topup_billing_topup_post","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopupBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/portal":{"post":{"tags":["billing"],"summary":"Customer Portal","operationId":"customer_portal_billing_portal_post","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/cancel":{"post":{"tags":["billing"],"summary":"Cancel","description":"Stop at the end of the paid period, or of the trial. Access is\nuntouched until then, and nothing is charged. A trial has no provider\nto tell, so only the flag is set; it is what the page reads to say\n\"ends on\" instead of offering a plan to pay for.","operationId":"cancel_billing_cancel_post","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CancelBody"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/resume":{"post":{"tags":["billing"],"summary":"Resume","description":"Undo a scheduled cancellation while the period is still running.","operationId":"resume_billing_resume_post","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/leave":{"get":{"tags":["billing"],"summary":"Leave","description":"What leaving would mean for this workspace, and the one offer to lead\nwith for each reason the owner might give. The page picks from `lead`\nwithout asking again, so choosing a reason never waits on a request.","operationId":"leave_billing_leave_get","parameters":[{"name":"intent","in":"query","required":false,"schema":{"type":"string","pattern":"^(cancel|delete)$","default":"cancel","title":"Intent"}},{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/leave/offer":{"post":{"tags":["billing"],"summary":"Take Offer","description":"Take the save offer. Each is given once per workspace; staying lifts\na cancellation the owner had scheduled.","operationId":"take_offer_billing_leave_offer_post","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/business":{"get":{"tags":["business"],"summary":"Workspaces","operationId":"workspaces_business_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/business/{org_id}":{"get":{"tags":["business"],"summary":"Read Profile","operationId":"read_profile_business__org_id__get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["business"],"summary":"Save Profile","operationId":"save_profile_business__org_id__patch","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileWrite"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/business/{org_id}/reset":{"post":{"tags":["business"],"summary":"Reset Profile","description":"Start over: everything Admiral read and every answer the customer gave,\ncleared, and the first run back at its Start screen.\n\nA draft still parked for an account is discarded with it: it was written\nfrom the facts being cleared, Overview would keep leading with it, and\nthe next draft would be refused while it existed. A draft already bound\nto an ad account, and anything running there, is not touched — those\ncarry their own copy of the facts. Nothing here is charged.","operationId":"reset_profile_business__org_id__reset_post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/business/{org_id}/website":{"post":{"tags":["business"],"summary":"Read Website","operationId":"read_website_business__org_id__website_post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanWrite"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/business/{org_id}/website/continue":{"post":{"tags":["business"],"summary":"Continue Website","operationId":"continue_website_business__org_id__website_continue_post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanWrite"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/business/{org_id}/prepare":{"post":{"tags":["business"],"summary":"Prepare Brief","description":"Reuse the catalogued reader on saved evidence, once per website scan.\n\nThe durable credit request protects retries across process restarts. A\ncompleted model result can be reapplied without another provider call;\ncustomer edits made while it ran always take priority.","operationId":"prepare_brief_business__org_id__prepare_post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanWrite"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/business/{org_id}/sources/linkedin":{"post":{"tags":["business"],"summary":"Import Linkedin","operationId":"import_linkedin_business__org_id__sources_linkedin_post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyImport"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile":{"get":{"tags":["business-profile"],"summary":"Read Profile","operationId":"read_profile_profile_get","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile/kept-draft":{"get":{"tags":["business-profile"],"summary":"Kept Draft","description":"The newest plan kept before sign-in for the signed-in email, not yet\nclaimed. The confirmation link can open in a browser that holds nothing\nof the interview, and the workspace then had no draft id to claim with:\nit sent the customer back to read their site and write the plan again\n(mailmycard.com, 2026-09-26). Only an id, only for this email; the\nclaim still checks the email itself.","operationId":"kept_draft_profile_kept_draft_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/profile/first-read":{"get":{"tags":["business-profile"],"summary":"First Read","description":"What Admiral read on the customer's site before they signed up — the\nfindings and the money line they unlocked — for the workspace their\nplan was claimed into (join 3, 2026-09-24). It used to stop at the\ndoor: the console showed the campaign drafted from the read and never\nthe read itself.\n\nThe claim already links it: the profile names the claimed draft, and\nthe draft names its read, so nothing new is stored. It comes back whole,\nbecause the address that unlocked it is the one the claim checked. None\nfor a workspace that began some other way, or a draft claimed elsewhere.","operationId":"first_read_profile_first_read_get","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile/draft/{draft_id}/bind":{"post":{"tags":["business-profile"],"summary":"Bind Draft","operationId":"bind_draft_profile_draft__draft_id__bind_post","parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Draft Id"}},{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BindDraftBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile/claim":{"post":{"tags":["business-profile"],"summary":"Claim Draft","description":"The draft written before login comes into the workspace.\n\nThe link the visitor opened carried the draft id; the signed-in email\nmust be the one the draft was kept for — the id is unguessable, but a\nforwarded link must not move somebody else's draft into a stranger's\nworkspace. The read, the market and the draft are copied into the same\nrows the journey writes (business_profiles, a parked launch_drafts row),\nso /welcome continues from the draft with nothing special-cased, and\nnothing is charged: the handoff fixes the anonymous read as unbilled.\nIdempotent — opening the link twice finds the draft already here.","operationId":"claim_draft_profile_claim_post","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile/draft":{"post":{"tags":["business-profile"],"summary":"Draft Campaign","description":"Draft the first campaign from the profile, before any ad account.\n\nThe draft is parked — account_id NULL — until the customer chooses an\nactive account on its channel through the explicit bind route, where the\nsix approvals pick it up at \"Check\". The journey is USD-only (Decision\n1), so the first daily budget is the chosen band's low edge spread over\na month, in dollars.\n\nThe channel is the customer's, chosen beside the budget. It used to be\nthe string \"google\", always, for every business — and `bind_parked_drafts`\nmatches a draft to an account of the same channel, so a Meta advertiser\nwalked the whole first run, paid for it, connected their Meta account and\nwatched the draft never arrive. Both drafters have the same contract, so\nthe only thing that was missing was the asking.","operationId":"draft_campaign_profile_draft_post","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile/segment":{"post":{"tags":["business-profile"],"summary":"Choose Segment","operationId":"choose_segment_profile_segment_post","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile/sources":{"post":{"tags":["business-profile"],"summary":"Read Sources","operationId":"read_sources_profile_sources_post","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourcesBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile/rescan":{"post":{"tags":["business-profile"],"summary":"Rescan","operationId":"rescan_profile_rescan_post","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile/items":{"patch":{"tags":["business-profile"],"summary":"Correct Item","operationId":"correct_item_profile_items_patch","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CorrectionBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile/confirm":{"post":{"tags":["business-profile"],"summary":"Confirm Map","description":"The map is right: read the market. Progress moves to `researching`\nfirst so a refresh mid-way shows the reading screen, then to `summary`.\n\nWith `search_terms`, those are what Google is asked about, and they stay\nthe customer's for every later check (a country, asking again).","operationId":"confirm_map_profile_confirm_post","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ConfirmBody"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile/advance":{"post":{"tags":["business-profile"],"summary":"Advance","description":"One station forward, or back to any earlier one.\n\nSkipping between the later stations is still refused — each is a decision\nAdmiral asks the customer to look at, and a client that jumps past them\nhas looked at none.\n\nThe map is the exception, and deliberately so. The stations that used to\nfollow it have moved to rooms the customer can return to: the market\nresearch is a tab in the Business room, and the budget and the campaign\nkind are answered in New campaign. So from the map the business part is\nfinished, and `done` is the only move — the first run goes on to connect\nan account rather than through four screens that are no longer there.\n\nWithout this the first run had no exit that did not charge: the only\ncontrol on the map ran the market research, which now renders somewhere\nthe reader would not be sent, so ten credits bought a screen they never\nsaw.","operationId":"advance_profile_advance_post","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvanceBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile/assumptions":{"patch":{"tags":["business-profile"],"summary":"Set Assumptions","operationId":"set_assumptions_profile_assumptions_patch","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssumptionsBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile/budget":{"post":{"tags":["business-profile"],"summary":"Choose Budget","description":"The customer picks a band; Admiral's plan for it is the next screen.","operationId":"choose_budget_profile_budget_post","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile/competitors":{"post":{"tags":["business-profile"],"summary":"Name Competitors","description":"Up to two competitors the customer names; Admiral reads their sites\nand looks at the market again.","operationId":"name_competitors_profile_competitors_post","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompetitorsBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile/research-country":{"post":{"tags":["business-profile"],"summary":"Research Country","operationId":"research_country_profile_research_country_post","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResearchCountryBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile/market-read":{"post":{"tags":["business-profile"],"summary":"Market Read Endpoint","description":"What Admiral makes of the market it already checked.\n\nThe numbers on that screen were bought from Google and are checkable.\nThis is a reading of them, and it is labelled as one — so the rule that\nmatters is that every line points at something Admiral was given. A\nsentence with no anchor beside checkable numbers does not merely fail on\nits own; it puts every number next to it in doubt.\n\nCharged like the rest, with the two refusals the market step taught:\nrefused ABOVE the hold when there is nothing to read, and released when\nthe reading cannot be anchored — because a card the customer cannot see\nis the one thing they must never pay for.","operationId":"market_read_endpoint_profile_market_read_post","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile/exchange-rate":{"patch":{"tags":["business-profile"],"summary":"Exchange Rate","operationId":"exchange_rate_profile_exchange_rate_patch","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeRateBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile/landing-page":{"post":{"tags":["business-profile"],"summary":"Draft Landing","operationId":"draft_landing_profile_landing_page_post","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandingPageBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile/landing-page/{page_id}/check":{"post":{"tags":["business-profile"],"summary":"Check Landing","description":"The customer says where they published it; Admiral reads that page\nand records the two ad tags and whether it still answers the search.\nFree: it is a read of their own site, not a service.","operationId":"check_landing_profile_landing_page__page_id__check_post","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","title":"Page Id"}},{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandingCheckBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/conversion-actions":{"get":{"tags":["tags"],"summary":"List Conversion Actions","description":"The account's conversion actions, with the id + label a tag install\nneeds — parsed from Google's own event snippet, so nobody has to know\nwhat a \"conversion label\" is, let alone paste one.\n\nEvery action is returned with `installable` and, when it is not, a\n`blocked_reason` saying why. The four UI panels used to filter on\n`conversion_id && conversion_label` themselves, which silently dropped\nevery imported, call-only and app conversion — real, enabled conversions\nthat simply have no website snippet — and then blamed the sync.\n\n`synced` separates \"we have never pulled this account\" from \"this\naccount genuinely has no conversion actions\". They are different\nproblems with different answers, and both used to render the same\nsentence.","operationId":"list_conversion_actions_accounts__account_id__conversion_actions_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["tags"],"summary":"Create Conversion Action","description":"Make one, for the advertiser who has never had one.\n\nRides the mutation log with a reverter, like every other change: creating\na conversion action is a real write into somebody's Google Ads account,\nand it should be as undoable as pausing a keyword.","operationId":"create_conversion_action_accounts__account_id__conversion_actions_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewConversionBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/tag-connections":{"get":{"tags":["tags"],"summary":"List Connections","operationId":"list_connections_accounts__account_id__tag_connections_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/tag-connections/{connection_id}/activate":{"post":{"tags":["tags"],"summary":"Activate Connection","operationId":"activate_connection_accounts__account_id__tag_connections__connection_id__activate_post","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/tag-connections/{connection_id}/hide":{"post":{"tags":["tags"],"summary":"Hide Connection","description":"Put a container out of sight — a login often reaches containers that\naren't this business's (an old client's, an agency's). Hiding is\nreversible and touches nothing in Tag Manager itself.","operationId":"hide_connection_accounts__account_id__tag_connections__connection_id__hide_post","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/tag-connections/{connection_id}/unhide":{"post":{"tags":["tags"],"summary":"Unhide Connection","operationId":"unhide_connection_accounts__account_id__tag_connections__connection_id__unhide_post","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/tag-connections/hostinger":{"post":{"tags":["tags"],"summary":"Connect Hostinger","description":"Connect a site whose files we reach over FTP.\n\nCalled twice: once without `remote_path` to probe, once with it to save.\nProbing stores nothing, so a credential only lands in the database after\nthe customer has seen what we found and chosen a page.","operationId":"connect_hostinger_accounts__account_id__tag_connections_hostinger_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HostingerBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/tag-installs":{"get":{"tags":["tags"],"summary":"List Installs","operationId":"list_installs_accounts__account_id__tag_installs_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["tags"],"summary":"Create Install","operationId":"create_install_accounts__account_id__tag_installs_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/site-fixes/structured-data":{"get":{"tags":["tags"],"summary":"Structured Data Preview","description":"What Admiral would add, where it can go, and what is already there.\n\nBuilt from what the customer confirmed; `missing` says what to confirm\nfirst when there is not enough to say anything.","operationId":"structured_data_preview_accounts__account_id__site_fixes_structured_data_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["tags"],"summary":"Structured Data Install","description":"Add it, through the mutation log: a receipt, and undo from the Log.","operationId":"structured_data_install_accounts__account_id__site_fixes_structured_data_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteFixBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/tag-connections/github":{"post":{"tags":["tags"],"summary":"Connect Github","description":"Connect the repository a site deploys from. The token is probed\nbefore anything is stored — a credential only lands in the database\nonce it has proven it can see the repository.","operationId":"connect_github_accounts__account_id__tag_connections_github_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/tag-installs/{install_id}/pr":{"get":{"tags":["tags"],"summary":"Install Pr State","description":"The one question a parked GitHub install raises: is the pull\nrequest still open, merged and waiting on a deploy, or closed without\nmerging? Answered live from GitHub, per install.","operationId":"install_pr_state_accounts__account_id__tag_installs__install_id__pr_get","parameters":[{"name":"install_id","in":"path","required":true,"schema":{"type":"string","title":"Install Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/wordpress/check":{"post":{"tags":["tags"],"summary":"Check Wordpress","description":"Look at the site the way a stranger would, before asking for anything.\n\nEvery answer here becomes a sentence in the UI, so nothing is a status\ncode: \"this is a WordPress site\", \"it already has a tag and here is who\nput it there\", \"it runs Tag Manager, use that instead\".","operationId":"check_wordpress_accounts__account_id__wordpress_check_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/wordpress/connect":{"post":{"tags":["tags"],"summary":"Connect Wordpress","description":"Where to send the customer to approve us on their own site.","operationId":"connect_wordpress_accounts__account_id__wordpress_connect_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/wordpress/callback":{"get":{"tags":["tags"],"summary":"Wordpress Callback","description":"WordPress sends the browser back here with the credential attached.\n\nPublic by necessity — WordPress redirects a browser, it does not call an\nAPI — so the signed state and the browser-bound nonce cookie are the whole\nof the authorisation. The account id in the path is never trusted on its\nown; it must match the one inside the signature.","operationId":"wordpress_callback_accounts__account_id__wordpress_callback_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","default":"","title":"State"}},{"name":"user_login","in":"query","required":false,"schema":{"type":"string","default":"","title":"User Login"}},{"name":"password","in":"query","required":false,"schema":{"type":"string","default":"","title":"Password"}},{"name":"site_url","in":"query","required":false,"schema":{"type":"string","default":"","title":"Site Url"}},{"name":"success","in":"query","required":false,"schema":{"type":"string","default":"","title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/tag-connections/{connection_id}/triggers":{"post":{"tags":["tags"],"summary":"Set Triggers","description":"When should a conversion be reported? Stored on the site, not on one\ninstall: it is a fact about the website, not about which conversion.","operationId":"set_triggers_accounts__account_id__tag_connections__connection_id__triggers_post","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggersBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/tag-connections/{connection_id}/disconnect":{"post":{"tags":["tags"],"summary":"Disconnect Connection","description":"Forget the credential for a site.\n\nThe row itself stays: installs point at it, and a receipt that loses the\nsite it was for is not a receipt. What goes is the ability to write —\nwhich is the part the customer is asking us to give up.","operationId":"disconnect_connection_accounts__account_id__tag_connections__connection_id__disconnect_post","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/tag-plugin":{"get":{"tags":["tags"],"summary":"Download Plugin","description":"The plugin file, for the sites we cannot install it on ourselves.\n\nBase64 in JSON rather than a binary body: the cockpit reaches this through\na proxy that reads responses as text, and a corrupted zip that only fails\nwhen a customer tries to upload it is a bad way to find that out.","operationId":"download_plugin_accounts__account_id__tag_plugin_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/meta-pixel":{"get":{"tags":["meta-pixel"],"summary":"Get Meta Pixel","operationId":"get_meta_pixel_accounts__account_id__meta_pixel_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["meta-pixel"],"summary":"Create Meta Pixel","operationId":"create_meta_pixel_accounts__account_id__meta_pixel_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/leads":{"post":{"tags":["public"],"summary":"Create Public Lead","operationId":"create_public_lead_public_leads_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicLeadBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/callback":{"get":{"tags":["public"],"summary":"Callback Offer","description":"Whether /talk may show \"Call me now\", and the exact words to show.\nThe page renders these, and the API stores these, so they cannot differ.","operationId":"callback_offer_public_callback_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/public/callback/code":{"post":{"tags":["public"],"summary":"Callback Send Code","description":"Text a code to the number the visitor typed, so the call can only go\nto the person holding that phone.","operationId":"callback_send_code_public_callback_code_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallbackCodeBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/callback/code/check":{"post":{"tags":["public"],"summary":"Callback Check Code","description":"Right code: a short-lived proof bound to the number, for the lead form.","operationId":"callback_check_code_public_callback_code_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallbackCheckBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/leads/health":{"get":{"tags":["public"],"summary":"Lead Capture Health","description":"Could a lead land right now? For the uptime monitor, not for people.\n\nDeliberately NOT part of /health. That is the load balancer's check, and\na task that cannot file leads still serves every signed-in customer —\nfailing it would take the whole API down to report that one door is\nshut. This answers 503 on its own, so a plain status-code monitor pages\non exactly the failure that went unnoticed for eight days.","operationId":"lead_capture_health_public_leads_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/public/cal":{"post":{"tags":["public"],"summary":"Cal Booking","description":"A booked call becomes a named lead, not just a calendar entry.","operationId":"cal_booking_public_cal_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/public/qr/scan":{"post":{"tags":["public"],"summary":"Record Scan","operationId":"record_scan_public_qr_scan_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/qr/action":{"post":{"tags":["public"],"summary":"Record Action","operationId":"record_action_public_qr_action_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/leads":{"get":{"tags":["leads"],"summary":"List Leads","operationId":"list_leads_leads_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/leads/{lead_id}":{"get":{"tags":["leads"],"summary":"Get Lead","operationId":"get_lead_leads__lead_id__get","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"integer","title":"Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["leads"],"summary":"Update Lead","operationId":"update_lead_leads__lead_id__patch","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"integer","title":"Lead Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadOutcome"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/leads/{lead_id}/contact":{"patch":{"tags":["leads"],"summary":"Update Contact","operationId":"update_contact_leads__lead_id__contact_patch","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"integer","title":"Lead Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadContact"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/leads/import-csv":{"post":{"tags":["leads"],"summary":"Import Csv","operationId":"import_csv_leads_import_csv_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CSVImport"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/leads/import":{"post":{"tags":["leads"],"summary":"Import Leads","operationId":"import_leads_leads_import_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadImport"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/leads/test":{"get":{"tags":["leads"],"summary":"Test Enquiry State","operationId":"test_enquiry_state_leads_test_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["leads"],"summary":"Send Test Enquiry","operationId":"send_test_enquiry_leads_test_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/lead-connections":{"get":{"tags":["leads"],"summary":"Connections","operationId":"connections_lead_connections_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/lead-connections/meta/{account_id}/pages":{"get":{"tags":["leads"],"summary":"Pages","operationId":"pages_lead_connections_meta__account_id__pages_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lead-connections/meta/{account_id}/forms/{page_id}":{"get":{"tags":["leads"],"summary":"Forms","operationId":"forms_lead_connections_meta__account_id__forms__page_id__get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"page_id","in":"path","required":true,"schema":{"type":"string","title":"Page Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lead-connections/hubspot/oauth":{"post":{"tags":["leads"],"summary":"Connect Hubspot Oauth","operationId":"connect_hubspot_oauth_lead_connections_hubspot_oauth_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HubSpotOAuthConnect"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lead-connections/meta":{"post":{"tags":["leads"],"summary":"Connect Meta","operationId":"connect_meta_lead_connections_meta_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaConnect"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lead-connections/hubspot":{"post":{"tags":["leads"],"summary":"Connect Hubspot","operationId":"connect_hubspot_lead_connections_hubspot_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HubSpotConnect"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lead-connections/{connection_id}/sync":{"post":{"tags":["leads"],"summary":"Sync","operationId":"sync_lead_connections__connection_id__sync_post","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lead-connections/{connection_id}":{"delete":{"tags":["leads"],"summary":"Disconnect","operationId":"disconnect_lead_connections__connection_id__delete","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lead-connections/salesforce":{"post":{"tags":["leads"],"summary":"Connect Salesforce","operationId":"connect_salesforce_lead_connections_salesforce_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesforceConnect"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lead-connections/{connection_id}/exports":{"get":{"tags":["leads"],"summary":"Exports","operationId":"exports_lead_connections__connection_id__exports_get","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lead-connections/{connection_id}/exports/{lead_id}":{"post":{"tags":["leads"],"summary":"Export Lead","operationId":"export_lead_lead_connections__connection_id__exports__lead_id__post","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}},{"name":"lead_id","in":"path","required":true,"schema":{"type":"integer","title":"Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lead-connections/privacy/list":{"get":{"tags":["leads"],"summary":"Privacy Connections","operationId":"privacy_connections_lead_connections_privacy_list_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/lead-connections/{connection_id}/exports/{lead_id}/reconcile":{"post":{"tags":["leads"],"summary":"Reconcile Export","operationId":"reconcile_export_lead_connections__connection_id__exports__lead_id__reconcile_post","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}},{"name":"lead_id","in":"path","required":true,"schema":{"type":"integer","title":"Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/crm/{provider}/start":{"post":{"tags":["oauth"],"summary":"Start","operationId":"start_oauth_crm__provider__start_post","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectCRM"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/crm/{provider}/callback":{"get":{"tags":["oauth"],"summary":"Callback","operationId":"callback_oauth_crm__provider__callback_get","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/leads/{lead_id}/followups":{"get":{"tags":["leads"],"summary":"List Followups","operationId":"list_followups_leads__lead_id__followups_get","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"integer","title":"Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["leads"],"summary":"Approve","operationId":"approve_leads__lead_id__followups_post","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"integer","title":"Lead Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveFollowup"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/leads/{lead_id}/followups/{followup_id}":{"delete":{"tags":["leads"],"summary":"Cancel","operationId":"cancel_leads__lead_id__followups__followup_id__delete","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"integer","title":"Lead Id"}},{"name":"followup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Followup Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/reports":{"post":{"tags":["reports"],"summary":"Build","operationId":"build_accounts__account_id__reports_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["reports"],"summary":"List Reports","operationId":"list_reports_accounts__account_id__reports_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/{report_id}/revoke":{"post":{"tags":["reports"],"summary":"Revoke","description":"Stop the link working. The row stays, so the report can still say when\nit was revoked rather than 404-ing as if it never existed.","operationId":"revoke_reports__report_id__revoke_post","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/merchant":{"get":{"tags":["merchant"],"summary":"Merchant Status","description":"The linked Merchant account + sync bookkeeping, or {linked: false}.","operationId":"merchant_status_accounts__account_id__merchant_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/merchant/link":{"post":{"tags":["merchant"],"summary":"Link Merchant","description":"Link a Merchant Center account and ensure a primary data source.\n\nThe Merchant read (get_account) proves the token carries the `content`\nscope; a missing scope surfaces Google's own error (502).","operationId":"link_merchant_accounts__account_id__merchant_link_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkMerchantRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/merchant/sync":{"post":{"tags":["merchant"],"summary":"Sync Merchant","description":"Pull products (+ approval status) from Merchant Center into Admiral.","operationId":"sync_merchant_accounts__account_id__merchant_sync_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/merchant/products":{"get":{"tags":["merchant"],"summary":"List Products","description":"Synced products, disapproved first — powers the Shopping editor's feed\nhealth panel and mirrors what the audit reads.","operationId":"list_products_accounts__account_id__merchant_products_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/search-console":{"get":{"tags":["search-console"],"summary":"Status","description":"What is connected, and which property the table reads.","operationId":"status_accounts__account_id__search_console_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/search-console/{connection_id}/use":{"post":{"tags":["search-console"],"summary":"Use","description":"Read this property. Exactly one is in use at a time.","operationId":"use_accounts__account_id__search_console__connection_id__use_post","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/search-console/overlap":{"get":{"tags":["search-console"],"summary":"Paid And Free","description":"The account's paid searches beside what the same words get for free.","operationId":"paid_and_free_accounts__account_id__search_console_overlap_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/mcp-tokens":{"post":{"tags":["mcp-tokens"],"summary":"Mint","description":"Create a key for one ad account. The URL is returned once, here.","operationId":"mint_accounts__account_id__mcp_tokens_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MintBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["mcp-tokens"],"summary":"List Tokens","operationId":"list_tokens_accounts__account_id__mcp_tokens_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp-tokens/{token_id}/revoke":{"post":{"tags":["mcp-tokens"],"summary":"Revoke","operationId":"revoke_mcp_tokens__token_id__revoke_post","parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Token Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/tasks":{"post":{"tags":["tasks"],"summary":"Create","operationId":"create_accounts__account_id__tasks_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["tasks"],"summary":"List Tasks","operationId":"list_tasks_accounts__account_id__tasks_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tasks/{task_id}":{"patch":{"tags":["tasks"],"summary":"Toggle","operationId":"toggle_tasks__task_id__patch","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TogglePatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["tasks"],"summary":"Delete","operationId":"delete_tasks__task_id__delete","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tasks/{task_id}/leave":{"post":{"tags":["tasks"],"summary":"Leave","description":"Stop a report coming to me, and only to me (Settings › Notifications).\nPausing flips the report for every recipient; a shared report's other\nreaders keep getting it (Greptile on #248). The last recipient leaving\nleaves nobody to send to, so the report pauses, saying why.","operationId":"leave_tasks__task_id__leave_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/chat":{"post":{"tags":["public-chat"],"summary":"Chat","operationId":"chat_public_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/start/read":{"post":{"tags":["public-start"],"summary":"Start Read","operationId":"start_read_public_start_read_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/start/read/{read_id}":{"get":{"tags":["public-start"],"summary":"Get Read","operationId":"get_read_public_start_read__read_id__get","parameters":[{"name":"read_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Read Id"}},{"name":"goal","in":"query","required":false,"schema":{"type":"string","default":"auto","title":"Goal"}},{"name":"unlock","in":"query","required":false,"schema":{"type":"string","default":"","title":"Unlock"}},{"name":"x-admiral-unlock","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admiral-Unlock"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/start/unlock":{"post":{"tags":["public-start"],"summary":"Unlock Read","description":"Screen 4: the email that opens the rest of a finished read. It is a\nlead through the /talk form's own door — the same rate limit, CRM row,\nattribution and notification — as source \"scan\", with the site it\nunlocked; then the read comes back whole with the token that keeps it\nopen on this device.","operationId":"unlock_read_public_start_unlock_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnlockBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/start/seen":{"post":{"tags":["public-start"],"summary":"Gate Seen","description":"The \"See the rest\" screen came into view for a finished read. Silent\neither way: a beacon that answered with errors would only tell a scraper\nwhich read ids exist. A repeat is dropped before the address's daily\nquota is charged (Greptile on #368), so reloads cannot use it up.","operationId":"gate_seen_public_start_seen_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeenBody"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/start/shot/{read_id}/{index}":{"get":{"tags":["public-start"],"summary":"Get Shot","description":"One tile from the wall.\n\nA stable path rather than a signed URL, so the browser caches it instead\nof re-fetching every tile on every poll. It serves only what this read\nstored: the index is looked up in the row and the object key comes from\nthere, never from the caller, so nothing else in the bucket can be\nreached by guessing a path.","operationId":"get_shot_public_start_shot__read_id___index__get","parameters":[{"name":"read_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Read Id"}},{"name":"index","in":"path","required":true,"schema":{"type":"integer","title":"Index"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/start/scan/{domain}":{"get":{"tags":["public-start"],"summary":"Get Scan","description":"The what-I-saw screen as a page: the latest read of a domain,\nwhoever asked for it. Noindex on the web side.\n\nA read that is still running is returned too, and the page polls it.\nThis used to answer 404 until the read was over, so the live checklist\nthe page draws for a running read could never appear on it — somebody\nwho opened the link mid-read was told the site had not been read, then\nhad to reload to see anything (review on #213). A failed read is still\na 404: there is nothing on it to show.","operationId":"get_scan_public_start_scan__domain__get","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string","title":"Domain"}},{"name":"goal","in":"query","required":false,"schema":{"type":"string","default":"auto","title":"Goal"}},{"name":"unlock","in":"query","required":false,"schema":{"type":"string","default":"","title":"Unlock"}},{"name":"x-admiral-unlock","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admiral-Unlock"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/start/draft":{"post":{"tags":["public-start"],"summary":"Write Draft","operationId":"write_draft_public_start_draft_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/start/draft/{draft_id}":{"get":{"tags":["public-start"],"summary":"Get Draft","operationId":"get_draft_public_start_draft__draft_id__get","parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Draft Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/start/keep":{"post":{"tags":["public-start"],"summary":"Keep Draft","description":"The one thing asked for: an email to send the link to. The browser\nsends the sign-in link itself; this records which email the draft was\nkept for, so the claim on sign-in can check the two match.","operationId":"keep_draft_public_start_keep_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeepBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/feedback":{"post":{"tags":["feedback"],"summary":"Submit Feedback","description":"Mail one survey answer. Returns whether it was sent, and why not.\n\nNever 500s on a mail failure: PostHog already has the response, so the\nreply is not lost — only the notification is, and the caller is told\nexactly that rather than shown a red toast for something that worked.","operationId":"submit_feedback_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/me":{"get":{"tags":["admin"],"summary":"Me","description":"Who the console is talking to, so it shows staff only their tools.\nThe API refuses the rest either way; this only spares a wall of 403s.","operationId":"me_admin_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/accounts":{"get":{"tags":["admin"],"summary":"List Accounts","operationId":"list_accounts_admin_accounts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/accounts/{account_id}":{"patch":{"tags":["admin"],"summary":"Patch Account","operationId":"patch_account_admin_accounts__account_id__patch","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/voice/agents":{"get":{"tags":["admin"],"summary":"Voice Agents","description":"Live agent read-back + drift against the repo registry. Drift is the\nbug class where a dashboard edit and the provisioning upsert disagree —\nwhoever runs second silently wins.","operationId":"voice_agents_admin_voice_agents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/voice/provision":{"post":{"tags":["admin"],"summary":"Voice Provision","description":"Run the SAME upsert the go-live CLI runs — code is the source of\ntruth, this just presses the button from the console.","operationId":"voice_provision_admin_voice_provision_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/voice/executions":{"get":{"tags":["admin"],"summary":"Voice Executions","description":"Bolna's per-call log — status, duration, error, language. The page\nthat replaced tonight's curl archaeology.","operationId":"voice_executions_admin_voice_executions_get","parameters":[{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/voice/sessions":{"get":{"tags":["admin"],"summary":"Voice Sessions","operationId":"voice_sessions_admin_voice_sessions_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/voice/sessions/cleanup":{"post":{"tags":["admin"],"summary":"Voice Sessions Cleanup","description":"Meter and close calls that have gone quiet, by hand.\n\nSame rules as the scheduled reaper in app/scheduler.py, and for the same\nreasons: a call is abandoned when it stops beating, not when it gets old\n(nothing caps a call's length, and charging a live call mid-call would\nthen block the real ending from charging the rest), and the charge lands\nBEFORE the row leaves \"active\" so a failed meter retries instead of\nsilently writing the call off. This endpoint used to do neither — it\nmarked calls ended and never metered them at all.","operationId":"voice_sessions_cleanup_admin_voice_sessions_cleanup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReasonBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/credits/{org_id}":{"get":{"tags":["admin"],"summary":"Credit History","operationId":"credit_history_admin_credits__org_id__get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/credits/{org_id}/{reservation_id}":{"post":{"tags":["admin"],"summary":"Reconcile Credit","description":"Record evidence about a held generation and, if warranted, return the\ncustomer's credits. Returning credits never invents a provider refund:\n`actual_cost_usd` stays null until the provider's charge is reconciled.","operationId":"reconcile_credit_admin_credits__org_id___reservation_id__post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"reservation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Reservation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditReviewBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/margins":{"get":{"tags":["admin"],"summary":"Realised Margins","description":"Per-service realised margin over settled reservations.\n\n`breaches` is the list that should move a price or cut a cost: services\nwith enough measured calls to be sure, whose realised margin is under\nCREDIT_MARGIN. `catalogue` is what the prices promise on paper, so the\ntwo can be read side by side — the gap between them is the value of\nhaving measured at all.","operationId":"realised_margins_admin_margins_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"org_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/fleet":{"get":{"tags":["admin"],"summary":"Fleet","description":"Every account with the columns you triage on — not the ones you\nconfigure on. Configuration lives in /admin/accounts.","operationId":"fleet_admin_fleet_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/sync-health":{"get":{"tags":["admin"],"summary":"Sync Health","description":"Recent snapshot runs plus the standing list of accounts with a\nnon-zero failure streak. The streak is what drives the backoff in\napp/sync_health.py, so it is the number that explains a stale account.","operationId":"sync_health_admin_sync_health_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":300,"minimum":1,"default":60,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/alerts":{"get":{"tags":["admin"],"summary":"Alerts","operationId":"alerts_admin_alerts_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":150,"title":"Limit"}},{"name":"unresolved_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Unresolved Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/alerts/{alert_id}/resolve":{"post":{"tags":["admin"],"summary":"Resolve Alert","operationId":"resolve_alert_admin_alerts__alert_id__resolve_post","parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"integer","title":"Alert Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/mutations":{"get":{"tags":["admin"],"summary":"Mutations","operationId":"mutations_admin_mutations_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":150,"title":"Limit"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/mutations/{mutation_id}/revert":{"post":{"tags":["admin"],"summary":"Revert","description":"Undo from the console. Deliberately the SAME call the customer's own\nHistory room makes — an operator cannot reach a rollback path the\nproduct does not have. The account id comes from the row rather than\nthe URL, so admin still cannot revert one account's change against\nanother's ledger.","operationId":"revert_admin_mutations__mutation_id__revert_post","parameters":[{"name":"mutation_id","in":"path","required":true,"schema":{"type":"integer","title":"Mutation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/subscriptions":{"get":{"tags":["admin"],"summary":"Subscriptions","operationId":"subscriptions_admin_subscriptions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/subscriptions/{org_id}":{"patch":{"tags":["admin"],"summary":"Patch Subscription","description":"Every refusal here is a way the console could make Admiral's idea of\na plan disagree with the bill, or hand out access with no end.\n\n- `active` and `past_due` come only from the payment provider's webhook\n  (models/billing.py: \"the provider webhook is the only writer of\n  status\"), so they cannot be typed in.\n- While a provider bills the plan, its tier, status and dates are the\n  provider's: changing any of them here would make entitlements disagree\n  with what the customer is charged, and cancelling would cut access\n  while the provider keeps billing.\n- Complimentary access needs an end date. Without one it used to keep\n  the old trial end, and `resolve()` turned it into `cancelled` the day\n  the trial would have ended, or at once if that day had passed.","operationId":"patch_subscription_admin_subscriptions__org_id__patch","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/agent-runs":{"get":{"tags":["admin"],"summary":"Agent Runs","operationId":"agent_runs_admin_agent_runs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":400,"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"}}}}}}},"/admin/experiments":{"get":{"tags":["admin"],"summary":"Experiments","operationId":"experiments_admin_experiments_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":300,"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"}}}}}}},"/admin/mcp-tokens":{"get":{"tags":["admin"],"summary":"Mcp Tokens","operationId":"mcp_tokens_admin_mcp_tokens_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/mcp-tokens/{token_id}/revoke":{"post":{"tags":["admin"],"summary":"Revoke Token","operationId":"revoke_token_admin_mcp_tokens__token_id__revoke_post","parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Token Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/leads":{"get":{"tags":["admin"],"summary":"Leads","description":"People who asked about Admiral: the rows our own workspace owns.\n\n`leads` also holds every customer's captured prospects (lead forms,\nCRM imports). Listing the whole table mixed our inbound with other\npeople's customers' personal data, so this reads the home workspace\nonly, and says so when that workspace is not set or no longer exists\nrather than showing an empty list that reads as \"no enquiries\".","operationId":"leads_admin_leads_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":400,"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"}}}}}}},"/admin/prelogin":{"get":{"tags":["admin"],"summary":"Prelogin","description":"Websites read by the check strangers run before signing in, and\nwhat became of the draft each read produced.","operationId":"prelogin_admin_prelogin_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":7,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/qr":{"get":{"tags":["admin"],"summary":"Qr Scans","description":"Our own record of every scan, and QRCodeStack's count beside it.\n\nTwo counters on purpose. QRCodeStack sits in front of /hello and sees\nthe scan before our page loads, so its total is the ceiling; ours is\nthe people who arrived and what they did next. The gap is the tab\nclosed mid-redirect — small, and worth watching.","operationId":"qr_scans_admin_qr_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"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"}}}}}}},"/admin/today":{"get":{"tags":["admin"],"summary":"Today","operationId":"today_admin_today_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/orgs":{"get":{"tags":["admin"],"summary":"List Orgs","operationId":"list_orgs_admin_orgs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/orgs/{org_id}":{"get":{"tags":["admin"],"summary":"Customer","operationId":"customer_admin_orgs__org_id__get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/orgs/{org_id}/notes":{"post":{"tags":["admin"],"summary":"Add Note","operationId":"add_note_admin_orgs__org_id__notes_post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__admin_customers__NoteBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/accounts/{account_id}/sync":{"post":{"tags":["admin"],"summary":"Refresh Now","description":"Refresh one account now, through exactly the path the customer's own\n\"sync now\" takes (routers/accounts.py), so the console cannot reach a\nrefresh the product does not have.","operationId":"refresh_now_admin_accounts__account_id__sync_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/constraint":{"get":{"tags":["admin"],"summary":"Get Constraint","operationId":"get_constraint_admin_constraint_get","parameters":[{"name":"fresh","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Fresh"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/constraint/decide":{"post":{"tags":["admin"],"summary":"Decide Constraint","operationId":"decide_constraint_admin_constraint_decide_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Decision"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/verifiers":{"get":{"tags":["admin"],"summary":"List Verifiers","operationId":"list_verifiers_admin_verifiers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/verifiers/{key}/run":{"post":{"tags":["admin"],"summary":"Run Verifier","operationId":"run_verifier_admin_verifiers__key__run_post","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/outbound":{"get":{"tags":["admin"],"summary":"Outbound","description":"`assignee` is an email, \"me\" or \"none\"; `due` keeps the people whose\nnext step is today or overdue, soonest first.","operationId":"outbound_admin_outbound_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"lane","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lane"}},{"name":"assignee","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignee"}},{"name":"due","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Due"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/outbound/touches":{"get":{"tags":["admin"],"summary":"Touches","description":"The contact log: one prospect's, one lead's, or everyone's latest.","operationId":"touches_admin_outbound_touches_get","parameters":[{"name":"prospect_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Prospect Id"}},{"name":"lead_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/outbound/pool":{"get":{"tags":["admin"],"summary":"Outbound Pool","description":"The US cold-email pool at a glance: on or off, each mailbox's cap and\ncount today, what is queued. Never a token.","operationId":"outbound_pool_admin_outbound_pool_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/outbound/import":{"post":{"tags":["admin"],"summary":"Import Prospects","description":"Load the sales desk's queue. Keyed on email, else the LinkedIn profile,\nelse company and phone: a re-import updates the row's facts and draft,\nnever its status, and never reopens an opt-out.","operationId":"import_prospects_admin_outbound_import_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/outbound/{pid}":{"patch":{"tags":["admin"],"summary":"Update Prospect","operationId":"update_prospect_admin_outbound__pid__patch","parameters":[{"name":"pid","in":"path","required":true,"schema":{"type":"integer","title":"Pid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/outbound/{pid}/send":{"post":{"tags":["admin"],"summary":"Send To Prospect","operationId":"send_to_prospect_admin_outbound__pid__send_post","parameters":[{"name":"pid","in":"path","required":true,"schema":{"type":"integer","title":"Pid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/outbound/{pid}/log":{"post":{"tags":["admin"],"summary":"Log Prospect Contact","description":"A call or message made outside the console, written into the log.","operationId":"log_prospect_contact_admin_outbound__pid__log_post","parameters":[{"name":"pid","in":"path","required":true,"schema":{"type":"integer","title":"Pid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/outbound/pause":{"post":{"tags":["admin"],"summary":"Pause","operationId":"pause_admin_outbound_pause_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PauseBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/outbound/resume":{"post":{"tags":["admin"],"summary":"Resume","operationId":"resume_admin_outbound_resume_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PauseBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/outbound/pool/{address}/{act}":{"post":{"tags":["admin"],"summary":"Pool Mailbox","description":"Pause or resume one pool mailbox. The reply reader pauses a mailbox whose\nbounces pass the line; only a person resumes it, with a reason.","operationId":"pool_mailbox_admin_outbound_pool__address___act__post","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string","title":"Address"}},{"name":"act","in":"path","required":true,"schema":{"type":"string","title":"Act"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PoolMailboxBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/leads/{lead_id}/send":{"post":{"tags":["admin"],"summary":"Send To Lead","operationId":"send_to_lead_admin_leads__lead_id__send_post","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"integer","title":"Lead Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/leads/{lead_id}/log":{"post":{"tags":["admin"],"summary":"Log Lead Contact","operationId":"log_lead_contact_admin_leads__lead_id__log_post","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"integer","title":"Lead Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/leads/{lead_id}":{"patch":{"tags":["admin"],"summary":"Update Lead","description":"Who owns an enquiry, where it stands and what happens next. Only our\nown enquiries: a customer's captured leads are theirs, never ours to edit.","operationId":"update_lead_admin_leads__lead_id__patch","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"integer","title":"Lead Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/facts":{"get":{"tags":["admin"],"summary":"Facts","description":"What the team may say, read from the code on every call.","operationId":"facts_admin_facts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/assist/check":{"post":{"tags":["admin"],"summary":"Check Message","description":"Check a draft before it goes to a real person. Nothing is sent from here.","operationId":"check_message_admin_assist_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/trials/by-domain":{"get":{"tags":["admin"],"summary":"Trials By Domain","description":"One IST week, Monday to Sunday: `week` is its Monday (YYYY-MM-DD);\nby default the last complete one.","operationId":"trials_by_domain_admin_trials_by_domain_get","parameters":[{"name":"week","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Week"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/support/orgs":{"get":{"tags":["admin"],"summary":"Support List","description":"Every customer workspace, cut to what a support answer needs.","operationId":"support_list_admin_support_orgs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/support/orgs/{org_id}":{"get":{"tags":["admin"],"summary":"Support Page","operationId":"support_page_admin_support_orgs__org_id__get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/support/orgs/{org_id}/notes":{"post":{"tags":["admin"],"summary":"Support Note","description":"The same note the customer page writes, under the staff member's name.","operationId":"support_note_admin_support_orgs__org_id__notes_post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__admin_support__NoteBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/prospecting/sources":{"get":{"tags":["admin"],"summary":"Sources","operationId":"sources_admin_prospecting_sources_get","parameters":[{"name":"country","in":"query","required":false,"schema":{"type":"string","maxLength":2,"default":"US","title":"Country"}},{"name":"keyword","in":"query","required":false,"schema":{"type":"string","maxLength":80,"default":"","title":"Keyword"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/prospecting/site":{"get":{"tags":["admin"],"summary":"Check Site","description":"What one company's homepage shows, whether we already have them, and\nwhere to see their ads. One guarded read; nothing is stored.","operationId":"check_site_admin_prospecting_site_get","parameters":[{"name":"url","in":"query","required":false,"schema":{"type":"string","maxLength":300,"default":"","title":"Url"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/prospecting/prospects":{"post":{"tags":["admin"],"summary":"Add Prospect","description":"One prospect, found by a person, with the signal that brought us.","operationId":"add_prospect_admin_prospecting_prospects_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewProspect"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/notifications":{"get":{"tags":["org"],"summary":"Get Notifications","operationId":"get_notifications_org_notifications_get","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["org"],"summary":"Set Notification","operationId":"set_notification_org_notifications_patch","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Choice"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/verify/planner-models":{"get":{"tags":["public"],"summary":"Planner Models Here","description":"This API task's own planner models (app/ai/forced_tool.py), for the\nworker's planner_models verifier, which cannot read the API's env.\n\nCounts only: which calls and which env vars are in this task's ERROR log.\nAnswered from the boot read, so asking costs nothing. 503 when any call\nwould be refused, so a status-code monitor can page on it directly.","operationId":"planner_models_here_public_verify_planner_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/public/verify/health":{"get":{"tags":["public"],"summary":"Verify Health","operationId":"verify_health_public_verify_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/n/unsubscribe_task/{token}":{"get":{"tags":["notify"],"summary":" Unsubscribe Task","description":"Switch off one scheduled report.","operationId":"unsubscribe_task_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["notify"],"summary":" Unsubscribe Task","description":"Switch off one scheduled report.","operationId":"unsubscribe_task_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/n/snooze_alert/{token}":{"get":{"tags":["notify"],"summary":" Snooze Alert Route","description":"Stop emailing about one kind of alert on one account for 90 days.\n\nNever resolves the alert and never touches the account. The finding\nstays exactly where it was.","operationId":"snooze_alert_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["notify"],"summary":" Snooze Alert Route","description":"Stop emailing about one kind of alert on one account for 90 days.\n\nNever resolves the alert and never touches the account. The finding\nstays exactly where it was.","operationId":"snooze_alert_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/n/unsubscribe_notify/{token}":{"get":{"tags":["notify"],"summary":" Unsubscribe Notify","description":"Switch off one kind of email for one person, from its own link.","operationId":"unsubscribe_notify_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["notify"],"summary":" Unsubscribe Notify","description":"Switch off one kind of email for one person, from its own link.","operationId":"unsubscribe_notify_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/reports/{token}":{"get":{"tags":["reports"],"summary":"Read Public","description":"The shared link. No auth: the token is the credential.","operationId":"read_public_public_reports__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/.well-known/oauth-protected-resource":{"get":{"tags":["oauth-mcp"],"summary":"Protected Resource Metadata","operationId":"protected_resource_metadata__well_known_oauth_protected_resource_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/oauth-protected-resource/mcp":{"get":{"tags":["oauth-mcp"],"summary":"Protected Resource Metadata At Path","description":"The same document at the path-suffixed location.\n\nRFC 9728 tells a client with a resource URL of `https://host/mcp` to look\nat `https://host/.well-known/oauth-protected-resource/mcp`. Clients differ\non which they try, so both exist and say the same thing.","operationId":"protected_resource_metadata_at_path__well_known_oauth_protected_resource_mcp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/oauth-authorization-server":{"get":{"tags":["oauth-mcp"],"summary":"Authorization Server Metadata","operationId":"authorization_server_metadata__well_known_oauth_authorization_server_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/oauth-authorization-server/mcp":{"get":{"tags":["oauth-mcp"],"summary":"Authorization Server Metadata At Path","operationId":"authorization_server_metadata_at_path__well_known_oauth_authorization_server_mcp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/openai-apps-challenge":{"get":{"tags":["oauth-mcp"],"summary":"Openai Apps Challenge","description":"Prove to OpenAI's plugin portal that we own this host.\n\nThe portal issues a token and then fetches it back from here before it\nwill accept an MCP server URL. It is a public one-line string with no\nsecret in it — the point is only that whoever controls this domain could\nput it here.\n\n404 while unset, which is the honest answer before a token exists: an\nempty 200 would look like a host that verified and returned nothing.","operationId":"openai_apps_challenge__well_known_openai_apps_challenge_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/oauth/register":{"post":{"tags":["oauth-mcp"],"summary":"Register Client","description":"Let an assistant introduce itself.\n\nThis grants nothing. A row here is a name and a list of addresses a code\nmay be returned to; every authorization still goes through a person who is\nsigned in to Admiral and choosing an account. The reason to check anything\nat all is the redirect URIs, because those are the one field that can send\nsomebody else's code somewhere it should not go.\n\nRFC 7591 requires this to be open, and it is — but it was the only public\nendpoint in the app with no rate limit, and every accepted POST inserts a\nrow. \"Grants nothing\" is about authority, not about cost: an unbounded\nwriter against a table is still a way to fill a database. The limit is\ngenerous, because a real assistant registers once per deployment and a\ndeveloper testing an integration may legitimately do it a few dozen\ntimes in an afternoon.","operationId":"register_client_oauth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationBody"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/authorize":{"get":{"tags":["oauth-mcp"],"summary":"Authorize","description":"Check the request, then send the person to Admiral to decide.\n\nEverything that can be validated without knowing who the person is happens\nhere, because an error discovered now can be reported honestly. Once the\nrequest is known good it is handed to the web app's consent screen as\nopaque query parameters; the screen shows the client's name and the\naccounts this person actually has, and posts back a decision.\n\nA bad `redirect_uri` never redirects. That is the one error in OAuth that\nmust be shown rather than sent, since sending it is the attack.","operationId":"authorize_oauth_authorize_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/authorize/consent":{"post":{"tags":["oauth-mcp"],"summary":"Consent","description":"A signed-in person says yes, for one named ad account.\n\nCalled by the consent screen with the person's own Admiral session. The\naccount is checked against the orgs that person belongs to — a consent\nscreen is a form, and a form can be posted with any account id in it.","operationId":"consent_oauth_authorize_consent_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/token":{"post":{"tags":["oauth-mcp"],"summary":"Token","description":"Exchange a code for a token, or a refresh token for a fresh pair.\n\nForm-encoded, because that is what the specification says and what every\nclient sends.","operationId":"token_oauth_token_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/revoke":{"post":{"tags":["oauth-mcp"],"summary":"Revoke","description":"RFC 7009. Always 200, even for a token that was never ours.\n\nA revocation endpoint that distinguished \"revoked\" from \"no such token\"\nwould be an oracle for guessing tokens.","operationId":"revoke_oauth_revoke_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/consent-request":{"get":{"tags":["oauth-mcp"],"summary":"Consent Request","description":"The client's name, and the accounts this person could grant.\n\nThe consent screen must not take the assistant's word for who it is, and\nit must not show accounts the person cannot grant. Both answers come from\nhere rather than from the query string the assistant controls.","operationId":"consent_request_oauth_consent_request_get","parameters":[{"name":"client_id","in":"query","required":true,"schema":{"type":"string","title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AcceptBody":{"properties":{"token":{"type":"string","maxLength":128,"minLength":10,"title":"Token"}},"type":"object","required":["token"],"title":"AcceptBody"},"ActionBody":{"properties":{"key":{"type":"string","maxLength":64,"minLength":16,"pattern":"^[A-Za-z0-9_-]+$","title":"Key"},"action":{"type":"string","maxLength":20,"title":"Action"}},"type":"object","required":["key","action"],"title":"ActionBody"},"ActivateBody":{"properties":{"site_url":{"type":"string","title":"Site Url"}},"type":"object","required":["site_url"],"title":"ActivateBody"},"AdGroupStatusRequest":{"properties":{"status":{"type":"string","title":"Status"},"prev_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prev Status"}},"type":"object","required":["status"],"title":"AdGroupStatusRequest"},"AdStatusRequest":{"properties":{"resource_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Name"},"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"AdStatusRequest"},"AddKeywordsRequest":{"properties":{"ad_group_id":{"type":"string","title":"Ad Group Id"},"keywords":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Keywords"}},"type":"object","required":["ad_group_id","keywords"],"title":"AddKeywordsRequest"},"AdminAccountPatch":{"properties":{"voice_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Voice Enabled"},"voice_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Language"},"voice_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Provider"},"snapshot_frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snapshot Frequency"},"agent_reviews_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Agent Reviews Enabled"},"creative_gen_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Creative Gen Enabled"},"demand_gen_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Demand Gen Enabled"},"display_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Display Enabled"},"pmax_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pmax Enabled"},"video_campaign_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Video Campaign Enabled"},"shopping_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Shopping Enabled"},"search_console_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Search Console Enabled"},"holdouts_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Holdouts Enabled"},"clear_flags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Clear Flags"}},"type":"object","title":"AdminAccountPatch"},"AdvanceBody":{"properties":{"to":{"type":"string","enum":["summary","budget","plan","drafted","done"],"title":"To"}},"type":"object","required":["to"],"title":"AdvanceBody"},"AppendMessage":{"properties":{"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"}},"type":"object","required":["role","content"],"title":"AppendMessage"},"ApplyBody":{"properties":{"thread_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Thread Id"},"apply_over":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Apply Over"}},"type":"object","title":"ApplyBody"},"ApproveFollowup":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"subject":{"type":"string","maxLength":200,"minLength":1,"title":"Subject"},"body":{"type":"string","maxLength":10000,"minLength":1,"title":"Body"},"send_at":{"type":"string","format":"date-time","title":"Send At"}},"type":"object","required":["id","subject","body","send_at"],"title":"ApproveFollowup"},"AssumptionsBody":{"properties":{"conversion_rate":{"type":"number","maximum":50.0,"exclusiveMinimum":0.0,"title":"Conversion Rate","description":"Percent of clicks that become leads"}},"type":"object","required":["conversion_rate"],"title":"AssumptionsBody"},"BindDraftBody":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"}},"type":"object","required":["account_id"],"title":"BindDraftBody"},"BudgetBody":{"properties":{"band":{"type":"string","enum":["under_3k","3k_10k","10k_50k"],"title":"Band"},"channel":{"type":"string","enum":["google","meta"],"title":"Channel","default":"google"}},"type":"object","required":["band"],"title":"BudgetBody"},"BudgetRequest":{"properties":{"amount_micros":{"type":"integer","title":"Amount Micros"}},"type":"object","required":["amount_micros"],"title":"BudgetRequest"},"BusinessFields":{"properties":{"name":{"type":"string","maxLength":120,"title":"Name","default":""},"description":{"type":"string","maxLength":5000,"title":"Description","default":""},"website":{"type":"string","maxLength":500,"title":"Website","default":""},"business_type":{"type":"string","enum":["","individual","smb","enterprise"],"title":"Business Type","default":""},"selling_model":{"type":"string","enum":["","d2c","b2b","b2c","mixed"],"title":"Selling Model","default":""},"offerings":{"type":"string","maxLength":2000,"title":"Offerings","default":""},"audience":{"type":"string","maxLength":2000,"title":"Audience","default":""},"countries":{"items":{"type":"string","pattern":"^[A-Z]{2}$"},"type":"array","maxItems":250,"title":"Countries"},"goal":{"type":"string","maxLength":1000,"title":"Goal","default":""}},"additionalProperties":false,"type":"object","title":"BusinessFields"},"CSVImport":{"properties":{"csv":{"type":"string","maxLength":250000,"minLength":1,"title":"Csv"}},"type":"object","required":["csv"],"title":"CSVImport"},"CallbackCheckBody":{"properties":{"phone":{"type":"string","maxLength":40,"title":"Phone"},"code":{"type":"string","maxLength":12,"title":"Code"}},"type":"object","required":["phone","code"],"title":"CallbackCheckBody"},"CallbackCodeBody":{"properties":{"phone":{"type":"string","maxLength":40,"title":"Phone"}},"type":"object","required":["phone"],"title":"CallbackCodeBody"},"CampaignRef":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"campaign_external_id":{"type":"string","title":"Campaign External Id"}},"type":"object","required":["account_id","campaign_external_id"],"title":"CampaignRef"},"CancelBody":{"properties":{"reason":{"anyOf":[{"type":"string","pattern":"^(too_expensive|no_time|no_results|missing|other_tool|other)$"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"CancelBody"},"ChatBody":{"properties":{"message":{"type":"string","maxLength":500,"minLength":1,"title":"Message"},"history":{"items":{"$ref":"#/components/schemas/ChatTurn"},"type":"array","maxItems":6,"title":"History"}},"type":"object","required":["message"],"title":"ChatBody"},"ChatRequest":{"properties":{"messages":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Messages"},"thread_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Thread Id"},"stream":{"type":"string","enum":["events","ui-message-v1"],"title":"Stream","default":"events"}},"type":"object","required":["messages"],"title":"ChatRequest"},"ChatTurn":{"properties":{"role":{"type":"string","pattern":"^(user|assistant)$","title":"Role"},"content":{"type":"string","maxLength":500,"title":"Content"}},"type":"object","required":["role","content"],"title":"ChatTurn"},"CheckBody":{"properties":{"channel":{"type":"string","pattern":"^(linkedin_note|linkedin_message|email_cold|email_reply)$","title":"Channel"},"text":{"type":"string","maxLength":8000,"minLength":1,"title":"Text"},"first_message":{"type":"boolean","title":"First Message","default":true},"about_recipient":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"About Recipient"}},"type":"object","required":["channel","text"],"title":"CheckBody"},"CheckoutBody":{"properties":{"tier":{"type":"string","pattern":"^(business|max)$","title":"Tier"},"band":{"anyOf":[{"type":"string","pattern":"^(under_3k|3k_10k|10k_50k|over_50k)$"},{"type":"null"}],"title":"Band"},"currency":{"anyOf":[{"type":"string","pattern":"^USD$"},{"type":"null"}],"title":"Currency"}},"type":"object","required":["tier"],"title":"CheckoutBody"},"Choice":{"properties":{"kind":{"type":"string","enum":["decisions","funds_low"],"title":"Kind"},"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["kind","enabled"],"title":"Choice"},"ClaimBody":{"properties":{"draft_id":{"type":"string","format":"uuid","title":"Draft Id"}},"type":"object","required":["draft_id"],"title":"ClaimBody"},"CompanyImport":{"properties":{"version":{"type":"integer","minimum":0.0,"title":"Version"},"company":{"$ref":"#/components/schemas/CompanyRead"}},"additionalProperties":false,"type":"object","required":["version","company"],"title":"CompanyImport"},"CompanyRead":{"properties":{"url":{"type":"string","maxLength":500,"title":"Url"},"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"description":{"type":"string","maxLength":5000,"title":"Description","default":""},"website":{"type":"string","maxLength":500,"title":"Website","default":""},"industry":{"type":"string","maxLength":200,"title":"Industry","default":""},"specialties":{"items":{"type":"string"},"type":"array","maxItems":30,"title":"Specialties"},"headquarters":{"type":"string","maxLength":300,"title":"Headquarters","default":""},"size":{"type":"string","maxLength":80,"title":"Size","default":""}},"additionalProperties":false,"type":"object","required":["url","name"],"title":"CompanyRead"},"CompetitorsBody":{"properties":{"urls":{"items":{"type":"string"},"type":"array","maxItems":2,"title":"Urls"}},"type":"object","required":["urls"],"title":"CompetitorsBody"},"ConfirmBody":{"properties":{"search_terms":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":20},{"type":"null"}],"title":"Search Terms"}},"type":"object","title":"ConfirmBody","description":"The searches the customer kept, edited or added on the searches step.\nAbsent means Admiral's own list, as before the step existed."},"ConfirmResolved":{"properties":{"outcome":{"type":"string","title":"Outcome"},"mutation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mutation Id"}},"type":"object","required":["outcome"],"title":"ConfirmResolved"},"ConnectCRM":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"owner_user_id":{"type":"string","format":"uuid","title":"Owner User Id"},"export_new_leads":{"type":"boolean","title":"Export New Leads","default":false},"currency":{"type":"string","pattern":"^[A-Z]{3}$","title":"Currency"}},"type":"object","required":["account_id","owner_user_id","currency"],"title":"ConnectCRM"},"ConnectMccRequest":{"properties":{"customer_id":{"type":"string","title":"Customer Id"},"name":{"type":"string","title":"Name","default":""}},"type":"object","required":["customer_id"],"title":"ConnectMccRequest"},"ConsentBody":{"properties":{"client_id":{"type":"string","title":"Client Id"},"redirect_uri":{"type":"string","title":"Redirect Uri"},"code_challenge":{"type":"string","title":"Code Challenge"},"account_id":{"type":"string","format":"uuid","title":"Account Id"},"state":{"type":"string","title":"State","default":""},"resource":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource"},"scope":{"type":"string","title":"Scope","default":"admiral:account"}},"type":"object","required":["client_id","redirect_uri","code_challenge","account_id"],"title":"ConsentBody"},"CorrectionBody":{"properties":{"field":{"type":"string","enum":["name","segment","customer_value","offer","location","audience"],"title":"Field"},"op":{"type":"string","enum":["set","remove"],"title":"Op","default":"set"},"key":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Key"},"value":{"title":"Value"}},"type":"object","required":["field"],"title":"CorrectionBody"},"CreateAdGroupRequest":{"properties":{"campaign_id":{"type":"string","title":"Campaign Id"},"name":{"type":"string","title":"Name"},"cpc_bid_micros":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cpc Bid Micros"}},"type":"object","required":["campaign_id","name"],"title":"CreateAdGroupRequest"},"CreateDraftRequest":{"properties":{"url":{"type":"string","title":"Url"},"goal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Goal"},"daily_budget_micros":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Daily Budget Micros"},"products":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Products"},"campaign_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Type"}},"type":"object","required":["url"],"title":"CreateDraftRequest"},"CreateRsaRequest":{"properties":{"ad_group_id":{"type":"string","title":"Ad Group Id"},"headlines":{"items":{"type":"string"},"type":"array","title":"Headlines"},"descriptions":{"items":{"type":"string"},"type":"array","title":"Descriptions"},"final_url":{"type":"string","title":"Final Url"},"path1":{"type":"string","title":"Path1","default":""},"path2":{"type":"string","title":"Path2","default":""},"replace_resource_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Replace Resource Name"}},"type":"object","required":["ad_group_id","headlines","descriptions","final_url"],"title":"CreateRsaRequest"},"CreateThread":{"properties":{"title":{"type":"string","title":"Title","default":"New chat"}},"type":"object","title":"CreateThread"},"CreditReviewBody":{"properties":{"release_credits":{"type":"boolean","title":"Release Credits","default":false},"actual_cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Actual Cost Usd"},"evidence":{"type":"string","title":"Evidence"}},"type":"object","required":["evidence"],"title":"CreditReviewBody"},"Decision":{"properties":{"key":{"type":"string","title":"Key"},"plan":{"type":"string","title":"Plan","default":""},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["key"],"title":"Decision"},"DeleteWorkspaceBody":{"properties":{"confirm":{"type":"string","maxLength":40,"title":"Confirm"},"reason":{"anyOf":[{"type":"string","pattern":"^(too_expensive|no_time|no_results|missing|other_tool|other)$"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["confirm"],"title":"DeleteWorkspaceBody"},"DemandCheckRequest":{"properties":{"url":{"type":"string","title":"Url"},"daily_budget_micros":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Daily Budget Micros"},"geo_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Geo Ids"},"language_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Language Id"}},"type":"object","required":["url"],"title":"DemandCheckRequest"},"DraftBody":{"properties":{"read_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Read Id"},"website":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Website"},"description":{"anyOf":[{"type":"string","maxLength":600},{"type":"null"}],"title":"Description"},"goal":{"type":"string","maxLength":120,"title":"Goal"},"goal_key":{"type":"string","maxLength":20,"title":"Goal Key","default":"other"},"budget_key":{"type":"string","maxLength":20,"title":"Budget Key"},"area":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Area"},"offers":{"items":{"type":"string"},"type":"array","maxItems":12,"title":"Offers"}},"type":"object","required":["goal","budget_key"],"title":"DraftBody"},"ExchangeRateBody":{"properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$","title":"Currency"},"units_per_usd":{"type":"number","maximum":1000000.0,"exclusiveMinimum":0.0,"title":"Units Per Usd"}},"type":"object","required":["currency","units_per_usd"],"title":"ExchangeRateBody"},"ExecuteActionRequest":{"properties":{"action":{"type":"string","title":"Action"},"args":{"additionalProperties":true,"type":"object","title":"Args"},"thread_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Thread Id"},"expected":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Expected"}},"type":"object","required":["action","args"],"title":"ExecuteActionRequest"},"ExperimentCreate":{"properties":{"pair_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Pair Id"},"a":{"anyOf":[{"$ref":"#/components/schemas/CampaignRef"},{"type":"null"}]},"b":{"anyOf":[{"$ref":"#/components/schemas/CampaignRef"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"min_days":{"type":"integer","title":"Min Days","default":7},"min_conversions":{"type":"integer","title":"Min Conversions","default":30},"max_days":{"type":"integer","title":"Max Days","default":30},"concept":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Concept"}},"type":"object","title":"ExperimentCreate","description":"Start a test on an existing link (`pair_id`), or on any two\ncampaigns (`a` and `b`): the link between them is found or made."},"FeedbackBody":{"properties":{"response":{"type":"string","maxLength":4000,"minLength":1,"title":"Response"},"question":{"type":"string","maxLength":500,"title":"Question","default":""},"survey_name":{"type":"string","maxLength":200,"title":"Survey Name","default":""},"path":{"type":"string","maxLength":200,"title":"Path","default":""}},"type":"object","required":["response"],"title":"FeedbackBody","description":"What the card knows. Every field is display text, never markup —\n`question` comes down from PostHog's remote config, which permits raw\nHTML, and the composer below puts both into a plain-text body."},"FrequencyRequest":{"properties":{"frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Frequency"},"tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier"}},"type":"object","title":"FrequencyRequest"},"GenerateCreativeImageRequest":{"properties":{"request_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Key"},"draft_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Draft Id"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"aspect_ratio":{"type":"string","title":"Aspect Ratio","default":"1:1"},"n":{"type":"integer","title":"N","default":3},"reference_media_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Reference Media Ids"},"image_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Provider"},"image_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Model"}},"type":"object","title":"GenerateCreativeImageRequest"},"GenerateVideoRequest":{"properties":{"request_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Key"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seconds"},"size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Size"},"engine":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Engine"},"reference_media_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Reference Media Ids"},"draft_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Draft Id"},"template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template"},"headline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Headline"},"subpoints":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Subpoints"},"stat_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stat Value"},"stat_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stat Label"},"stat_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stat Prefix"},"stat_suffix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stat Suffix"},"heading":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Heading"},"button_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Button Text"},"cta_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cta Url"},"subtext":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtext"}},"type":"object","title":"GenerateVideoRequest"},"GithubBody":{"properties":{"repo":{"type":"string","title":"Repo"},"token":{"type":"string","title":"Token"},"site_url":{"type":"string","title":"Site Url","default":""}},"type":"object","required":["repo","token"],"title":"GithubBody"},"GuardrailsPatch":{"properties":{"max_auto_actions_per_day":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Auto Actions Per Day"},"quiet_mode":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Quiet Mode"}},"type":"object","title":"GuardrailsPatch"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthBody":{"properties":{"health_mode":{"type":"boolean","title":"Health Mode"},"excluded_paths":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Excluded Paths"}},"type":"object","required":["health_mode"],"title":"HealthBody"},"HeardBody":{"properties":{"answer":{"type":"string","maxLength":200,"minLength":1,"title":"Answer"}},"type":"object","required":["answer"],"title":"HeardBody"},"HoldoutCreate":{"properties":{"campaign_id":{"type":"string","title":"Campaign Id"},"manual_share":{"type":"integer","maximum":20.0,"minimum":5.0,"title":"Manual Share","default":10}},"type":"object","required":["campaign_id"],"title":"HoldoutCreate"},"HostingerBody":{"properties":{"site_url":{"type":"string","title":"Site Url","default":""},"host":{"type":"string","title":"Host","default":""},"username":{"type":"string","title":"Username","default":""},"password":{"type":"string","title":"Password","default":""},"port":{"type":"integer","title":"Port","default":21},"allow_plaintext":{"type":"boolean","title":"Allow Plaintext","default":false},"remote_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remote Path"}},"type":"object","title":"HostingerBody","description":"Every field has a default and nothing is validated by pydantic.\n\nThat is deliberate: pydantic sets a `missing` error's `input` to the\nPARENT object, and FastAPI serializes `exc.errors()` into the 422 body —\nso one absent field would hand the customer's FTP password back out in a\nresponse that proxies and error trackers routinely capture. We validate\nbelow instead, and answer with a sentence."},"HubSpotConnect":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"owner_user_id":{"type":"string","format":"uuid","title":"Owner User Id"},"export_new_leads":{"type":"boolean","title":"Export New Leads","default":false},"token":{"type":"string","format":"password","title":"Token","writeOnly":true},"currency":{"type":"string","pattern":"^[A-Z]{3}$","title":"Currency"}},"type":"object","required":["account_id","owner_user_id","token","currency"],"title":"HubSpotConnect"},"HubSpotOAuthConnect":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"owner_user_id":{"type":"string","format":"uuid","title":"Owner User Id"},"export_new_leads":{"type":"boolean","title":"Export New Leads","default":false},"client_id":{"type":"string","format":"password","title":"Client Id","writeOnly":true},"client_secret":{"type":"string","format":"password","title":"Client Secret","writeOnly":true},"refresh_token":{"type":"string","format":"password","title":"Refresh Token","writeOnly":true},"currency":{"type":"string","pattern":"^[A-Z]{3}$","title":"Currency"}},"type":"object","required":["account_id","owner_user_id","client_id","client_secret","refresh_token","currency"],"title":"HubSpotOAuthConnect"},"ImportBody":{"properties":{"run":{"type":"string","maxLength":120,"minLength":1,"title":"Run"},"csv":{"type":"string","maxLength":2000000,"minLength":1,"title":"Csv"}},"type":"object","required":["run","csv"],"title":"ImportBody"},"ImportLead":{"properties":{"email":{"type":"string","maxLength":254,"title":"Email"},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"company":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Company"},"utm_campaign":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Utm Campaign"},"utm_source":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Utm Source"}},"type":"object","required":["email"],"title":"ImportLead"},"ImportMessage":{"properties":{"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"},"steps":{"items":{"type":"string"},"type":"array","title":"Steps"},"error":{"type":"boolean","title":"Error","default":false}},"type":"object","required":["role","content"],"title":"ImportMessage"},"ImportRequest":{"properties":{"threads":{"items":{"$ref":"#/components/schemas/ImportThread"},"type":"array","title":"Threads"}},"type":"object","required":["threads"],"title":"ImportRequest"},"ImportThread":{"properties":{"title":{"type":"string","title":"Title","default":"Imported chat"},"messages":{"items":{"$ref":"#/components/schemas/ImportMessage"},"type":"array","title":"Messages"}},"type":"object","title":"ImportThread"},"InstallBody":{"properties":{"connection_id":{"type":"string","format":"uuid","title":"Connection Id"},"conversion_id":{"type":"string","title":"Conversion Id"},"conversion_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversion Label"}},"type":"object","required":["connection_id","conversion_id"],"title":"InstallBody"},"InviteBody":{"properties":{"email":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}],"title":"Email"},"role":{"type":"string","pattern":"^(owner|member)$","title":"Role","default":"member"}},"type":"object","title":"InviteBody"},"KeepBody":{"properties":{"draft_id":{"type":"string","format":"uuid","title":"Draft Id"},"email":{"type":"string","maxLength":320,"title":"Email"}},"type":"object","required":["draft_id","email"],"title":"KeepBody"},"KeywordBidRequest":{"properties":{"ad_group_id":{"type":"string","title":"Ad Group Id"},"cpc_bid_micros":{"type":"integer","title":"Cpc Bid Micros"},"prev_cpc_bid_micros":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Prev Cpc Bid Micros"}},"type":"object","required":["ad_group_id","cpc_bid_micros"],"title":"KeywordBidRequest"},"KeywordStatusRequest":{"properties":{"ad_group_id":{"type":"string","title":"Ad Group Id"},"status":{"type":"string","title":"Status"},"prev_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prev Status"}},"type":"object","required":["ad_group_id","status"],"title":"KeywordStatusRequest"},"LandingCheckBody":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"LandingCheckBody"},"LandingPageBody":{"properties":{"term":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Term"}},"type":"object","title":"LandingPageBody"},"LeadContact":{"properties":{"email":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Phone"},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"company":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Company"}},"type":"object","title":"LeadContact"},"LeadImport":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/ImportLead"},"type":"array","maxItems":500,"minItems":1,"title":"Rows"}},"type":"object","required":["rows"],"title":"LeadImport"},"LeadOutcome":{"properties":{"status":{"type":"string","enum":["new","contacted","qualified","won","lost"],"title":"Status","default":"new"},"owner_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner User Id"},"next_action":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Next Action"},"next_action_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Action At"},"revenue_minor":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Revenue Minor"},"revenue_currency":{"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}],"title":"Revenue Currency"},"outcome_note":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Outcome Note"}},"type":"object","title":"LeadOutcome"},"LeadPatch":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"assignee_email":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Assignee Email"},"next_action":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Next Action"},"next_action_at":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Next Action At"},"outcome_note":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Outcome Note"}},"type":"object","title":"LeadPatch"},"LinkMerchantRequest":{"properties":{"merchant_id":{"type":"string","title":"Merchant Id"},"feed_label":{"type":"string","title":"Feed Label","default":""},"content_language":{"type":"string","title":"Content Language","default":"en"}},"type":"object","required":["merchant_id"],"title":"LinkMerchantRequest"},"LogBody":{"properties":{"channel":{"type":"string","pattern":"^(call|whatsapp|email|linkedin)$","title":"Channel"},"outcome":{"type":"string","maxLength":2000,"minLength":2,"title":"Outcome"},"request_key":{"type":"string","maxLength":100,"minLength":8,"title":"Request Key"}},"type":"object","required":["channel","outcome","request_key"],"title":"LogBody"},"ManualRunRequest":{"properties":{"focus":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Focus"}},"type":"object","title":"ManualRunRequest"},"MetaConnect":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"owner_user_id":{"type":"string","format":"uuid","title":"Owner User Id"},"export_new_leads":{"type":"boolean","title":"Export New Leads","default":false},"page_id":{"type":"string","pattern":"^\\d{1,40}$","title":"Page Id"},"form_id":{"type":"string","pattern":"^\\d{1,40}$","title":"Form Id"}},"type":"object","required":["account_id","owner_user_id","page_id","form_id"],"title":"MetaConnect"},"MintBody":{"properties":{"name":{"type":"string","maxLength":60,"title":"Name","default":"My assistant"}},"type":"object","title":"MintBody"},"NegativesRequest":{"properties":{"campaign_id":{"type":"string","title":"Campaign Id"},"terms":{"items":{"type":"string"},"type":"array","title":"Terms"},"match_type":{"type":"string","title":"Match Type","default":"EXACT"}},"type":"object","required":["campaign_id","terms"],"title":"NegativesRequest"},"NewConversionBody":{"properties":{"name":{"type":"string","title":"Name"},"category":{"type":"string","title":"Category"}},"type":"object","required":["name","category"],"title":"NewConversionBody"},"NewProspect":{"properties":{"company":{"type":"string","maxLength":200,"minLength":2,"title":"Company"},"website":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Website"},"person_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Person Name"},"role":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Role"},"email":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}],"title":"Email"},"linkedin_url":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Linkedin Url"},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Phone"},"country":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Country"},"signal":{"type":"string","maxLength":1000,"minLength":10,"title":"Signal"},"signal_at":{"type":"string","format":"date","title":"Signal At"},"lane":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lane"},"assignee_email":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Assignee Email"},"owed_now":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Owed Now"},"next_action":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Next Action"},"next_action_at":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Next Action At"},"note":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Note"}},"type":"object","required":["company","signal","signal_at"],"title":"NewProspect"},"OfferBody":{"properties":{"offer":{"type":"string","pattern":"^(extend_trial|discount)$","title":"Offer"},"intent":{"type":"string","pattern":"^(cancel|delete)$","title":"Intent","default":"cancel"},"reason":{"anyOf":[{"type":"string","pattern":"^(too_expensive|no_time|no_results|missing|other_tool|other)$"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["offer"],"title":"OfferBody"},"PairActionRequest":{"properties":{"action":{"type":"string","title":"Action"},"amount_micros":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount Micros"},"idempotency_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency Key"}},"type":"object","required":["action"],"title":"PairActionRequest"},"PairCreate":{"properties":{"a":{"$ref":"#/components/schemas/PairSide"},"b":{"$ref":"#/components/schemas/PairSide"}},"type":"object","required":["a","b"],"title":"PairCreate"},"PairSide":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"campaign_external_id":{"type":"string","title":"Campaign External Id"}},"type":"object","required":["account_id","campaign_external_id"],"title":"PairSide"},"ParseProductsRequest":{"properties":{"csv":{"type":"string","title":"Csv"}},"type":"object","required":["csv"],"title":"ParseProductsRequest"},"PatchDraftRequest":{"properties":{"plan":{"additionalProperties":true,"type":"object","title":"Plan"}},"type":"object","required":["plan"],"title":"PatchDraftRequest"},"PauseBody":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"PauseBody"},"PoolMailboxBody":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"PoolMailboxBody"},"PostureBody":{"properties":{"posture":{"type":"string","pattern":"^(ask|safe)$","title":"Posture"}},"type":"object","required":["posture"],"title":"PostureBody"},"PresenceRequest":{"properties":{"campaign_id":{"type":"string","title":"Campaign Id"},"prev_positive_geo_target_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prev Positive Geo Target Type"}},"type":"object","required":["campaign_id"],"title":"PresenceRequest","description":"`prev` is what the campaign is set to now, so History can put it back.\nOptional: an older snapshot may not carry it, and a fix that cannot name\nthe previous value is still better than a fix nobody can make."},"ProfileWrite":{"properties":{"version":{"type":"integer","minimum":0.0,"title":"Version"},"fields":{"$ref":"#/components/schemas/BusinessFields"},"step":{"type":"string","enum":["about","audience","review"],"title":"Step","default":"about"},"confirm":{"type":"boolean","title":"Confirm","default":false}},"additionalProperties":false,"type":"object","required":["version"],"title":"ProfileWrite"},"ProspectPatch":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"note":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Note"},"whatsapp_opt_in":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Whatsapp Opt In"},"draft_subject":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Draft Subject"},"draft_body":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}],"title":"Draft Body"},"lane":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lane"},"linkedin_url":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Linkedin Url"},"assignee_email":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Assignee Email"},"owed_now":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Owed Now"},"next_action":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Next Action"},"next_action_at":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Next Action At"}},"type":"object","title":"ProspectPatch"},"PublicLeadBody":{"properties":{"email":{"type":"string","maxLength":320,"title":"Email"},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"company":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Company"},"website":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Website"},"message":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Message"},"monthly_spend":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Monthly Spend"},"platforms":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Platforms"},"source":{"type":"string","maxLength":20,"title":"Source","default":"talk"},"click":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Click"},"analytics_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Analytics Id"},"company_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Company Url"},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Phone"},"callback_consent_version":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Callback Consent Version"},"callback_number_proof":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Callback Number Proof"},"time_zone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Time Zone"}},"type":"object","required":["email"],"title":"PublicLeadBody"},"PublishRequest":{"properties":{"page_id":{"type":"string","title":"Page Id"}},"type":"object","required":["page_id"],"title":"PublishRequest"},"ReadBody":{"properties":{"website":{"type":"string","maxLength":500,"title":"Website"}},"type":"object","required":["website"],"title":"ReadBody"},"ReasonBody":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"ReasonBody"},"RegistrationBody":{"properties":{"redirect_uris":{"items":{"type":"string"},"type":"array","maxItems":10,"minItems":1,"title":"Redirect Uris"},"client_name":{"type":"string","maxLength":120,"title":"Client Name","default":"An assistant"},"client_uri":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Client Uri"},"software_id":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Software Id"},"grant_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Grant Types"},"token_endpoint_auth_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Endpoint Auth Method"}},"type":"object","required":["redirect_uris"],"title":"RegistrationBody"},"RenameBody":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"RenameBody"},"ReportBody":{"properties":{"period_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period Start"},"period_end":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period End"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"agency_name":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Agency Name"},"accent":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}],"title":"Accent"},"footer_note":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Footer Note"}},"type":"object","title":"ReportBody"},"ResearchCountryBody":{"properties":{"country":{"type":"string","pattern":"^[A-Z]{2}$","title":"Country"}},"type":"object","required":["country"],"title":"ResearchCountryBody"},"ResetBody":{"properties":{"version":{"type":"integer","title":"Version"}},"additionalProperties":false,"type":"object","required":["version"],"title":"ResetBody"},"RulePatch":{"properties":{"params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Params"},"mode":{"anyOf":[{"type":"string","pattern":"^(propose|auto)$"},{"type":"null"}],"title":"Mode"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"}},"type":"object","title":"RulePatch"},"SalesforceConnect":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"owner_user_id":{"type":"string","format":"uuid","title":"Owner User Id"},"export_new_leads":{"type":"boolean","title":"Export New Leads","default":false},"instance_url":{"type":"string","maxLength":250,"title":"Instance Url"},"client_id":{"type":"string","format":"password","title":"Client Id","writeOnly":true},"client_secret":{"type":"string","format":"password","title":"Client Secret","writeOnly":true},"currency":{"type":"string","pattern":"^[A-Z]{3}$","title":"Currency"}},"type":"object","required":["account_id","owner_user_id","instance_url","client_id","client_secret","currency"],"title":"SalesforceConnect"},"ScanBody":{"properties":{"key":{"type":"string","maxLength":64,"minLength":16,"pattern":"^[A-Za-z0-9_-]+$","title":"Key"},"code":{"type":"string","maxLength":40,"title":"Code","default":"card"},"campaign":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Campaign"},"visitor":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Visitor"},"lang":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Lang"},"tz":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Tz"},"screen":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Screen"},"referrer":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Referrer"}},"type":"object","required":["key"],"title":"ScanBody"},"ScanWrite":{"properties":{"version":{"type":"integer","minimum":0.0,"title":"Version"},"fill_missing":{"type":"boolean","title":"Fill Missing","default":false},"whole_site":{"type":"boolean","title":"Whole Site","default":false},"scope":{"type":"string","enum":["business","all"],"title":"Scope","default":"business"},"finish":{"type":"boolean","title":"Finish","default":false}},"additionalProperties":false,"type":"object","required":["version"],"title":"ScanWrite"},"ScopeChange":{"properties":{"external_id":{"type":"string","title":"External Id"},"tracked":{"type":"boolean","title":"Tracked"}},"type":"object","required":["external_id","tracked"],"title":"ScopeChange"},"ScopeRequest":{"properties":{"changes":{"items":{"$ref":"#/components/schemas/ScopeChange"},"type":"array","title":"Changes"},"mark_reviewed":{"type":"boolean","title":"Mark Reviewed","default":false}},"type":"object","title":"ScopeRequest"},"SeenBody":{"properties":{"read_id":{"type":"string","format":"uuid","title":"Read Id"},"analytics_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Analytics Id"}},"type":"object","required":["read_id"],"title":"SeenBody"},"SegmentBody":{"properties":{"segment":{"type":"string","enum":["local_service","online_store","b2b","other"],"title":"Segment"}},"type":"object","required":["segment"],"title":"SegmentBody"},"SelectAccounts":{"properties":{"external_ids":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"External Ids"}},"type":"object","required":["external_ids"],"title":"SelectAccounts"},"SendBody":{"properties":{"subject":{"type":"string","maxLength":300,"minLength":1,"title":"Subject"},"body":{"type":"string","maxLength":20000,"minLength":1,"title":"Body"},"request_key":{"type":"string","maxLength":100,"minLength":8,"title":"Request Key"}},"type":"object","required":["subject","body","request_key"],"title":"SendBody"},"SignupBody":{"properties":{"provider":{"type":"string","maxLength":40,"title":"Provider","default":"unknown"},"click":{"additionalProperties":{"type":"string"},"type":"object","title":"Click"}},"type":"object","title":"SignupBody"},"SiteBody":{"properties":{"site_url":{"type":"string","title":"Site Url"}},"type":"object","required":["site_url"],"title":"SiteBody"},"SiteFixBody":{"properties":{"connection_id":{"type":"string","format":"uuid","title":"Connection Id"}},"type":"object","required":["connection_id"],"title":"SiteFixBody"},"SnoozeBody":{"properties":{"days":{"type":"integer","maximum":90.0,"minimum":0.0,"title":"Days"}},"type":"object","required":["days"],"title":"SnoozeBody","description":"`days` is one of SNOOZE_DAYS, or 0 to start emailing again.\n\nBounded by an allowlist rather than a range: the card offers three\nbuttons, and a free integer would let a caller ask for ten years, which\nis the \"snooze forever\" the product will not promise."},"SourcesBody":{"properties":{"website_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Website Url"},"customer_value":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Customer Value"},"no_website":{"type":"boolean","title":"No Website","default":false}},"type":"object","title":"SourcesBody"},"StatusRequest":{"properties":{"status":{"type":"string","title":"Status"},"prev_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prev Status"}},"type":"object","required":["status"],"title":"StatusRequest"},"SubscriptionPatch":{"properties":{"tier":{"anyOf":[{"type":"string","pattern":"^(business|max)$"},{"type":"null"}],"title":"Tier"},"status":{"anyOf":[{"type":"string","pattern":"^(trialing|active|past_due|cancelled|comped)$"},{"type":"null"}],"title":"Status"},"band":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Band"},"seats":{"anyOf":[{"type":"integer","maximum":1000.0,"minimum":1.0},{"type":"null"}],"title":"Seats"},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note"},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At"},"reason":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Reason"}},"type":"object","title":"SubscriptionPatch","description":"Complimentary access, trial extensions, tier moves on unbilled plans,\nand cancellation: the things that used to need psql.\n\n`reason` is for us and is kept in the admin log. `note` is for the\ncustomer: the product shows it in Settings, so a comped workspace is\nnever a mystery to them either."},"TaskBody":{"properties":{"kind":{"type":"string","pattern":"^(leak_digest|weekly_report|pacing|monthly_report)$","title":"Kind"},"cadence":{"type":"string","pattern":"^(weekly|monthly)$","title":"Cadence","default":"weekly"},"day":{"type":"integer","maximum":28.0,"minimum":0.0,"title":"Day","default":0},"hour_utc":{"type":"integer","maximum":23.0,"minimum":0.0,"title":"Hour Utc","default":3},"recipients":{"items":{"type":"string"},"type":"array","maxItems":5,"minItems":1,"title":"Recipients"}},"type":"object","required":["kind","recipients"],"title":"TaskBody"},"TogglePatch":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"TogglePatch"},"TopupBody":{"properties":{"pack":{"type":"string","pattern":"^(pack_100|pack_300|pack_1000)$","title":"Pack"}},"type":"object","required":["pack"],"title":"TopupBody"},"TriggersBody":{"properties":{"thank_you_paths":{"items":{"type":"string"},"type":"array","title":"Thank You Paths","default":[]},"track_tel":{"type":"boolean","title":"Track Tel","default":false},"track_whatsapp":{"type":"boolean","title":"Track Whatsapp","default":false},"track_cf7":{"type":"boolean","title":"Track Cf7","default":false}},"type":"object","title":"TriggersBody"},"UnlockBody":{"properties":{"read_id":{"type":"string","format":"uuid","title":"Read Id"},"email":{"type":"string","maxLength":320,"title":"Email"},"click":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Click"},"analytics_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Analytics Id"},"company_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Company Url"}},"type":"object","required":["read_id","email"],"title":"UnlockBody"},"UploadReferenceRequest":{"properties":{"data":{"type":"string","title":"Data"},"content_type":{"type":"string","title":"Content Type"}},"type":"object","required":["data","content_type"],"title":"UploadReferenceRequest"},"UploadVideoRequest":{"properties":{"video_media_id":{"type":"string","title":"Video Media Id"}},"type":"object","required":["video_media_id"],"title":"UploadVideoRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VoiceSettingsRequest":{"properties":{"voice_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Voice Enabled"},"voice_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Provider"},"voice_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Language"}},"type":"object","title":"VoiceSettingsRequest"},"app__routers__admin_customers__NoteBody":{"properties":{"text":{"type":"string","maxLength":2000,"minLength":3,"title":"Text"}},"type":"object","required":["text"],"title":"NoteBody"},"app__routers__admin_support__NoteBody":{"properties":{"text":{"type":"string","maxLength":2000,"minLength":3,"title":"Text"}},"type":"object","required":["text"],"title":"NoteBody"},"app__routers__chat_memory__NoteBody":{"properties":{"path":{"type":"string","title":"Path"},"content":{"type":"string","title":"Content"}},"type":"object","required":["path","content"],"title":"NoteBody"}}}}