{"openapi":"3.1.0","info":{"title":"FreshlyCited REST API","version":"2.1.0","description":"Push pages and backlinks to Google, notify Bing and other IndexNow engines for verified sites, and check what search engines see. Every response is `{ ok: true, data }` or `{ ok: false, error: { code, message, request_id } }`. The MCP server at /mcp exposes the same features as tools.","contact":{"url":"https://freshlycited.com/docs"}},"servers":[{"url":"https://freshlycited.com/api/v1"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":[{"name":"Account","description":"Identity, profile, sessions and connected apps."},{"name":"Clients","description":"Your agency workspace, client workspaces and members."},{"name":"Settings","description":"Workspace and platform settings."},{"name":"Credits","description":"Balances, ledger, allocations and credit packs."},{"name":"Pushes","description":"Push links to Google (index jobs) and track them. Verified IndexNow hosts are also sent to Bing & co."},{"name":"Checks","description":"Visibility checks (index checks), stored search results, CSV exports and client reports."},{"name":"IndexNow","description":"Sites verified for IndexNow (Bing, Copilot, Yandex, Seznam, Naver, Yep) and what each push sent."},{"name":"API keys","description":"API keys and their per-key limits."},{"name":"Platform","description":"FreshlyCited platform administration."}],"externalDocs":{"description":"Docs hub","url":"https://freshlycited.com/docs"},"paths":{"/me":{"get":{"operationId":"get_me","summary":"Identity of the API key or session","tags":["Account"],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/mcp-tools":{"get":{"operationId":"get_mcp_tools","summary":"MCP tool catalog (names, descriptions, input schemas, examples)","tags":["Account"],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/routes":{"get":{"operationId":"get_routes","summary":"Every REST route","tags":["Account"],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pricing":{"get":{"operationId":"get_pricing","summary":"Credits, packs, plans, the credit-back guarantee and rate limits (USD)","tags":["Account"],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/tenants":{"get":{"operationId":"get_tenants","summary":"List your workspace and its clients (tree order)","tags":["Clients"],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["agency","team","client"]}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"list_tenants"},"post":{"operationId":"post_tenants","summary":"Create a client or team workspace","tags":["Clients"],"description":"Role admin or higher.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"kind":{"type":"string","enum":["team","client"]},"parent_id":{"description":"Workspace (tenant) id. Defaults to the workspace of the key or connection; use list_tenants to find client ids.","type":"string"},"notes":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"create_sub_tenant","x-required-role":"admin"}},"/tenants/{id}":{"get":{"operationId":"get_tenants_by_id","summary":"Get a workspace","tags":["Clients"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"get_tenant"},"patch":{"operationId":"patch_tenants_by_id","summary":"Update, move, archive or restore a workspace","tags":["Clients"],"description":"Role admin or higher.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"string","enum":["team","client"]},"notes":{"type":"string"},"default_recheck_days":{"type":"integer","minimum":0,"maximum":5},"parent_id":{"type":"string"},"archived":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"update_tenant","x-required-role":"admin"},"delete":{"operationId":"delete_tenants_by_id","summary":"Delete an empty workspace (confirm=<name>) or archive it (mode=archive)","tags":["Clients"],"description":"Role admin or higher.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"confirm","in":"query","required":false,"schema":{"type":"string"}},{"name":"mode","in":"query","required":false,"schema":{"type":"string","enum":["delete","archive"]}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"delete_tenant","x-required-role":"admin"}},"/tenants/{id}/members":{"get":{"operationId":"get_tenants_by_id_members","summary":"List a workspace's members","tags":["Clients"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"list_members"},"post":{"operationId":"post_tenants_by_id_members","summary":"Add or invite a member","tags":["Clients"],"description":"Role admin or higher.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member","client_viewer"]},"name":{"type":"string"}},"required":["email","role"]}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"add_member","x-required-role":"admin"}},"/tenants/{id}/members/{uid}":{"patch":{"operationId":"patch_tenants_by_id_members_by_uid","summary":"Change a member's role","tags":["Clients"],"description":"Role admin or higher.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"uid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["owner","admin","member","client_viewer"]}},"required":["role"]}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"update_member_role","x-required-role":"admin"},"delete":{"operationId":"delete_tenants_by_id_members_by_uid","summary":"Remove a member","tags":["Clients"],"description":"Role admin or higher.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"uid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"remove_member","x-required-role":"admin"}},"/members":{"get":{"operationId":"get_members","summary":"List members (of tenant_id, default yours)","tags":["Clients"],"parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"type":"string"},"description":"Limit to one workspace"}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"post_members","summary":"Add or invite a member","tags":["Clients"],"description":"Role admin or higher.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"tenant_id":{"description":"Workspace (tenant) id. Defaults to the workspace of the key or connection; use list_tenants to find client ids.","type":"string"},"role":{"type":"string","enum":["owner","admin","member","client_viewer"]},"name":{"type":"string"}},"required":["email","role"]}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"admin"}},"/settings/email":{"get":{"operationId":"get_settings_email","summary":"Email delivery settings","tags":["Settings"],"description":"Platform admin only.","responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"},"put":{"operationId":"put_settings_email","summary":"Update email delivery settings","tags":["Settings"],"description":"Platform admin only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/settings/email/test":{"post":{"operationId":"post_settings_email_test","summary":"Send a test email","tags":["Settings"],"description":"Platform admin only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string"}}}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/settings/email/templates":{"get":{"operationId":"get_settings_email_templates","summary":"Email templates","tags":["Settings"],"description":"Platform admin only.","responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/settings/email/templates/{name}":{"get":{"operationId":"get_settings_email_templates_by_name","summary":"Preview an email template","tags":["Settings"],"description":"Platform admin only.","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/settings/email/templates/{name}/send":{"post":{"operationId":"post_settings_email_templates_by_name_send","summary":"Send a template preview to yourself","tags":["Settings"],"description":"Platform admin only.","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string"}}}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/emails":{"get":{"operationId":"get_emails","summary":"Email log","tags":["Settings"],"description":"Role admin or higher.","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"string"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"template","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"admin"}},"/emails/{id}":{"get":{"operationId":"get_emails_by_id","summary":"One logged email","tags":["Settings"],"description":"Role admin or higher.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"admin"}},"/emails/{id}/resend":{"post":{"operationId":"post_emails_by_id_resend","summary":"Resend a logged email","tags":["Settings"],"description":"Role admin or higher.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"admin"}},"/tenants/{id}/notifications":{"get":{"operationId":"get_tenants_by_id_notifications","summary":"Notification settings of a workspace","tags":["Settings"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"patch_tenants_by_id_notifications","summary":"Update notification settings","tags":["Settings"],"description":"Role admin or higher.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"admin"}},"/tenants/{id}/digest":{"post":{"operationId":"post_tenants_by_id_digest","summary":"Send the daily digest now","tags":["Settings"],"description":"Role admin or higher.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string"},"skip_if_unchanged":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"admin"}},"/tenants/{id}/digest/preview":{"get":{"operationId":"get_tenants_by_id_digest_preview","summary":"Preview the daily digest","tags":["Settings"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/settings/integrations":{"get":{"operationId":"get_settings_integrations","summary":"Check engines, caps and spend","tags":["Settings"],"description":"Platform admin only.","responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"},"put":{"operationId":"put_settings_integrations","summary":"Update check engines and caps","tags":["Settings"],"description":"Platform admin only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/settings/integrations/{source}/test":{"post":{"operationId":"post_settings_integrations_by_source_test","summary":"Test a check engine","tags":["Settings"],"description":"Platform admin only.","parameters":[{"name":"source","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/settings/crawl":{"get":{"operationId":"get_settings_crawl","summary":"Crawl routes: status, circuit breaker, last errors, plan and allowance","tags":["Settings"],"description":"Platform admin only.","responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"},"put":{"operationId":"put_settings_crawl","summary":"Update crawl plan tier, cost, monthly allowance and failover thresholds","tags":["Settings"],"description":"Platform admin only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan_tier":{"type":["string","null"]},"cost_per_indexed_usd":{"type":["number","null"]},"monthly_allowance":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"fallback_cost_per_indexed_usd":{"type":"number"},"failover_errors":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failover_window_min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failover_cooldown_min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failover_allowance_pct":{"type":"number"},"failover_day3_min_rate_pct":{"type":"number"}}}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/settings/crawl/breaker/reset":{"post":{"operationId":"post_settings_crawl_breaker_reset","summary":"Close the crawl circuit breaker (route new batches to the primary again)","tags":["Settings"],"description":"Platform admin only.","responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/settings/crawl/{route}/test":{"post":{"operationId":"post_settings_crawl_by_route_test","summary":"Test a crawl route (free, read-only call)","tags":["Settings"],"description":"Platform admin only.","parameters":[{"name":"route","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/credits":{"get":{"operationId":"get_credits","summary":"Credit balance and recent ledger","tags":["Credits"],"parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"type":"string"},"description":"Limit to one workspace"}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"get_credits"}},"/credits/ledger":{"get":{"operationId":"get_credits_ledger","summary":"Paginated credit ledger (kind=index|check)","tags":["Credits"],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"string"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"tenant_id","in":"query","required":false,"schema":{"type":"string"},"description":"Limit to one workspace"},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["index","check"]}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["in","out"]}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"list_ledger"}},"/credits/ledger/{id}":{"get":{"operationId":"get_credits_ledger_by_id","summary":"One ledger entry with related lines","tags":["Credits"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/credits/ledger/{id}/reverse":{"post":{"operationId":"post_credits_ledger_by_id_reverse","summary":"Reverse an allocation or grant","tags":["Credits"],"description":"Role admin or higher.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"reverse_ledger_entry","x-required-role":"admin"}},"/credits/allocate":{"post":{"operationId":"post_credits_allocate","summary":"Give index or check credits to a client (negative pulls back)","tags":["Credits"],"description":"Role admin or higher.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenant_id":{"type":"string"},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"kind":{"description":"Which credits to move (default index)","type":"string","enum":["index","check"]},"note":{"type":"string"}},"required":["tenant_id","amount"]}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"allocate_credits","x-required-role":"admin"}},"/credits/adjust":{"post":{"operationId":"post_credits_adjust","summary":"Adjust index or check credits (platform admin)","tags":["Credits"],"description":"Platform admin only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenant_id":{"type":"string"},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reason":{"type":"string"},"kind":{"type":"string","enum":["index","check"]}},"required":["tenant_id","amount","reason"]}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/jobs":{"get":{"operationId":"get_jobs","summary":"List pushes and visibility checks, each with an outcome","tags":["Pushes"],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"string"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"tenant_id","in":"query","required":false,"schema":{"type":"string"},"description":"Limit to one workspace"},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["index","check"]}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"list_jobs"},"post":{"operationId":"post_jobs","summary":"Push links (index job): free pre-flight, 1 index credit reserved per link and used only if indexed (credit back after the last re-check); verified IndexNow hosts are also sent to Bing","tags":["Pushes"],"description":"Role member or higher.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"urls":{"minItems":1,"maxItems":10000,"type":"array","items":{"type":"string"},"description":"Full http(s) URLs, up to 10,000 (Free plan: 50). Duplicates and invalid entries are dropped and reported."},"mode":{"type":"string","enum":["standard"],"description":"Lane. Only standard exists: 1 index credit per link, used only if the link gets indexed (credit back after 7 days if not). A faster priority lane is not available yet."},"tenant_id":{"description":"Workspace (tenant) id. Defaults to the workspace of the key or connection; use list_tenants to find client ids.","type":"string"},"name":{"description":"Label shown in lists, emails and client reports","type":"string","maxLength":200},"drip_days":{"description":"Spread the push over this many days (0 = all now)","type":"integer","minimum":0,"maximum":30},"recheck_days":{"description":"Deprecated, kept for compatibility: re-checks now follow the guarantee schedule (day 1, 3, 7) automatically","type":"integer","minimum":0,"maximum":5},"pre_check":{"description":"Take a 'before' snapshot first (1 check credit/URL); every link is still pushed","type":"boolean"},"smart":{"description":"Recommended: check first and only push what Google can't see (their index credit comes back)","type":"boolean"},"preflight":{"description":"Run the free pre-flight (default true)","type":"boolean"},"skip_flagged":{"description":"Skip URLs the pre-flight flags, for free (default true)","type":"boolean"},"push_anyway":{"description":"Push flagged URLs anyway (true = all, or a list). They aren't covered by the guarantee: their index credit is used","anyOf":[{"type":"boolean"},{"type":"array","items":{"type":"string"}}]},"force_refresh":{"description":"Refresh anyway (needs smart=true): links Google already has are sent too and use 1 index credit each when sent. No credit back: we can't see when Google re-crawls a page it already has, so the guarantee doesn't apply. IndexNow pings stay free","type":"boolean"},"indexnow_force":{"description":"Resend to IndexNow even if sent in the last 24 h (only when the content changed again)","type":"boolean"}},"required":["urls"]}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"submit_index_job","x-required-role":"member"}},"/urls/validate":{"post":{"operationId":"post_urls_validate","summary":"Validate and de-duplicate URLs (free)","tags":["Pushes"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"urls":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}]}},"required":["urls"]}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"validate_urls"}},"/preflight":{"post":{"operationId":"post_preflight","summary":"Pre-flight URLs before pushing (free): 4xx/5xx, noindex, robots.txt, redirects, canonical elsewhere","tags":["Pushes"],"description":"Role member or higher.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"urls":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string"}},"tenant_id":{"description":"Workspace (tenant) id. Defaults to the workspace of the key or connection; use list_tenants to find client ids.","type":"string"}},"required":["urls"]}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"preflight_urls","x-required-role":"member"}},"/jobs/{id}":{"get":{"operationId":"get_jobs_by_id","summary":"One push or check with outcome, comparison and IndexNow summary","tags":["Pushes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"url_limit","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"get_job_status"},"patch":{"operationId":"patch_jobs_by_id","summary":"Rename a job","tags":["Pushes"],"description":"Role member or higher.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":200},"recheck_days":{"type":"integer","minimum":0,"maximum":5}}}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"update_job","x-required-role":"member"},"delete":{"operationId":"delete_jobs_by_id","summary":"Delete a finished job","tags":["Pushes"],"description":"Role admin or higher.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"delete_job","x-required-role":"admin"}},"/jobs/{id}/sync":{"post":{"operationId":"post_jobs_by_id_sync","summary":"Refresh crawl status now","tags":["Pushes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/settings/job-sync":{"get":{"operationId":"get_settings_job_sync","summary":"Crawl-status sync schedule","tags":["Settings"],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"put_settings_job_sync","summary":"Update the crawl-status sync schedule","tags":["Settings"],"description":"Platform admin only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","6h","1h"]},"time":{"type":"string"},"tz":{"type":"string"}}}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/jobs/{id}/cancel":{"post":{"operationId":"post_jobs_by_id_cancel","summary":"Cancel a job (unsent links refunded)","tags":["Pushes"],"description":"Role member or higher.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"cancel_job","x-required-role":"member"}},"/jobs/{id}/retry":{"post":{"operationId":"post_jobs_by_id_retry","summary":"Push failed links again","tags":["Pushes"],"description":"Role member or higher.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","enum":["standard"],"description":"Lane. Only standard exists: 1 index credit per link, used only if the link gets indexed (credit back after 7 days if not). A faster priority lane is not available yet."}}}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"retry_job","x-required-role":"member"}},"/jobs/{id}/check":{"post":{"operationId":"post_jobs_by_id_check","summary":"Re-check a job's links now (1 check credit per link, 5 with scan_live)","tags":["Checks"],"description":"Role member or higher.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url_ids":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"engine":{"type":"string","enum":["scan_standard","scan_live","scan_bing","upstream"]}}}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"member"}},"/jobs/{id}/send-unindexed":{"post":{"operationId":"post_jobs_by_id_send_unindexed","summary":"Push the links Google can't see again","tags":["Pushes"],"description":"Role member or higher.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","enum":["standard"],"description":"Lane. Only standard exists: 1 index credit per link, used only if the link gets indexed (credit back after 7 days if not). A faster priority lane is not available yet."},"drip_days":{"type":"integer","minimum":0,"maximum":30},"recheck_days":{"description":"Deprecated: guarantee re-checks are automatic","type":"integer","minimum":0,"maximum":5}}}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"send_unindexed_to_indexer","x-required-role":"member"}},"/jobs/{id}/urls":{"get":{"operationId":"get_jobs_by_id_urls","summary":"A job's links (filters: state, indexed=yes|no|unknown, credit=reserved|consumed|released|excluded)","tags":["Pushes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"string"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"state","in":"query","required":false,"schema":{"type":"string"}},{"name":"indexed","in":"query","required":false,"schema":{"type":"string","enum":["yes","no","unknown"]}},{"name":"credit","in":"query","required":false,"schema":{"type":"string","enum":["reserved","consumed","released","excluded"]}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"list_job_urls"}},"/jobs/{id}/google":{"get":{"operationId":"get_jobs_by_id_google","summary":"Stored search results (pass url for one link's history)","tags":["Checks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"url","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"get_check_results"}},"/jobs/{id}/google/raw/{rid}":{"get":{"operationId":"get_jobs_by_id_google_raw_by_rid","summary":"Raw stored search response","tags":["Checks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"rid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/jobs/{id}/urls/{uid}":{"delete":{"operationId":"delete_jobs_by_id_urls_by_uid","summary":"Remove one link from a finished job","tags":["Pushes"],"description":"Role member or higher.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"uid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"delete_job_url","x-required-role":"member"}},"/jobs/{id}/csv":{"get":{"operationId":"get_jobs_by_id_csv","summary":"Export a job as CSV","tags":["Checks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"export_job_csv"}},"/jobs/{id}/indexnow":{"get":{"operationId":"get_jobs_by_id_indexnow","summary":"What a push sent to IndexNow (per link + summary)","tags":["IndexNow"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"get_job_indexnow"}},"/check":{"post":{"operationId":"post_check","summary":"Visibility check (index check)","tags":["Checks"],"description":"Role member or higher.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"urls":{"maxItems":10000,"type":"array","items":{"type":"string"}},"job_id":{"type":"string"},"tenant_id":{"description":"Workspace (tenant) id. Defaults to the workspace of the key or connection; use list_tenants to find client ids.","type":"string"},"name":{"type":"string","maxLength":200},"engine":{"type":"string","enum":["scan_standard","scan_live","scan_bing","upstream"]}}}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"check_index","x-required-role":"member"}},"/indexnow/sites":{"get":{"operationId":"get_indexnow_sites","summary":"List IndexNow sites","tags":["IndexNow"],"parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"type":"string"},"description":"Limit to one workspace"}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"list_indexnow_sites"},"post":{"operationId":"post_indexnow_sites","summary":"Add a site (returns the key to host)","tags":["IndexNow"],"description":"Role admin or higher.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"host":{"type":"string","description":"Domain or any URL on it, e.g. https://www.example.com/blog"},"tenant_id":{"description":"Workspace (tenant) id. Defaults to the workspace of the key or connection; use list_tenants to find client ids.","type":"string"},"key_location":{"description":"Optional full URL of the key file on the same host, e.g. https://example.com/keys/indexnow.txt","type":"string"}},"required":["host"]}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"add_indexnow_site","x-required-role":"admin"}},"/indexnow/sites/{id}":{"get":{"operationId":"get_indexnow_sites_by_id","summary":"One IndexNow site with recent submissions","tags":["IndexNow"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"patch_indexnow_sites_by_id","summary":"Turn pings on/off or change the key location","tags":["IndexNow"],"description":"Role admin or higher.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"key_location":{"type":["string","null"]}}}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"update_indexnow_site","x-required-role":"admin"},"delete":{"operationId":"delete_indexnow_sites_by_id","summary":"Remove an IndexNow site","tags":["IndexNow"],"description":"Role admin or higher.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"delete_indexnow_site","x-required-role":"admin"}},"/indexnow/sites/{id}/verify":{"post":{"operationId":"post_indexnow_sites_by_id_verify","summary":"Fetch the key file and verify the site","tags":["IndexNow"],"description":"Role member or higher.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"verify_indexnow_site","x-required-role":"member"}},"/indexnow/sites/{id}/rotate-key":{"post":{"operationId":"post_indexnow_sites_by_id_rotate_key","summary":"Generate a new key (verify again afterwards)","tags":["IndexNow"],"description":"Role admin or higher.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"admin"}},"/indexnow/preview":{"post":{"operationId":"post_indexnow_preview","summary":"How many of these URLs would also go to IndexNow","tags":["IndexNow"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"urls":{"type":"array","items":{"type":"string"}},"tenant_id":{"type":"string"}},"required":["urls"]}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/indexnow/own":{"get":{"operationId":"get_indexnow_own","summary":"Our own site's IndexNow submissions (platform admin)","tags":["IndexNow"],"description":"Platform admin only.","responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/indexnow/tick":{"post":{"operationId":"post_indexnow_tick","summary":"Run the daily re-verification now (platform admin)","tags":["IndexNow"],"description":"Platform admin only.","responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/api-keys":{"get":{"operationId":"get_api_keys","summary":"List API keys (prefix only)","tags":["API keys"],"parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"type":"string"},"description":"Limit to one workspace"},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["active","revoked"]}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"list_api_keys"},"post":{"operationId":"post_api_keys","summary":"Create an API key (secret shown once)","tags":["API keys"],"description":"Role admin or higher.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"tenant_id":{"description":"Workspace (tenant) id. Defaults to the workspace of the key or connection; use list_tenants to find client ids.","type":"string"},"role":{"type":"string","enum":["owner","admin","member","client_viewer"]},"rate_per_min":{"type":"integer","minimum":1,"maximum":600},"rate_per_day":{"type":"integer","minimum":1,"maximum":100000},"daily_credit_cap":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"create_api_key","x-required-role":"admin"}},"/api-keys/{id}":{"get":{"operationId":"get_api_keys_by_id","summary":"One API key","tags":["API keys"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"patch_api_keys_by_id","summary":"Rename, change role or limits","tags":["API keys"],"description":"Role admin or higher.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member","client_viewer"]},"rate_per_min":{"anyOf":[{"type":"integer","minimum":1,"maximum":600},{"type":"null"}]},"rate_per_day":{"anyOf":[{"type":"integer","minimum":1,"maximum":100000},{"type":"null"}]},"daily_credit_cap":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"update_api_key","x-required-role":"admin"},"delete":{"operationId":"delete_api_keys_by_id","summary":"Delete an API key","tags":["API keys"],"description":"Role admin or higher.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"delete_api_key","x-required-role":"admin"}},"/api-keys/{id}/revoke":{"post":{"operationId":"post_api_keys_by_id_revoke","summary":"Revoke an API key","tags":["API keys"],"description":"Role admin or higher.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"revoke_api_key","x-required-role":"admin"}},"/oauth/grants":{"get":{"operationId":"get_oauth_grants","summary":"Apps connected to your login via OAuth","tags":["Account"],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/oauth/grants/{id}":{"delete":{"operationId":"delete_oauth_grants_by_id","summary":"Disconnect an app (revokes its tokens)","tags":["Account"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/profile":{"get":{"operationId":"get_profile","summary":"Your profile","tags":["Account"],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"patch_profile","summary":"Update your profile","tags":["Account"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"delete_profile","summary":"Delete your account (confirm = your email)","tags":["Account"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"string"}},"required":["confirm"]}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/profile/sessions":{"get":{"operationId":"get_profile_sessions","summary":"Your sign-in sessions","tags":["Account"],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/profile/sessions/{sid}":{"delete":{"operationId":"delete_profile_sessions_by_sid","summary":"Sign out one session","tags":["Account"],"parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users":{"get":{"operationId":"get_users","summary":"List users","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"string"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"list_users","x-required-role":"platform"},"post":{"operationId":"post_users","summary":"Create a user","tags":["Platform"],"description":"Platform admin only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/users/{id}":{"get":{"operationId":"get_users_by_id","summary":"One user","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"get_user","x-required-role":"platform"},"patch":{"operationId":"patch_users_by_id","summary":"Update a user","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"},"delete":{"operationId":"delete_users_by_id","summary":"Delete a user","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/users/{id}/suspend":{"post":{"operationId":"post_users_by_id_suspend","summary":"Suspend a user","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/users/{id}/activate":{"post":{"operationId":"post_users_by_id_activate","summary":"Re-activate a user","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/users/{id}/memberships":{"post":{"operationId":"post_users_by_id_memberships","summary":"Add a membership","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenant_id":{"type":"string"},"role":{"type":"string"}},"required":["tenant_id","role"]}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/users/{id}/memberships/{tid}":{"delete":{"operationId":"delete_users_by_id_memberships_by_tid","summary":"Remove a membership","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"tid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/users/{id}/sessions/{sid}":{"delete":{"operationId":"delete_users_by_id_sessions_by_sid","summary":"Sign out a user's session","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"sid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/audit":{"get":{"operationId":"get_audit","summary":"Audit trail","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"string"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"action","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"list_audit_log","x-required-role":"platform"}},"/errors":{"get":{"operationId":"get_errors","summary":"Tracked errors","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"string"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"list_errors","x-required-role":"platform"}},"/errors/{id}":{"get":{"operationId":"get_errors_by_id","summary":"One tracked error","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"},"patch":{"operationId":"patch_errors_by_id","summary":"Resolve or reopen an error","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"resolved":{"type":"boolean"}},"required":["resolved"]}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"resolve_error","x-required-role":"platform"},"delete":{"operationId":"delete_errors_by_id","summary":"Delete a tracked error","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/invites":{"get":{"operationId":"get_invites","summary":"Invite codes (status: active, used, redeemed, revoked, expired)","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"string"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["active","used","redeemed","revoked","expired"]}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"},"post":{"operationId":"post_invites","summary":"Create invite codes: one (optionally bound to an email and sent), or a batch of up to 200","tags":["Platform"],"description":"Platform admin only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","minimum":1,"maximum":200},"email":{"type":"string"},"note":{"type":"string"},"max_uses":{"type":"integer","minimum":1,"maximum":1000},"expires_days":{"type":"number","minimum":1,"maximum":365},"send":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/invites/{id}":{"get":{"operationId":"get_invites_by_id","summary":"One invite with who redeemed it","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/invites/{id}/send":{"post":{"operationId":"post_invites_by_id_send","summary":"Email (or re-send) an invite; an unbound single-use invite becomes bound to that address","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"}}}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/invites/{id}/revoke":{"post":{"operationId":"post_invites_by_id_revoke","summary":"Revoke an invite (it stops working at once)","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/waitlist":{"get":{"operationId":"get_waitlist","summary":"Invite requests (waitlist)","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"string"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","invited","declined","joined"]}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/waitlist/{id}/approve":{"post":{"operationId":"post_waitlist_by_id_approve","summary":"Approve a request: a single-use invite bound to that email, sent at once","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expires_days":{"type":"number","minimum":1,"maximum":365}}}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/waitlist/{id}/decline":{"post":{"operationId":"post_waitlist_by_id_decline","summary":"Decline a request (silent unless send_email is true)","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"send_email":{"type":"boolean"},"note":{"type":"string"}}}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/settings/access":{"get":{"operationId":"get_settings_access","summary":"Sign-up mode and the Free plan grant","tags":["Settings"],"description":"Platform admin only.","responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"},"put":{"operationId":"put_settings_access","summary":"Update the sign-up mode","tags":["Settings"],"description":"Platform admin only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"signup_mode":{"type":"string","enum":["approval","open"]}}}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/users/{id}/approve":{"post":{"operationId":"post_users_by_id_approve","summary":"Approve a pending account","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/users/{id}/decline":{"post":{"operationId":"post_users_by_id_decline","summary":"Decline a pending account","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/credits/packs":{"get":{"operationId":"get_credits_packs","summary":"Credit packs (index + check credits, USD)","tags":["Credits"],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/credits/requests":{"get":{"operationId":"get_credits_requests","summary":"Credit pack requests","tags":["Credits"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"post_credits_requests","summary":"Request a credit pack","tags":["Credits"],"description":"Role admin or higher.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pack":{"type":"string","enum":["try","boost","pro","checks","checks_l"]},"tenant_id":{"type":"string"},"note":{"type":"string"}},"required":["pack"]}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"admin"}},"/credits/requests/{id}/approve":{"post":{"operationId":"post_credits_requests_by_id_approve","summary":"Approve a credit request","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/credits/requests/{id}/decline":{"post":{"operationId":"post_credits_requests_by_id_decline","summary":"Decline a credit request","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"}}}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/credits/requests/{id}/refund":{"post":{"operationId":"post_credits_requests_by_id_refund","summary":"Refund an approved pack: takes back its unspent credits (platform admin)","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"}}}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/jobs/{id}/share":{"post":{"operationId":"post_jobs_by_id_share","summary":"Create (or return) a client report link","tags":["Checks"],"description":"Role member or higher.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-mcp-tool":"share_job_report","x-required-role":"member"},"delete":{"operationId":"delete_jobs_by_id_share","summary":"Stop sharing a client report","tags":["Checks"],"description":"Role member or higher.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"member"}},"/upstream/balance":{"get":{"operationId":"get_upstream_balance","summary":"Upstream balances: Standard scans (USD), Live scans (searches left), Pilot Crawl","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"refresh","in":"query","required":false,"schema":{"type":"string"},"description":"1 = bypass the 5-minute cache"}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/plans":{"get":{"operationId":"get_plans","summary":"Plans and their limits (USD)","tags":["Credits"],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/tenants/{id}/plan":{"put":{"operationId":"put_tenants_by_id_plan","summary":"Set a workspace's plan (platform admin override; Stripe sets it automatically once payments are live)","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","enum":["free","agency_starter","agency_pro","agency_scale"]},"status":{"type":"string","enum":["active","past_due","canceled"]},"interval":{"anyOf":[{"type":"string","enum":["month","year"]},{"type":"null"}]},"current_period_end":{"type":["string","null"]},"grace_until":{"type":["string","null"]},"grant_period":{"description":"Also grant one period of plan credits","type":"boolean"},"period_start":{"type":"string"},"period_end":{"type":"string"},"ref":{"description":"Idempotency key for the grant","type":"string"},"note":{"description":"Why (kept in the audit log)","type":"string"}},"required":["plan"]}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/tenants/{id}/branding":{"get":{"operationId":"get_tenants_by_id_branding","summary":"White-label branding of a workspace and what the plan allows","tags":["Clients"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"put_tenants_by_id_branding","summary":"Update white-label branding (logo: Agency Starter+; colours, sender name: Agency Pro+; custom domain: Agency Scale)","tags":["Clients"],"description":"Role admin or higher.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"logo_url":{"type":["string","null"]},"accent":{"type":["string","null"]},"from_name":{"type":["string","null"]},"domain":{"type":["string","null"]}}}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"admin"}},"/admin/margin":{"get":{"operationId":"get_admin_margin","summary":"Margin dashboard: revenue vs upstream cost, index and credit-back rates, free-tier cost, upstream utilisation, reconciliation","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"days","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/admin/margin/settings":{"get":{"operationId":"get_admin_margin_settings","summary":"Upstream tier, $/indexed link, monthly allowance and check rates","tags":["Platform"],"description":"Platform admin only.","responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"},"put":{"operationId":"put_admin_margin_settings","summary":"Update upstream tier, $/indexed link, monthly allowance and check rates","tags":["Platform"],"description":"Platform admin only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tier":{"type":["string","null"]},"cost_per_indexed_usd":{"type":["number","null"]},"monthly_allowance":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"standard_check_usd":{"type":"number"},"live_check_usd":{"type":"number"}}}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/admin/margin/reconciliation/{month}":{"put":{"operationId":"put_admin_margin_reconciliation_by_month","summary":"Enter the upstream billed count for a month (YYYY-MM)","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"month","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"billed_count":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"note":{"type":"string"}},"required":["billed_count"]}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/admin/free-checks":{"get":{"operationId":"get_admin_free_checks","summary":"Free checks: totals (today, 7 and 30 days), top countries, cities, domains, IPs and networks, active blocks and today's caps","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"string","enum":["1","7","30"]}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/admin/free-checks/checks":{"get":{"operationId":"get_admin_free_checks_checks","summary":"Free checks log, newest first (q = IP, network, domain, country code or city)","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"string"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["xray","answer","lens","xray_retry","answer_edit"]}},{"name":"blocked","in":"query","required":false,"schema":{"type":"string","enum":["1"]}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/admin/free-checks/csv":{"get":{"operationId":"get_admin_free_checks_csv","summary":"Free checks of the last 30 days as CSV","tags":["Platform"],"description":"Platform admin only.","responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/admin/free-checks/blocks":{"post":{"operationId":"post_admin_free_checks_blocks","summary":"Block an IP or network (/24, /64) from the free checks; hours empty = until lifted","tags":["Platform"],"description":"Platform admin only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"type":"string"},"hours":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"reason":{"type":"string"}},"required":["target"]}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/admin/free-checks/blocks/{id}":{"delete":{"operationId":"delete_admin_free_checks_blocks_by_id","summary":"Lift a free-checks block","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/admin/free-checks/report":{"post":{"operationId":"post_admin_free_checks_report","summary":"Email yesterday's free-checks report now (default: to yourself)","tags":["Platform"],"description":"Platform admin only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string"}}}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/admin/billing":{"get":{"operationId":"get_admin_billing","summary":"Billing: revenue this and last month, refunds and chargebacks, subscriptions by plan, MRR (list prices), Stripe mode","tags":["Platform"],"description":"Platform admin only.","responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/admin/billing/events":{"get":{"operationId":"get_admin_billing_events","summary":"Money events (pack purchases, plan invoices, refunds, chargebacks, failed payments) with Stripe links","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"string"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["pack_purchase","plan_invoice","refund","chargeback","payment_failed"]}},{"name":"tenant_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string"},"description":"YYYY-MM-DD (UTC)"},{"name":"to","in":"query","required":false,"schema":{"type":"string"},"description":"YYYY-MM-DD (UTC, inclusive)"}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/admin/billing/events/csv":{"get":{"operationId":"get_admin_billing_events_csv","summary":"The filtered money events as CSV","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"string"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["pack_purchase","plan_invoice","refund","chargeback","payment_failed"]}},{"name":"tenant_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string"},"description":"YYYY-MM-DD (UTC)"},{"name":"to","in":"query","required":false,"schema":{"type":"string"},"description":"YYYY-MM-DD (UTC, inclusive)"}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/admin/billing/tenants/{id}":{"get":{"operationId":"get_admin_billing_tenants_by_id","summary":"One workspace's billing: plan, Stripe subscription, purchases with the pack refund check, recent money events","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/admin/system":{"get":{"operationId":"get_admin_system","summary":"Server status: version, uptime, database, scheduler steps, crawl routes, SMTP, Stripe mode, geo databases, backups","tags":["Platform"],"description":"Platform admin only.","responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/admin/providers":{"get":{"operationId":"get_admin_providers","summary":"Providers: Pilot Crawl credits estimate (from the last entered balance), fallback credits, scan balances and today's spend vs caps","tags":["Platform"],"description":"Platform admin only.","responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/admin/providers/balance":{"put":{"operationId":"put_admin_providers_balance","summary":"Re-base the Pilot Crawl estimate: credits on the supplier's member page and when, plan tier, $/credit, next bill date, monthly allowance","tags":["Platform"],"description":"Platform admin only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"credits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"as_of":{"description":"ISO date-time, default now","type":["string","null"]},"plan_tier":{"type":["string","null"]},"cost_per_credit_usd":{"description":"null = the tier's price","type":["number","null"]},"next_bill_at":{"type":["string","null"]},"monthly_allowance":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/admin/providers/usage":{"get":{"operationId":"get_admin_providers_usage","summary":"Crawl usage by client: links per route this billing period and all time, provider cost, indexed vs credited back, revenue and margin","tags":["Platform"],"description":"Platform admin only.","responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/admin/providers/usage/csv":{"get":{"operationId":"get_admin_providers_usage_csv","summary":"Crawl usage by client as CSV","tags":["Platform"],"description":"Platform admin only.","responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/admin/providers/campaigns":{"get":{"operationId":"get_admin_providers_campaigns","summary":"The newest 100 crawl campaigns (names as on the supplier dashboard) with client, site and job, plus per-client and per-site rollups","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"site","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/admin/providers/campaigns/{id}/links":{"get":{"operationId":"get_admin_providers_campaigns_by_id_links","summary":"One campaign's links: the supplier's per-link status (for reference) next to our push state, Google visibility and credit","tags":["Platform"],"description":"Platform admin only.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/admin/providers/supplier":{"get":{"operationId":"get_admin_providers_supplier","summary":"Supplier account: connected or not, last sync, last error, the cross-check of our estimate against the supplier's balance","tags":["Platform"],"description":"Platform admin only.","responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"},"delete":{"operationId":"delete_admin_providers_supplier","summary":"Disconnect the supplier account (deletes the stored sign-in)","tags":["Platform"],"description":"Platform admin only.","responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/admin/providers/supplier/connect":{"post":{"operationId":"post_admin_providers_supplier_connect","summary":"Start connecting the supplier account: returns the approval page and the code to approve there","tags":["Platform"],"description":"Platform admin only.","responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/admin/providers/supplier/connect/finish":{"post":{"operationId":"post_admin_providers_supplier_connect_finish","summary":"Finish connecting after the code was approved (the sign-in is stored encrypted, never returned), then sync","tags":["Platform"],"description":"Platform admin only.","responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/admin/providers/supplier/sync":{"post":{"operationId":"post_admin_providers_supplier_sync","summary":"Sync the supplier's balance and campaign statuses now","tags":["Platform"],"description":"Platform admin only.","responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}},"/billing/tick":{"post":{"operationId":"post_billing_tick","summary":"Run the guarantee re-checks and credit housekeeping now (platform admin)","tags":["Platform"],"description":"Platform admin only.","responses":{"200":{"description":"Success: `{ ok: true, data }`","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits (error.details: code insufficient_credits, kind index|check, need, have)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Role too low, read-only key, account awaiting approval, or not on your plan (error.details.code plan_required with required_plan and upgrade_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or outside your workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit, daily limit or a plan limit reached (error.details.code rate_limited or plan_limit)","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-role":"platform"}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key: `Authorization: Bearer ipk_…` (create one under API keys in the app)"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key"}},"headers":{"RetryAfter":{"description":"Seconds until you can retry","schema":{"type":"integer"}},"RateLimitRemaining":{"description":"Requests left in the current minute (API keys only)","schema":{"type":"integer"}}},"schemas":{"Ok":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{}}},"Error":{"type":"object","required":["ok","error"],"properties":{"ok":{"const":false},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"integer","description":"HTTP status"},"error_code":{"type":"string","enum":["plan_required","plan_limit","insufficient_credits","rate_limited","disposable_email"],"description":"Stable machine-readable reason (plan_required: the feature needs another plan or any pack)"},"required_plan":{"type":"string","enum":["pack","agency_starter","agency_pro","agency_scale"],"description":"With plan_required: the cheapest plan that unlocks it, or pack when buying any pack on Free does"},"message":{"type":"string"},"request_id":{"type":"string"},"retry_after":{"type":"integer"},"details":{"type":"object","description":"Machine-readable reason, e.g. { code: \"plan_required\", feature, plan, required_plan, upgrade_url }, { code: \"plan_limit\", feature, limit, used }, { code: \"insufficient_credits\", kind, need, have } or { code: \"rate_limited\", plan, limit, window }","properties":{"code":{"type":"string","enum":["plan_required","plan_limit","insufficient_credits","rate_limited","disposable_email"]},"required_plan":{"type":"string","enum":["agency_starter","agency_pro","agency_scale"]},"upgrade_url":{"type":"string"},"feature":{"type":"string"},"kind":{"type":"string","enum":["index","check"]}}}}}}}}}}