{"openapi":"3.1.0","info":{"title":"Keystone REST API","version":"1.0.0","description":"Headless HTTPS API for Keystone. Every tool available over MCP runs through POST /v1/tools/{name} with the same personal tokens, workspace isolation, approvals, rate limits and audit log. Subscribe to signed outbound webhooks for real-time workspace events."},"servers":[{"url":"https://keystonecloud.ai","description":"Keystone API"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Tools","description":"Run any Keystone MCP tool over HTTPS through the shared runner."},{"name":"Webhooks","description":"Subscribe endpoints to workspace events, inspect deliveries and manage endpoints."},{"name":"Core","description":"Keystone tools in Core."},{"name":"Workspace setup and connecting apps","description":"Keystone tools in Workspace setup and connecting apps."},{"name":"Connected apps and CRM","description":"Keystone tools in Connected apps and CRM."},{"name":"Phone, texts and receptionist","description":"Keystone tools in Phone, texts and receptionist."},{"name":"Wallet, purchases and financing","description":"Keystone tools in Wallet, purchases and financing."},{"name":"Reports, tracking and research","description":"Keystone tools in Reports, tracking and research."},{"name":"API Anything apps and saved logins","description":"Keystone tools in API Anything apps and saved logins."},{"name":"Memory and documents","description":"Keystone tools in Memory and documents."},{"name":"Notebook and AI rules","description":"Keystone tools in Notebook and AI rules."},{"name":"Sites and forms","description":"Keystone tools in Sites and forms."},{"name":"Playbooks, marketplace and client setup","description":"Keystone tools in Playbooks, marketplace and client setup."},{"name":"Reviews and referrals","description":"Keystone tools in Reviews and referrals."},{"name":"Ad budgets and Local Services leads","description":"Keystone tools in Ad budgets and Local Services leads."},{"name":"Follow-ups and campaigns","description":"Keystone tools in Follow-ups and campaigns."},{"name":"Content and job photos","description":"Keystone tools in Content and job photos."},{"name":"Team and permissions","description":"Keystone tools in Team and permissions."},{"name":"AI check-ins, claims, agent mail and project feed","description":"Keystone tools in AI check-ins, claims, agent mail and project feed."},{"name":"Redshift Computer (terminal, files, commands)","description":"Keystone tools in Redshift Computer (terminal, files, commands)."}],"paths":{"/v1/openapi.json":{"get":{"operationId":"get_openapi","summary":"OpenAPI specification","description":"Returns this OpenAPI 3.1 document generated from the Keystone tool registry.","tags":["Tools"],"security":[],"responses":{"200":{"description":"OpenAPI 3.1 JSON document."}}}},"/v1/tools":{"get":{"operationId":"list_tools","summary":"List tools available to this token","description":"Returns every tool your personal token can run, with risk levels, approval flags and JSON input schemas.","tags":["Tools"],"responses":{"200":{"description":"List of available tools.","content":{"application/json":{"schema":{"type":"object","properties":{"tools":{"type":"array","items":{"type":"object"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/webhooks":{"get":{"operationId":"rest_webhooks_list","summary":"List outbound webhooks","description":"Lists outbound webhook subscriptions in the active workspace (or the workspace query parameter) and all subscribable event types.","tags":["Webhooks"],"parameters":[{"name":"workspace","in":"query","schema":{"type":"string"},"description":"Workspace slug or id. Defaults to your active workspace."}],"responses":{"200":{"description":"Active and disabled webhook subscriptions for the workspace.","content":{"application/json":{"schema":{"type":"object","properties":{"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/WebhookSubscription"}},"available_events":{"type":"array","items":{"type":"object"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"operationId":"rest_webhook_subscribe","summary":"Subscribe an outbound webhook","description":"Creates a signed outbound webhook subscription for one or more trigger-bus events. Returns the signing secret once.","tags":["Webhooks"],"x-keystone-risk":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","events"],"properties":{"url":{"type":"string","format":"uri","description":"Public HTTPS URL that receives signed POST deliveries."},"events":{"type":"array","minItems":1,"items":{"type":"string","enum":["*","contact.created","lead.created","email.received","form.submitted","call.missed","message.received","message.replied","review.received","payment.received","invoice.overdue","booking.created","booking.canceled","webhook.received"]},"description":"Event types to receive, or [\"*\"] for all events."},"name":{"type":"string","maxLength":120,"description":"Short label for this endpoint."},"workspace":{"type":"string","description":"Workspace slug or id. Defaults to your active workspace."}}}}}},"responses":{"201":{"description":"Webhook created. Copy signing_secret now; it is shown once.","content":{"application/json":{"schema":{"type":"object","properties":{"webhook":{"$ref":"#/components/schemas/WebhookSubscription"},"signing_secret":{"type":"string"},"headers":{"type":"object"},"signing":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/webhooks/deliveries":{"get":{"operationId":"rest_webhook_deliveries","summary":"List webhook deliveries","description":"Reads recent outbound webhook deliveries in the workspace, including status, HTTP response code, attempts and timing.","tags":["Webhooks"],"parameters":[{"name":"workspace","in":"query","schema":{"type":"string"},"description":"Workspace slug or id."},{"name":"webhook_id","in":"query","schema":{"type":"string"},"description":"Filter to one webhook id."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"Max deliveries to return (default 25)."}],"responses":{"200":{"description":"Recent delivery log entries.","content":{"application/json":{"schema":{"type":"object","properties":{"deliveries":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/webhooks/{id}":{"patch":{"operationId":"rest_webhook_update","summary":"Update an outbound webhook","description":"Re-enables or disables an endpoint, updates its URL, name or events, or rotates its signing secret.","tags":["Webhooks"],"x-keystone-risk":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Webhook id (whk_...)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"url":{"type":"string","format":"uri"},"events":{"type":"array","minItems":1,"items":{"type":"string","enum":["*","contact.created","lead.created","email.received","form.submitted","call.missed","message.received","message.replied","review.received","payment.received","invoice.overdue","booking.created","booking.canceled","webhook.received"]}},"status":{"type":"string","enum":["active","disabled"]},"rotate_secret":{"type":"boolean"},"workspace":{"type":"string"}}}}}},"responses":{"200":{"description":"Updated webhook subscription."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"delete":{"operationId":"rest_webhook_unsubscribe","summary":"Unsubscribe an outbound webhook","description":"Removes a webhook endpoint and stops future deliveries to it.","tags":["Webhooks"],"x-keystone-risk":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Webhook id (whk_...)."},{"name":"workspace","in":"query","schema":{"type":"string"},"description":"Workspace slug or id."}],"responses":{"200":{"description":"Webhook removed.","content":{"application/json":{"schema":{"type":"object","properties":{"unsubscribed":{"type":"boolean"},"webhook_id":{"type":"string"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/webhooks/{id}/deliveries":{"get":{"operationId":"rest_webhook_endpoint_deliveries","summary":"List deliveries for one webhook","description":"Returns recent delivery attempts for one webhook endpoint.","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Webhook id (whk_...)."},{"name":"workspace","in":"query","schema":{"type":"string"},"description":"Workspace slug or id."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Delivery attempts for this webhook.","content":{"application/json":{"schema":{"type":"object","properties":{"deliveries":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/tools/whoami":{"post":{"operationId":"whoami","summary":"Whoami","description":"Returns the signed-in user, billing account, plan, trial days left, active workspace, connected apps, and suggested apps to connect next. Call this first.","tags":["Core"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"core","x-keystone-needs-approval":false}},"/v1/tools/approvals_list":{"post":{"operationId":"approvals_list","summary":"Approvals list","description":"Read pending content, review replies, follow-up programs, budget changes and playbook proposals for the selected workspace, oldest first. Use the corresponding decision tool after reviewing the exact action.","tags":["Core"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["Content","Review reply","Playbook","Budget","Follow-up"]},"status":{"default":"pending","type":"string","const":"pending"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"core","x-keystone-needs-approval":false}},"/v1/tools/workspaces_list":{"post":{"operationId":"workspaces_list","summary":"Workspaces list","description":"Lists every active workspace in your account and marks which workspace is currently active.","tags":["Core"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"core","x-keystone-needs-approval":false}},"/v1/tools/workspace_use":{"post":{"operationId":"workspace_use","summary":"Workspace use","description":"Save the default workspace for this signed-in user and account across dashboard and AI sessions until changed. An explicit workspace overrides it for one call.","tags":["Core"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"string","minLength":1,"maxLength":120,"description":"Workspace slug or id from workspaces_list."}},"required":["workspace"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"core","x-keystone-needs-approval":false}},"/v1/tools/workspace_create":{"post":{"operationId":"workspace_create","summary":"Workspace create","description":"Creates a new business or client workspace inside your account (subject to your plan workspace limit).","tags":["Core"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Business or client name."},"website":{"description":"Website URL for the business.","type":"string","maxLength":300},"activate":{"description":"Switch to the new workspace immediately (default true).","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["name"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"core","x-keystone-needs-approval":false}},"/v1/tools/connections_list":{"post":{"operationId":"connections_list","summary":"Connections list","description":"List apps for the explicit workspace, or the saved user and account default when omitted, and show how many more can be connected per category. Pass category (seo, ads, analytics, local, crm, field_service, accounting, social, email_sms, content, productivity, dev, other) or search to list the apps you can connect, then call connect with a slug.","tags":["Core"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"category":{"description":"Category to list, such as seo, ads, analytics or crm.","type":"string","maxLength":40},"search":{"description":"Words to find an app by name, such as \"meta ads\" or \"quickbooks\".","type":"string","maxLength":60},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"core","x-keystone-needs-approval":false}},"/v1/tools/connect":{"post":{"operationId":"connect","summary":"Connect","description":"Return a connection link for the explicit workspace, or the saved user and account default until changed. Never ask the user for passwords or API keys in chat.","tags":["Core"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","minLength":1,"maxLength":100,"description":"App slug from connections_list, such as google_search_console, google_analytics, or hubspot."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["slug"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"core","x-keystone-needs-approval":false}},"/v1/tools/redshift_dream_setup":{"post":{"operationId":"redshift_dream_setup","summary":"Redshift dream setup","description":"Set up Redshift Dreaming, overnight memory for one workspace. preview true shows the cost and nothing changes. on true turns it on after owner or admin approval. It consolidates memory, drafts suggested skills, proposes instruction changes, prepares tomorrow and writes a cited dream journal around 2 AM in the workspace time zone. Billed from the wallet and stopped by a nightly cap. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Core"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"preview":{"default":false,"type":"boolean"},"on":{"type":"boolean"},"nightly_cap_cents":{"type":"integer","minimum":5,"maximum":200},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"core","x-keystone-needs-approval":true}},"/v1/tools/redshift_dream_run":{"post":{"operationId":"redshift_dream_run","summary":"Redshift dream run","description":"Run Redshift Dreaming now for this workspace. It uses the approved nightly cap, skips quiet nights unless force is true, and returns what each pass did, what it cost, and where the journal is. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Core"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"force":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"core","x-keystone-needs-approval":true}},"/v1/tools/redshift_dream_journal":{"post":{"operationId":"redshift_dream_journal","summary":"Redshift dream journal","description":"Read the latest dream journal for this workspace: memory learned, merged or expired, suggested skills, proposed instruction changes, the Ready for tomorrow brief, cost and citations. Redshift agents should read this at the start of the day.","tags":["Core"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"core","x-keystone-needs-approval":false}},"/v1/tools/redshift_dream_apply":{"post":{"operationId":"redshift_dream_apply","summary":"Redshift dream apply","description":"Approve or dismiss one Dreaming suggestion. approve true approves a suggested skill through the exact skill review, or applies an instruction diff to that Redshift agent. approve false dismisses it. This is approval-gated; Dreaming never applies either silently. (Ends access or deletes data, so a person must approve it first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. approved: true in the input never counts as approval.)","tags":["Core"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"proposal":{"type":"string","minLength":4,"maxLength":80},"approve":{"default":true,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["proposal"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"destructive","x-keystone-module":"core","x-keystone-needs-approval":true}},"/v1/tools/setup_kit_plan":{"post":{"operationId":"setup_kit_plan","summary":"Setup kit plan","description":"Draft a business launch for owner review. Quotes domain registration and phone rental, writes four pages, and saves the plan without making purchases.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"registrant":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","pattern":"^\\+[1-9]\\d{0,2}\\.\\d{4,14}$","description":"International number with a dot after the country code."},"postal_info":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":160},"organization":{"type":"string","minLength":1,"maxLength":160},"address":{"type":"object","properties":{"street":{"type":"string","minLength":1,"maxLength":160},"city":{"type":"string","minLength":1,"maxLength":160},"state":{"type":"string","minLength":1,"maxLength":160},"postal_code":{"type":"string","minLength":1,"maxLength":160},"country_code":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["street","city","state","postal_code","country_code"]}},"required":["name","address"]}},"required":["email","phone","postal_info"]},"business":{"type":"string","minLength":1,"maxLength":100},"city":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","minLength":1,"maxLength":1000},"site_copy":{"description":"Write the four page drafts from the request and publishable workspace facts for the owner to review.","type":"object","properties":{"Home":{"type":"string","minLength":1,"maxLength":2400},"Services":{"type":"string","minLength":1,"maxLength":2400},"About":{"type":"string","minLength":1,"maxLength":2400},"Contact":{"type":"string","minLength":1,"maxLength":1000}},"required":["Home","Services","About","Contact"]},"domain":{"type":"string","maxLength":253},"analytics_property":{"description":"Analytics property bound to this workspace.","type":"string","pattern":"^properties\\/\\d+$"},"email_mode":{"default":"mailbox","description":"Mailbox holds the latest 50 messages up to 64 KB each. Forwarding requires a verified destination.","type":"string","enum":["mailbox","forward"]},"crm_form_url":{"description":"Published form link from the included ServiceLine CRM account. Submissions go directly to that account.","type":"string","maxLength":250,"pattern":"^https:\\/\\/(?:sl\\.app|pro\\.serviceline\\.app)\\/f\\/[a-zA-Z0-9_-]+$"},"forwarding_number":{"type":"string","pattern":"^\\+1[2-9]\\d{9}$"},"public_memory_ids":{"default":[],"description":"Workspace facts the owner wants published.","maxItems":5,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["registrant","business","city","description"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/setup_kit_start":{"post":{"operationId":"setup_kit_start","summary":"Setup kit start","description":"Start the saved launch plan and queue purchases at the reviewed total in USD micros. Keystone asks the owner to approve that total before anything is bought. Repeat with the same id to resume a job that needs attention. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Workspace setup and connecting apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"approved":{"description":"Deprecated. Ignored; the owner approves through Keystone.","type":"boolean","const":true},"totalMicros":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"finish_connections":{"description":"Recheck owner connections after launch without repeating purchases.","type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id","totalMicros"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"workspace","x-keystone-needs-approval":true}},"/v1/tools/setup_kit_status":{"post":{"operationId":"setup_kit_status","summary":"Setup kit status","description":"Read the saved plan, completed launch steps, links and outstanding owner actions for this workspace.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/triggers_catalog":{"post":{"operationId":"triggers_catalog","summary":"Triggers catalog","description":"What triggers can listen for and what they can do: event types with their sources and costs, the ready-made recipes, and the agents a trigger can wake. Read this before trigger_create.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/triggers_list":{"post":{"operationId":"triggers_list","summary":"Triggers list","description":"The triggers in this workspace with their status, what starts them, what they do and when they last fired.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/trigger_create":{"post":{"operationId":"trigger_create","summary":"Trigger create","description":"Make a trigger: when an event happens in this workspace's apps, run tool steps, wake an agent or run a saved playbook with the event as input. Easiest: pass a recipe (new_lead_text, low_review, cancel_waitlist, payment_thanks) and optionally change event, source or filters. App sources (Gmail, Stripe, Google Calendar, Calendly) must be connected first. A webhook trigger returns its link and signing secret once.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"recipe":{"description":"A recipe key from triggers_catalog.","type":"string"},"name":{"type":"string","maxLength":120},"event":{"type":"string","enum":["contact.created","lead.created","email.received","form.submitted","call.missed","message.received","message.replied","review.received","payment.received","invoice.overdue","booking.created","booking.canceled","webhook.received"]},"source":{"type":"string","enum":["keystone","hubspot","gmail","stripe","quickbooks","googlecalendar","calendly","webhook","any"]},"filters":{"type":"object","properties":{"text":{"type":"string"},"from":{"type":"string"},"subject":{"type":"string"},"max_stars":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"min_stars":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"min_amount":{"type":"number"},"form":{"type":"string"}},"description":"Optional. text matches any field; from and subject are for email; stars for reviews; min_amount in dollars; form is a form id or slug."},"action":{"type":"object","properties":{"kind":{"type":"string","enum":["steps","agent","playbook"]},"steps":{"description":"kind steps: tools to run in order, as the person who makes the trigger.","maxItems":8,"type":"array","items":{"type":"object","properties":{"tool":{"type":"string","description":"A Keystone tool name, or \"notify_owner\" to email the owners and admins (args: subject, message)."},"args":{"description":"Arguments. Use {{name}}, {{first_name}}, {{phone}}, {{email}}, {{summary}}, {{text}}, {{amount_text}}, {{invoice}}, {{stars}}, {{review_id}}, {{starts_at}}, {{business}}, {{event_id}} or {{raw.field}} to fill from the event.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"label":{"type":"string"}},"required":["tool"]}},"agent":{"description":"kind agent: front_desk, account_manager, reviews, ads, bookkeeper.","type":"string"},"instructions":{"description":"kind agent: what the agent should do with the event.","type":"string"},"playbook":{"description":"kind playbook: saved playbook id, slug or name (playbook_list).","type":"string"}},"required":["kind"],"description":"What happens. Leave out when you pass a recipe."},"hourly_cap":{"description":"Most runs an hour. Default 30.","type":"integer","minimum":1,"maximum":500},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/trigger_update":{"post":{"operationId":"trigger_update","summary":"Trigger update","description":"Change a trigger: pause or turn it on (status), rename it, change filters, action or hourly cap. For webhook triggers, paste the sending app's own signing secret (webhook_secret) or make a new one (rotate_secret).","tags":["Workspace setup and connecting apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"trigger_id":{"type":"string","pattern":"^trg_[a-f0-9]{22}$"},"status":{"type":"string","enum":["on","paused"]},"name":{"type":"string","maxLength":120},"filters":{"type":"object","properties":{"text":{"type":"string"},"from":{"type":"string"},"subject":{"type":"string"},"max_stars":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"min_stars":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"min_amount":{"type":"number"},"form":{"type":"string"}},"description":"Optional. text matches any field; from and subject are for email; stars for reviews; min_amount in dollars; form is a form id or slug."},"action":{"type":"object","properties":{"kind":{"type":"string","enum":["steps","agent","playbook"]},"steps":{"description":"kind steps: tools to run in order, as the person who makes the trigger.","maxItems":8,"type":"array","items":{"type":"object","properties":{"tool":{"type":"string","description":"A Keystone tool name, or \"notify_owner\" to email the owners and admins (args: subject, message)."},"args":{"description":"Arguments. Use {{name}}, {{first_name}}, {{phone}}, {{email}}, {{summary}}, {{text}}, {{amount_text}}, {{invoice}}, {{stars}}, {{review_id}}, {{starts_at}}, {{business}}, {{event_id}} or {{raw.field}} to fill from the event.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"label":{"type":"string"}},"required":["tool"]}},"agent":{"description":"kind agent: front_desk, account_manager, reviews, ads, bookkeeper.","type":"string"},"instructions":{"description":"kind agent: what the agent should do with the event.","type":"string"},"playbook":{"description":"kind playbook: saved playbook id, slug or name (playbook_list).","type":"string"}},"required":["kind"],"description":"What happens. Leave out when you pass a recipe."},"hourly_cap":{"type":"integer","minimum":1,"maximum":500},"webhook_secret":{"type":"string","minLength":16,"maxLength":300},"rotate_secret":{"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["trigger_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/trigger_delete":{"post":{"operationId":"trigger_delete","summary":"Trigger delete","description":"Remove a trigger and its run history. Its app subscription is removed too.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"trigger_id":{"type":"string","pattern":"^trg_[a-f0-9]{22}$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["trigger_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"destructive","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/trigger_runs":{"post":{"operationId":"trigger_runs","summary":"Trigger runs","description":"Recent runs of this workspace's triggers (or one trigger): the event that started each, what each step did, and any error.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"trigger_id":{"type":"string","pattern":"^trg_[a-f0-9]{22}$"},"limit":{"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/trigger_test":{"post":{"operationId":"trigger_test","summary":"Trigger test","description":"Try a trigger with a sample event (or one you pass). dry_run (default true) shows the exact steps and arguments it would run without running them. dry_run false runs it for real, so texts and emails go out.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"trigger_id":{"type":"string","pattern":"^trg_[a-f0-9]{22}$"},"dry_run":{"type":"boolean"},"sample":{"description":"Event fields to use, like {\"name\":\"Sarah Miller\",\"phone\":\"+15555550142\"}.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["trigger_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/webhook_subscribe":{"post":{"operationId":"webhook_subscribe","summary":"Webhook subscribe","description":"Subscribe a public HTTPS endpoint to workspace events (contact.created, lead.created, booking.created, payment.received, message.received, form.submitted, call.missed, review.received, invoice.overdue, booking.canceled, email.received, webhook.received, or \"*\" for all events). Returns the signing secret once. Keystone signs every delivery with HMAC-SHA256 over \"<timestamp>.<body>\" in X-Keystone-Signature: v1=<hex> and X-Keystone-Timestamp.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":500,"format":"uri","description":"Public HTTPS endpoint that receives signed POST deliveries."},"events":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","enum":["*","contact.created","lead.created","email.received","form.submitted","call.missed","message.received","message.replied","review.received","payment.received","invoice.overdue","booking.created","booking.canceled","webhook.received"]},"description":"Event types to receive, or [\"*\"] for all events."},"name":{"description":"Short label for this endpoint.","type":"string","minLength":1,"maxLength":120},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["url","events"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/webhook_unsubscribe":{"post":{"operationId":"webhook_unsubscribe","summary":"Webhook unsubscribe","description":"Remove an outbound webhook subscription and stop event deliveries to its endpoint.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"webhook_id":{"type":"string","pattern":"^whk_[a-f0-9]{22}$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["webhook_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"destructive","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/webhooks_list":{"post":{"operationId":"webhooks_list","summary":"Webhooks list","description":"List outbound webhook endpoints in this workspace, their subscribed events, status and last delivery code, plus all available event types.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/webhook_update":{"post":{"operationId":"webhook_update","summary":"Webhook update","description":"Update an outbound webhook endpoint: re-enable or disable it, rename it, change its URL or subscribed events, or rotate its signing secret.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"webhook_id":{"type":"string","pattern":"^whk_[a-f0-9]{22}$"},"name":{"type":"string","minLength":1,"maxLength":120},"url":{"type":"string","maxLength":500,"format":"uri"},"events":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","enum":["*","contact.created","lead.created","email.received","form.submitted","call.missed","message.received","message.replied","review.received","payment.received","invoice.overdue","booking.created","booking.canceled","webhook.received"]}},"status":{"type":"string","enum":["active","disabled"]},"rotate_secret":{"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["webhook_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/webhook_deliveries":{"post":{"operationId":"webhook_deliveries","summary":"Webhook deliveries","description":"Read recent outbound webhook deliveries in this workspace (or for one endpoint), including status, HTTP response code, attempts and errors.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"webhook_id":{"type":"string","pattern":"^whk_[a-f0-9]{22}$"},"limit":{"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/loop_create":{"post":{"operationId":"loop_create","summary":"Loop create","description":"Create a custom Loop in this workspace. A Loop has a schedule (daily, weekly, monthly, interval or five-field cron in the business time zone with flex-minute jitter), a one-time run, a heartbeat, an event or a signed webhook trigger. Its target is a Redshift agent with a goal, a saved skill, or up to eight explicit tool steps. Event Loops can coalesce bursts and use a low-cost condition before the real run.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":80},"description":{"type":"string","maxLength":400},"trigger":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Examples: {kind:\"schedule\",schedule:{kind:\"cron\",cron:\"15 9 * * 1-5\",tz:\"America/New_York\",flex_minutes:20}}, {kind:\"once\",run_at:1735689600000}, {kind:\"event\",event:\"payment.received\",source:\"any\"}, or {kind:\"webhook\"}."},"target_kind":{"default":"agent","type":"string","enum":["agent","skill","steps"]},"agent":{"type":"string","maxLength":80},"skill":{"type":"string","maxLength":80},"task":{"description":"The goal the agent or skill should accomplish.","type":"string","minLength":3,"maxLength":8000},"steps":{"maxItems":8,"type":"array","items":{}},"tools_allowed":{"default":[],"description":"Optional allowlist of Keystone tool names the agent may use. Empty means the agent template default.","maxItems":40,"type":"array","items":{"type":"string","maxLength":80}},"tier":{"description":"Model id from redshift_agents.","type":"string","maxLength":20},"budget_usd":{"default":0,"type":"number","minimum":0,"maximum":100,"description":"Maximum model spend for one run, in USD. 0 uses the model tier limit."},"quiet_on_no_update":{"default":false,"type":"boolean"},"condition":{"description":"Low-cost model pre-filter for event and webhook loops, in plain English.","type":"string","maxLength":2000},"coalesce_key":{"description":"Template such as {{raw.issue.id}}; events with the same key collect into one run.","type":"string","maxLength":200},"coalesce_window_seconds":{"default":0,"type":"integer","minimum":0,"maximum":3600},"correlation_key":{"type":"string","maxLength":200},"hourly_cap":{"default":30,"type":"integer","minimum":1,"maximum":30},"daily_cap":{"default":500,"type":"integer","minimum":1,"maximum":500},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["name","trigger"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/loop_list":{"post":{"operationId":"loop_list","summary":"Loop list","description":"List custom Loops in this workspace with their trigger, target, budget, next run, last status and pause reason.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"default":200,"type":"integer","minimum":1,"maximum":500},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/loop_update":{"post":{"operationId":"loop_update","summary":"Loop update","description":"Pause, resume, or change a custom Loop. Pass only the fields to change. Schedule changes recompute the next run.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":6,"maxLength":80},"enabled":{"type":"boolean"},"trigger":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"task":{"type":"string","minLength":3,"maxLength":8000},"condition":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"quiet_on_no_update":{"type":"boolean"},"tier":{"description":"Model id from redshift_agents.","type":"string","maxLength":20},"hourly_cap":{"type":"integer","minimum":1,"maximum":30},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/loop_run_now":{"post":{"operationId":"loop_run_now","summary":"Loop run now","description":"Start one custom Loop now through the normal queue path. Returns its run id; use loop_runs to inspect the result.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":6,"maxLength":80},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/loop_runs":{"post":{"operationId":"loop_runs","summary":"Loop runs","description":"Read recent custom Loop runs in this workspace, with status, cost, pre-filter decision, summary and error.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"loop_id":{"type":"string","minLength":6,"maxLength":80},"status":{"type":"string","enum":["queued","running","done","quiet","filtered","skipped","waiting","failed"]},"limit":{"default":30,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/loop_fleet_deploy":{"post":{"operationId":"loop_fleet_deploy","summary":"Loop fleet deploy","description":"Agency accounts only: deploy the same custom Loop definition to several workspaces in this account. Rows stay independent so one workspace cannot read or wake another.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_ids":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","minLength":6}},"name":{"type":"string","minLength":2,"maxLength":80},"description":{"type":"string","maxLength":400},"trigger":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"target_kind":{"default":"agent","type":"string","enum":["agent","skill","steps"]},"agent":{"type":"string","maxLength":80},"skill":{"type":"string","maxLength":80},"task":{"type":"string","minLength":3,"maxLength":8000},"tier":{"description":"Model id from redshift_agents.","type":"string","maxLength":20},"budget_usd":{"default":0,"type":"number","minimum":0,"maximum":100,"description":"Maximum model spend for one run, in USD. 0 uses the model tier limit."},"fleet_id":{"type":"string","maxLength":80},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["workspace_ids","name","trigger"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/workflow_create":{"post":{"operationId":"workflow_create","summary":"Workflow create","description":"Build a workflow: when something happens to a contact (the trigger), Keystone walks that contact through steps with waits, if/else branches and goals, like a GoHighLevel workflow. It starts turned off. Show the owner the outline this returns, then call workflow_set_status to turn it on. Steps run top to bottom, one contact at a time. Step types: text {message}, email {subject, body}, call {goal} (an AI phone call), task {title, due_in_days}, tag {add:[...], remove:[...]}, pipeline {stage_id, status, pipeline_id to add a deal}, webhook {url}, ai {prompt} (a Redshift agent does the job), loop {loop_id}, tool {tool, args} (any Keystone tool), wait {minutes} or {until_time:\"09:00\"} or {for_event, timeout_minutes}, branch {if:[{field, op, value}], match:\"all\"|\"any\", yes:[steps], no:[steps]} (fields: tag, email, phone, name, stars, amount, form, text, wait_result, raw.*), end. Messages use {{first_name}}, {{name}}, {{phone}}, {{email}}, {{business}}, {{starts_at}}, {{summary}}. Events: contact.created, lead.created, email.received, form.submitted, call.missed, message.received, message.replied, review.received, payment.received, invoice.overdue, booking.created, booking.canceled, webhook.received, contact.tag_added, opportunity.stage_changed, opportunity.won, opportunity.lost, appointment.booked, appointment.cancelled, contact.unsubscribed. Goals end a contact's run early when that event happens for them (for example booking.created).","tags":["Workspace setup and connecting apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":80},"description":{"type":"string","maxLength":400},"trigger":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"{event, source?, filters?: {tag, stage, form, text, min_stars, max_stars, min_amount}}. Example: {event:\"form.submitted\", filters:{form:\"contact\"}}."},"steps":{"minItems":1,"maxItems":60,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"The steps in order. Give each an id if you plan to edit it later."},"goals":{"description":"[{event, filters?, label?}]","maxItems":5,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"allow_reenter":{"default":false,"description":"Let a contact go through again after they finish.","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["name","trigger","steps"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/workflow_list":{"post":{"operationId":"workflow_list","summary":"Workflow list","description":"List the workflows in this workspace: on or off, trigger, step count, and how many contacts are in each now, reached the goal, finished or hit errors.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"default":100,"type":"integer","minimum":1,"maximum":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/workflow_get":{"post":{"operationId":"workflow_get","summary":"Workflow get","description":"Read one workflow: the full step tree with ids, the outline in plain words, goals, where contacts sit now by step, recent errors, and what did not import from GoHighLevel.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":6,"maxLength":80,"description":"Workflow id from workflow_list."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/workflow_update":{"post":{"operationId":"workflow_update","summary":"Workflow update","description":"Change a workflow. Pass only what changes. steps replaces the whole step tree (keep step ids so contacts already inside stay in place). edit changes one step in place: {step_id, message?, subject?, body?, goal?, minutes?, title?}. Steps run top to bottom, one contact at a time. Step types: text {message}, email {subject, body}, call {goal} (an AI phone call), task {title, due_in_days}, tag {add:[...], remove:[...]}, pipeline {stage_id, status, pipeline_id to add a deal}, webhook {url}, ai {prompt} (a Redshift agent does the job), loop {loop_id}, tool {tool, args} (any Keystone tool), wait {minutes} or {until_time:\"09:00\"} or {for_event, timeout_minutes}, branch {if:[{field, op, value}], match:\"all\"|\"any\", yes:[steps], no:[steps]} (fields: tag, email, phone, name, stars, amount, form, text, wait_result, raw.*), end. Messages use {{first_name}}, {{name}}, {{phone}}, {{email}}, {{business}}, {{starts_at}}, {{summary}}.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":6,"maxLength":80,"description":"Workflow id from workflow_list."},"name":{"type":"string","minLength":2,"maxLength":80},"description":{"type":"string","maxLength":400},"trigger":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"steps":{"minItems":1,"maxItems":60,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"goals":{"maxItems":5,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"allow_reenter":{"type":"boolean"},"edit":{"type":"object","properties":{"step_id":{"type":"string","minLength":1,"maxLength":40},"message":{"type":"string","minLength":1,"maxLength":1600},"subject":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","minLength":1,"maxLength":20000},"goal":{"type":"string","minLength":5,"maxLength":2000},"title":{"type":"string","minLength":1,"maxLength":200},"minutes":{"type":"integer","minimum":1,"maximum":525600}},"required":["step_id"],"additionalProperties":false},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/workflow_set_status":{"post":{"operationId":"workflow_set_status","summary":"Workflow set status","description":"Turn a workflow on or off. On: new contacts that match the trigger start right away, and contacts already inside continue. Off: nobody new starts and contacts inside pause where they are until it is on again. Show the owner the outline from workflow_get before turning it on.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":6,"maxLength":80,"description":"Workflow id from workflow_list."},"on":{"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id","on"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/workflow_enroll":{"post":{"operationId":"workflow_enroll","summary":"Workflow enroll","description":"Put one contact into a workflow now, as if its trigger had fired for them. Give at least a phone, an email or a CRM contact id. The workflow must be on.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":6,"maxLength":80,"description":"Workflow id from workflow_list."},"name":{"type":"string","maxLength":120},"phone":{"type":"string","maxLength":30},"email":{"type":"string","maxLength":254},"contact_id":{"description":"CRM contact id, needed for tag, task and deal steps.","type":"string","maxLength":80},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/workflow_contacts":{"post":{"operationId":"workflow_contacts","summary":"Workflow contacts","description":"Contacts in one workflow, newest activity first: where each one is, its status, errors, and the approval link when a step waits on a person.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":6,"maxLength":80,"description":"Workflow id from workflow_list."},"status":{"type":"string","enum":["active","waiting","held","done","goal","failed","stopped"]},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/workflow_history":{"post":{"operationId":"workflow_history","summary":"Workflow history","description":"Everything that happened to one contact in a workflow, step by step, with the result of each step.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enrollment_id":{"type":"string","minLength":6,"maxLength":80},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["enrollment_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/workflow_remove_contact":{"post":{"operationId":"workflow_remove_contact","summary":"Workflow remove contact","description":"Take one contact out of a workflow now. Nothing else is sent to them from it.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enrollment_id":{"type":"string","minLength":6,"maxLength":80},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["enrollment_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/workflow_import":{"post":{"operationId":"workflow_import","summary":"Workflow import","description":"Import a GoHighLevel workflow from its JSON (the workflow with its triggers and actions). Keystone maps what it can, creates the workflow turned off, and lists every step and trigger it could not map with the reason. Review the list with the owner before turning it on.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflow_json":{"anyOf":[{"type":"string","maxLength":500000},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}],"description":"The GHL workflow as JSON text or an object."},"name":{"type":"string","minLength":2,"maxLength":80},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["workflow_json"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/workflow_delete":{"post":{"operationId":"workflow_delete","summary":"Workflow delete","description":"Delete a workflow, its contact history and its log. Contacts inside it get nothing more from it. This cannot be undone; turning it off keeps the history.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":6,"maxLength":80,"description":"Workflow id from workflow_list."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"destructive","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/swap_scan":{"post":{"operationId":"swap_scan","summary":"Swap scan","description":"Find the software this business pays for that Keystone already includes: schedulers (Calendly, Acuity), call tracking (CallRail), business phone and texting (OpenPhone, Grasshopper, SimpleTexting), review tools (Birdeye, Podium, NiceJob), form builders (Jotform, Typeform), website builders (Squarespace, Wix), rank trackers (BrightLocal, Whitespark), Zapier and Make, link-in-bio, simple CRMs, proposal tools and extra AI chat plans. Reads the receipts and card charges already in Keystone, Ramp and QuickBooks when connected, a card or bank statement CSV the person pastes, and the connected apps. Returns each vendor with its monthly cost, the charges as evidence, what replaces it in Keystone and the monthly and yearly saving after Keystone use and plan. It reads only and contacts no vendor. Agency owners and admins can pass all_clients true (or clients) to scan every client from stored data and get a rollup. Next: swap_plan.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"statement":{"description":"A card or bank statement as CSV text with date, description and amount columns. Only matched lines are kept.","type":"string","maxLength":2000000},"paying_for":{"description":"Vendor keys the person says they pay for, when there is no charge to read.","maxItems":40,"type":"array","items":{"type":"string","enum":["calendly","acuity","setmore","simplybook","youcanbookme","callrail","calltrackingmetrics","whatconverts","openphone","grasshopper","simpletexting","eztexting","textedly","birdeye","podium","nicejob","gatherup","gradeus","jotform","typeform","wufoo","formstack","cognitoforms","squarespace","wix","godaddy_builder","duda","square_online","brightlocal","whitespark","localfalcon","localviking","zapier","make","linktree","beacons","hubspot","pipedrive","lessannoying","pandadoc","proposify","chatgpt","claude","perplexity"]}},"all_clients":{"description":"Agency owners and admins: scan every client workspace from stored data.","type":"boolean"},"clients":{"description":"Agency: only these client workspaces (ids or slugs).","maxItems":60,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/swap_plan":{"post":{"operationId":"swap_plan","summary":"Swap plan","description":"The swap plan for each vendor from the last swap_scan (or one vendor): set up the Keystone replacement, the moves Keystone can run and what each needs from the person (an export file, labels, numbers), run both side by side for 14 days, and the cancel page with its steps and catches. Shows what is already moved (always turned off) or staged. Reads only.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"vendor":{"type":"string","enum":["calendly","acuity","setmore","simplybook","youcanbookme","callrail","calltrackingmetrics","whatconverts","openphone","grasshopper","simpletexting","eztexting","textedly","birdeye","podium","nicejob","gatherup","gradeus","jotform","typeform","wufoo","formstack","cognitoforms","squarespace","wix","godaddy_builder","duda","square_online","brightlocal","whitespark","localfalcon","localviking","zapier","make","linktree","beacons","hubspot","pipedrive","lessannoying","pandadoc","proposify","chatgpt","claude","perplexity"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/swap_move":{"post":{"operationId":"swap_move","summary":"Swap move","description":"Run one step of a vendor swap. Moves: contacts (export CSV into a new Keystone contact list; nothing is sent), forms (a paused Lead form from field labels or the entries export header), zaps (a Zapier, Make or n8n export into paused triggers), numbers (lists numbers and the porting checklist; files and buys nothing), reviews (review requests set up and turned off), booking (booking types on a booking page that stays off), keywords, site, links, proposals (staged lists). Everything Keystone makes starts turned off until the person checks it and turns it on. part running records that the person turned the Keystone side on (Keystone also notices a moved form, trigger, review requests or booking page turned on); both then run for 14 days before cancelling. part cancel stages the vendor cancel page, steps and a Redshift Computer task that stops before the final button; Keystone never cancels. part mark_cancelled records that the person cancelled; dismiss hides a vendor; reopen brings it back.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"vendor":{"type":"string","enum":["calendly","acuity","setmore","simplybook","youcanbookme","callrail","calltrackingmetrics","whatconverts","openphone","grasshopper","simpletexting","eztexting","textedly","birdeye","podium","nicejob","gatherup","gradeus","jotform","typeform","wufoo","formstack","cognitoforms","squarespace","wix","godaddy_builder","duda","square_online","brightlocal","whitespark","localfalcon","localviking","zapier","make","linktree","beacons","hubspot","pipedrive","lessannoying","pandadoc","proposify","chatgpt","claude","perplexity"]},"part":{"type":"string","enum":["contacts","forms","zaps","numbers","reviews","booking","keywords","site","links","proposals","cancel","running","mark_cancelled","dismiss","reopen"]},"file":{"description":"The export file as text (contacts CSV, form entries CSV, automation export).","type":"string","maxLength":3000000},"items":{"description":"Plain lines: form field labels, booking types, keywords, links, packages.","maxItems":100,"type":"array","items":{"type":"string","maxLength":300}},"numbers":{"description":"Phone numbers to bring over.","maxItems":50,"type":"array","items":{"type":"string","maxLength":30}},"template":{"description":"The review request message used today.","type":"string","maxLength":1000},"review_url":{"type":"string","maxLength":500,"format":"uri"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["vendor","part"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/packs_list":{"post":{"operationId":"packs_list","summary":"Packs list","description":"Starter packs by kind of business (dental office, law firm, salon, gym, restaurant, real estate, online store, photographer, consultant, agency): each has ready jobs for the Keystone action bar, skills and triggers. Says which are added in this workspace and which fits it best.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/pack_add":{"post":{"operationId":"pack_add","summary":"Pack add","description":"Add a starter pack to this workspace: saves its skills to the notebook and creates its triggers paused, and its jobs appear in the Keystone action bar. Nothing runs, texts, emails or posts until the owner turns a trigger on or approves a message. Adding the same pack again changes nothing.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pack":{"type":"string","enum":["dental","law","salon","gym","restaurant","real_estate","shop","photographer","consultant","agency"],"description":"The pack: dental (Dental office), law (Law firm), salon (Salon or spa), gym (Gym or studio), restaurant (Restaurant or cafe), real_estate (Real estate agent), shop (Online store), photographer (Photographer), consultant (Consultant or coach), agency (Marketing agency)."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["pack"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/pack_remove":{"post":{"operationId":"pack_remove","summary":"Pack remove","description":"Take a starter pack out of this workspace: deletes the triggers it made and the skills nobody has changed since. Skills someone edited stay.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pack":{"type":"string","enum":["dental","law","salon","gym","restaurant","real_estate","shop","photographer","consultant","agency"],"description":"The pack: dental (Dental office), law (Law firm), salon (Salon or spa), gym (Gym or studio), restaurant (Restaurant or cafe), real_estate (Real estate agent), shop (Online store), photographer (Photographer), consultant (Consultant or coach), agency (Marketing agency)."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["pack"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"destructive","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/bar_jobs":{"post":{"operationId":"bar_jobs","summary":"Bar jobs","description":"The ready jobs in this workspace's action bar (from its starter packs, its kind of business and its saved skills), with the full instructions for each, so you can do one with Keystone tools. Messages to people still wait for the owner's approval.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/switch_from_ghl":{"post":{"operationId":"switch_from_ghl","summary":"Switch from ghl","description":"Drive a GoHighLevel agency switch into Keystone. action=start (owner or admin only) connects the authorized agency import, creates or reuses one Keystone workspace per sub-account and starts the resumable import. action=status returns live progress per sub-account. action=report returns what moved, what needs approval, and what could not move with reasons. It never sends user invites, starts phone ports or changes carrier registration automatically.","tags":["Workspace setup and connecting apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["start","status","report"],"description":"start begins or resumes the agency import; status reads live progress; report reads the final or current report."},"job_id":{"description":"A switch job id returned by an earlier call. Defaults to the latest job for this account.","type":"string","maxLength":80},"run_now":{"default":true,"description":"For start and status (owner or admin only), advance the resumable job one bounded slice before answering.","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["action"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"workspace","x-keystone-needs-approval":false}},"/v1/tools/apps_search":{"post":{"operationId":"apps_search","summary":"Apps search","description":"Find app actions by plain words. Returns a short list with toolkit slugs, action slugs, risk, and which toolkits this workspace has connected.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":200,"description":"What you want to do, in plain words."},"toolkit":{"description":"Catalog slug, such as googleads or hubspot.","type":"string","minLength":1,"maxLength":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["query"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/apps_schema":{"post":{"operationId":"apps_schema","summary":"Apps schema","description":"Get one action input schema before apps_run. Returns its toolkit, required input, risk, description, and connection state for this workspace.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_]+$","description":"Action slug returned by apps_search."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["action"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/apps_run":{"post":{"operationId":"apps_run","summary":"Apps run","description":"Execute a catalog action. Specify the workspace and confirm writes, sends or charges with the user. Call apps_schema first and pass its inputSchema fields in input. Results are capped at about 100 KB. Hosted actions use the shared lookup allowance.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_]+$","description":"Action slug returned by apps_search."},"request_id":{"description":"For a hosted action, generate one UUID and reuse it when retrying that call.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"instant":{"description":"Use the paid, no-setup route when apps_schema marks this action ready. Pass the instantInputSchema fields.","type":"boolean"},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Arguments matching the action inputSchema."},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["action","input"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/bookkeeper_packet":{"post":{"operationId":"bookkeeper_packet","summary":"Bookkeeper packet","description":"Draft a monthly packet for review and approval in the dashboard.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"recipient":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["period","recipient"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/receipts_collect":{"post":{"operationId":"receipts_collect","summary":"Receipts collect","description":"Collect receipts from Ramp, QuickBooks, Gmail, Outlook or an enrolled read-only portal tool. Set schedule to monthly to repeat for each period.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"source":{"default":"ramp","anyOf":[{"type":"string","enum":["ramp","quickbooks","gmail","outlook"]},{"type":"string","pattern":"^portal:[a-z][a-z0-9_]{0,80}$"}]},"schedule":{"type":"string","enum":["monthly","off"]},"cursor":{"type":"string","maxLength":2048},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["period"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/receipts_match":{"post":{"operationId":"receipts_match","summary":"Receipts match","description":"Match by vendor, amount, currency and date in Ramp, or specify a Ramp transaction or QuickBooks purchase or bill.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"transaction_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","pattern":"^quickbooks:(Bill|Purchase):[0-9]{1,30}$"}]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["hash"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/receipts_list":{"post":{"operationId":"receipts_list","summary":"Receipts list","description":"List collected receipt documents and their Ramp transaction IDs.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"after_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"status":{"default":"all","type":"string","enum":["all","matched","unmatched"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["period"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/serp_google":{"post":{"operationId":"serp_google","summary":"Serp google","description":"Fetch live Google organic results and compare against the Web tab to replace poisoned results. Resolve Google goto links to destination URLs. DataForSEO bills for the search and the extra Web tab check. (Paid lookup, a few cents. It runs right away within the workspace daily lookup allowance. Past the allowance it returns needs_approval: share approve_url, then call again with approval_id.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keyword":{"type":"string","minLength":1,"maxLength":300},"location_name":{"default":"United States","type":"string"},"language_code":{"default":"en","type":"string"},"depth":{"default":20,"type":"integer","minimum":10,"maximum":100},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["keyword"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/keyword_volume":{"post":{"operationId":"keyword_volume","summary":"Keyword volume","description":"Get Google Ads search volume, CPC, and competition for up to 100 keywords. DataForSEO bills per call. (Paid lookup, a few cents. It runs right away within the workspace daily lookup allowance. Past the allowance it returns needs_approval: share approve_url, then call again with approval_id.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keywords":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"location_name":{"default":"United States","type":"string"},"language_code":{"default":"en","type":"string"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["keywords"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/ranked_keywords":{"post":{"operationId":"ranked_keywords","summary":"Ranked keywords","description":"Get keywords a domain ranks for in Google, ordered by best position. DataForSEO bills per call. (Paid lookup, a few cents. It runs right away within the workspace daily lookup allowance. Past the allowance it returns needs_approval: share approve_url, then call again with approval_id.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"type":"string","minLength":3,"description":"Domain, e.g. example.com"},"location_name":{"default":"United States","type":"string"},"language_code":{"default":"en","type":"string"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["target"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/backlinks_summary":{"post":{"operationId":"backlinks_summary","summary":"Backlinks summary","description":"Get a domain’s backlink profile, including rank, referring domains, and spam score. DataForSEO bills per call. (Paid lookup, a few cents. It runs right away within the workspace daily lookup allowance. Past the allowance it returns needs_approval: share approve_url, then call again with approval_id.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"type":"string","minLength":3,"description":"Domain, e.g. example.com"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["target"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/serp_google_maps":{"post":{"operationId":"serp_google_maps","summary":"Serp google maps","description":"Get live Google Maps results for a search, from a city or from one exact point (latitude and longitude), for local rank checks and map-pack grids. Returns rank, business name, domain, rating and address. DataForSEO bills per search. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keyword":{"type":"string","minLength":1,"maxLength":300},"location_name":{"description":"City or region, e.g. \"Austin,Texas,United States\". Omit when you pass latitude and longitude.","type":"string","maxLength":200},"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"zoom":{"default":15,"type":"integer","minimum":4,"maximum":21},"language_code":{"default":"en","type":"string"},"depth":{"default":20,"type":"integer","minimum":1,"maximum":100},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["keyword"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/serp_google_ai_mode":{"post":{"operationId":"serp_google_ai_mode","summary":"Serp google AI mode","description":"Get Google AI Mode's live answer for a question, with the sources it cites, to check whether a business is named or cited. DataForSEO bills per search. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keyword":{"type":"string","minLength":1,"maxLength":300,"description":"The question as a buyer would ask it."},"location_name":{"default":"United States","type":"string"},"language_code":{"default":"en","type":"string"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["keyword"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/perplexity_answer":{"post":{"operationId":"perplexity_answer","summary":"Perplexity answer","description":"Ask Perplexity one question live and get its answer and the sources it cites, to check whether a business is named or cited. DataForSEO bills per question, including the model cost. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string","minLength":3,"maxLength":1000},"model_name":{"default":"sonar","type":"string","enum":["sonar","sonar-pro","sonar-reasoning","sonar-reasoning-pro"]},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["question"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/backlinks_referring_domains":{"post":{"operationId":"backlinks_referring_domains","summary":"Backlinks referring domains","description":"List the domains that link to a site, strongest first, to find where a competitor's links come from. DataForSEO bills per call. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"type":"string","minLength":3,"description":"Domain, e.g. example.com"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["target"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/bing_sites":{"post":{"operationId":"bing_sites","summary":"Bing sites","description":"List the sites in Bing Webmaster Tools and their verification status.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/bing_site_stats":{"post":{"operationId":"bing_site_stats","summary":"Bing site stats","description":"Get daily Bing clicks, impressions, and crawl counts for a site.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"string","maxLength":1000,"format":"uri","description":"Exact site URL from bing_sites."},"days":{"default":28,"type":"integer","minimum":1,"maximum":180},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["site"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/bing_crawl_issues":{"post":{"operationId":"bing_crawl_issues","summary":"Bing crawl issues","description":"List URLs Bing had trouble crawling, with the HTTP code, issue, and linking pages.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"string","maxLength":1000,"format":"uri","description":"Exact site URL from bing_sites."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["site"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/bing_list_sitemaps":{"post":{"operationId":"bing_list_sitemaps","summary":"Bing list sitemaps","description":"List the sitemaps Bing knows about, with crawl status and URL counts.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"string","maxLength":1000,"format":"uri","description":"Exact site URL from bing_sites."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["site"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/bing_submit_sitemap":{"post":{"operationId":"bing_submit_sitemap","summary":"Bing submit sitemap","description":"Submit a sitemap to Bing. Use bing_list_sitemaps to check its status.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"string","maxLength":1000,"format":"uri","description":"Exact site URL from bing_sites."},"feed":{"type":"string","minLength":1,"maxLength":500,"description":"A sitemap path or full URL on the same site."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["site","feed"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/eddm_routes":{"post":{"operationId":"eddm_routes","summary":"Eddm routes","description":"List carrier routes and residential, business and total address counts for ZIP codes in an Oppizi city. Omit city_id to list available cities.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"city_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"zips":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"string","pattern":"^\\d{5}$"}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["zips"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/eddm_quote":{"post":{"operationId":"eddm_quote","summary":"Eddm quote","description":"Price the selected carrier routes by size and total address count. Returns a Keystone quote ID and USD prices.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"routes":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"zip":{"type":"string","pattern":"^\\d{5}$"},"croute":{"type":"string","pattern":"^[A-Z]\\d{3}$"}},"required":["zip","croute"]}},"format":{"type":"string","enum":["SMALL","BEST_SELLER","LARGE","JUMBO","OVERSIZED"]},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"city_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["routes","format","quantity","city_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/eddm_campaign_prepare":{"post":{"operationId":"eddm_campaign_prepare","summary":"Eddm campaign prepare","description":"Prepare a draft using a quote and artwork already uploaded to Oppizi. Omit design_id to find an uploaded design. Oppizi creates EDDM drafts in BEST_SELLER size.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"quote_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"design_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":"string","minLength":1,"maxLength":200},"mail_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["quote_id","name","mail_date"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/eddm_campaign_submit":{"post":{"operationId":"eddm_campaign_submit","summary":"Eddm campaign submit","description":"Submit a draft to Oppizi for review, printing and mailing at its exact quoted total. Show the customer the routes, count, total and mail date first. Keystone asks the owner to approve the total before anything is submitted. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"quote_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"approved":{"description":"Deprecated. Ignored; the owner approves through Keystone.","type":"boolean","const":true},"approved_total":{"type":"number","minimum":0},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["quote_id","approved_total"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/eddm_campaign_status":{"post":{"operationId":"eddm_campaign_status","summary":"Eddm campaign status","description":"Check Oppizi status history, artwork and schedule for this workspace’s campaign.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"quote_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["quote_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/ramp_list":{"post":{"operationId":"ramp_list","summary":"Ramp list","description":"List a page of Ramp transactions, bills or receipts.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"resource":{"type":"string","enum":["transactions","bills","receipts"]},"cursor":{"type":"string","maxLength":2048},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["resource"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/quickbooks_list":{"post":{"operationId":"quickbooks_list","summary":"Quickbooks list","description":"List purchases, bills or attached documents in QuickBooks Online.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"type":"string","enum":["Purchase","Bill","Attachable"]},"start":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["entity"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/meta_ads_accounts":{"post":{"operationId":"meta_ads_accounts","summary":"Meta ads accounts","description":"Read the Meta ad account connected to this workspace.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/meta_ads_campaigns":{"post":{"operationId":"meta_ads_campaigns","summary":"Meta ads campaigns","description":"List campaign status, objective, budgets and spend over 7 and 30 days.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/meta_ads_insights":{"post":{"operationId":"meta_ads_insights","summary":"Meta ads insights","description":"Read campaign performance over an inclusive date range.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"since":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"until":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"breakdowns":{"type":"array","items":{"type":"string","enum":["age","gender","country","region","publisher_platform","device_platform"]}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["since","until"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/meta_ads_campaign_create":{"post":{"operationId":"meta_ads_campaign_create","summary":"Meta ads campaign create","description":"Create a paused local traffic or instant-form lead campaign. Budget uses account minor units.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"objective":{"type":"string","enum":["traffic","leads"]},"daily_budget":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"radius_miles":{"type":"integer","minimum":1,"maximum":50},"page_id":{"type":"string","pattern":"^[1-9]\\d{0,24}$"},"form_id":{"type":"string","pattern":"^[1-9]\\d{0,24}$"},"image_url":{"type":"string","format":"uri"},"destination_url":{"type":"string","format":"uri"},"text":{"type":"string","minLength":1,"maxLength":5000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["name","objective","daily_budget","latitude","longitude","radius_miles","page_id","image_url","destination_url","text"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/meta_ads_campaign_enable":{"post":{"operationId":"meta_ads_campaign_enable","summary":"Meta ads campaign enable","description":"Enable a paused campaign and its ads at its exact current total daily budget in account minor units. Keystone asks the owner to approve that budget before anything starts. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","pattern":"^[1-9]\\d{0,24}$"},"approved":{"description":"Deprecated. Ignored; the owner approves through Keystone.","type":"boolean","const":true},"daily_budget":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["campaign_id","daily_budget"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/meta_ads_campaign_pause":{"post":{"operationId":"meta_ads_campaign_pause","summary":"Meta ads campaign pause","description":"Pause delivery for a campaign. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","pattern":"^[1-9]\\d{0,24}$"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["campaign_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/meta_ads_budget_set":{"post":{"operationId":"meta_ads_budget_set","summary":"Meta ads budget set","description":"Change an existing campaign or ad set daily budget within the workspace cap, in account minor units. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target_id":{"type":"string","pattern":"^[1-9]\\d{0,24}$"},"daily_budget":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["target_id","daily_budget"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/callrail_list_companies":{"post":{"operationId":"callrail_list_companies","summary":"Callrail list companies","description":"List companies in the connected CallRail account with their IDs, status, and time zone.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/callrail_call_summary":{"post":{"operationId":"callrail_call_summary","summary":"Callrail call summary","description":"Summarize CallRail calls for a window (default last 7 days): totals, first-time callers, answered, missed, voicemail, good leads, and breakdowns by source and tracking number.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"date_range":{"description":"Preset window (default last_7_days). Ignored when start_date is given.","type":"string","enum":["recent","today","yesterday","last_7_days","last_30_days","this_month","last_month","this_year","last_year","all_time"]},"start_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"end_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"company":{"description":"Company name (or part) or ID; defaults to all companies.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/callrail_list_calls":{"post":{"operationId":"callrail_list_calls","summary":"Callrail list calls","description":"List CallRail calls newest first with source, campaign, keywords, caller, answered status, first-time flag, lead status and score, transcript excerpt, and recording link.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"date_range":{"description":"Preset window (default last_7_days). Ignored when start_date is given.","type":"string","enum":["recent","today","yesterday","last_7_days","last_30_days","this_month","last_month","this_year","last_year","all_time"]},"start_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"end_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"company":{"description":"Company name (or part) or ID.","type":"string","maxLength":200},"source":{"description":"Filter to sources containing this text, such as Google Ads.","type":"string","maxLength":200},"answer_status":{"type":"string","enum":["answered","missed","voicemail"]},"first_time_only":{"default":false,"type":"boolean"},"lead_status":{"type":"string","enum":["good_lead","not_a_lead","previously_marked_good_lead"]},"full_transcripts":{"default":false,"description":"Return full transcripts instead of short excerpts.","type":"boolean"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":250},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/callrail_get_call":{"post":{"operationId":"callrail_get_call","summary":"Callrail get call","description":"Read one CallRail call by ID with the full transcript, lead score and explanation, source attribution, and recording link.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^(?:CAL[a-f0-9]+|\\d+)$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/callrail_list_forms":{"post":{"operationId":"callrail_list_forms","summary":"Callrail list forms","description":"List CallRail form submissions newest first with source, campaign, landing page, lead status, and submitted fields.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"date_range":{"description":"Preset window (default last_7_days). Ignored when start_date is given.","type":"string","enum":["recent","today","yesterday","last_7_days","last_30_days","this_month","last_month","this_year","last_year","all_time"]},"start_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"end_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"company":{"type":"string","maxLength":200},"limit":{"default":50,"type":"integer","minimum":1,"maximum":250},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/whatconverts_list_accounts":{"post":{"operationId":"whatconverts_list_accounts","summary":"Whatconverts list accounts","description":"List WhatConverts accounts and their nested profiles. Requires a Master Account (agency) API key.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"start_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"end_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"accounts_per_page":{"default":50,"type":"integer","minimum":1,"maximum":250},"page_number":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/whatconverts_list_leads":{"post":{"operationId":"whatconverts_list_leads","summary":"Whatconverts list leads","description":"List WhatConverts leads (calls, forms, chats, emails, transactions) with source attribution, quotable status, and values.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"account_id":{"description":"Account ID (when using an agency key).","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"profile_id":{"description":"Profile ID (when using an agency key).","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"lead_type":{"type":"string","enum":["appointment","chat","email","event","other","phone_call","text_message","transaction","web_form"]},"lead_status":{"type":"string","enum":["repeat","unique"]},"quotable":{"type":"string","enum":["yes","no","pending","not_set"]},"start_date":{"description":"Start date (YYYY-MM-DD, UTC). Defaults to today in WhatConverts.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"end_date":{"description":"End date (YYYY-MM-DD, UTC).","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"lead_source":{"type":"string","maxLength":200},"lead_medium":{"type":"string","maxLength":200},"lead_campaign":{"type":"string","maxLength":200},"spam":{"type":"boolean"},"duplicate":{"type":"boolean"},"order":{"default":"desc","type":"string","enum":["asc","desc"]},"leads_per_page":{"default":50,"type":"integer","minimum":1,"maximum":250},"page_number":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/whatconverts_get_lead":{"post":{"operationId":"whatconverts_get_lead","summary":"Whatconverts get lead","description":"Read one WhatConverts lead by lead ID with full attribution, contact fields, and values.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lead_id":{"type":"string","pattern":"^\\d+$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["lead_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/whatconverts_lead_summary":{"post":{"operationId":"whatconverts_lead_summary","summary":"Whatconverts lead summary","description":"Summarize WhatConverts leads for a date range: counts by lead type and marketing source, quotable leads, quote value, and sales value.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"account_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"profile_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"start_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start date (YYYY-MM-DD, UTC)."},"end_date":{"description":"End date (YYYY-MM-DD, UTC).","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"max_leads":{"default":500,"type":"integer","minimum":1,"maximum":1000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["start_date"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/ctm_list_accounts":{"post":{"operationId":"ctm_list_accounts","summary":"Ctm list accounts","description":"List CallTrackingMetrics accounts accessible to this workspace key.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/ctm_list_calls":{"post":{"operationId":"ctm_list_calls","summary":"Ctm list calls","description":"List CallTrackingMetrics calls with source attribution, caller details, duration, status, new-caller flag, and transcript excerpt.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"account_id":{"description":"CTM account ID. Defaults to the first account on the connected key.","type":"string","pattern":"^\\d+$"},"start_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"end_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"filter":{"description":"Search term passed to CTM filter.","type":"string","maxLength":200},"full_transcripts":{"default":false,"type":"boolean"},"per_page":{"default":50,"type":"integer","minimum":1,"maximum":100},"page":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/ctm_call_summary":{"post":{"operationId":"ctm_call_summary","summary":"Ctm call summary","description":"Summarize CallTrackingMetrics calls in a date range: total calls, answered, missed, new callers, talk time, and counts by source and tracking number.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"account_id":{"description":"CTM account ID. Defaults to the first account on the connected key.","type":"string","pattern":"^\\d+$"},"start_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"end_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"max_calls":{"default":500,"type":"integer","minimum":1,"maximum":1000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/ctm_list_numbers":{"post":{"operationId":"ctm_list_numbers","summary":"Ctm list numbers","description":"List tracking phone numbers configured in a CallTrackingMetrics account.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"account_id":{"description":"CTM account ID. Defaults to the first account on the connected key.","type":"string","pattern":"^\\d+$"},"per_page":{"default":50,"type":"integer","minimum":1,"maximum":100},"page":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/ctm_list_forms":{"post":{"operationId":"ctm_list_forms","summary":"Ctm list forms","description":"List FormReactor tracking forms configured in a CallTrackingMetrics account.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"account_id":{"description":"CTM account ID. Defaults to the first account on the connected key.","type":"string","pattern":"^\\d+$"},"per_page":{"default":50,"type":"integer","minimum":1,"maximum":100},"page":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/brightlocal_list_locations":{"post":{"operationId":"brightlocal_list_locations","summary":"Brightlocal list locations","description":"List business locations in BrightLocal with address, phone, client ID, and status.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"default":50,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/brightlocal_get_location":{"post":{"operationId":"brightlocal_get_location","summary":"Brightlocal get location","description":"Read one BrightLocal location profile by location ID.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"location_id":{"type":"string","pattern":"^[a-z0-9_-]{1,64}$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["location_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/brightlocal_list_clients":{"post":{"operationId":"brightlocal_list_clients","summary":"Brightlocal list clients","description":"List agency clients configured in BrightLocal.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"default":50,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/brightlocal_rank_reports":{"post":{"operationId":"brightlocal_rank_reports","summary":"Brightlocal rank reports","description":"List Local Rank Tracker (lrt) or Local Search Grid (lsg) reports in BrightLocal, or read one report by report_id.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"report_type":{"default":"lrt","description":"lrt for Local Rank Tracker, lsg for Local Search Grid.","type":"string","enum":["lrt","lsg"]},"report_id":{"description":"Pass a report ID to fetch one report; omit to list reports.","type":"string","pattern":"^[a-z0-9_-]{1,64}$"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/brightlocal_reputation_reviews":{"post":{"operationId":"brightlocal_reputation_reviews","summary":"Brightlocal reputation reviews","description":"List BrightLocal Reputation Manager reports, or read customer reviews from a specific Reputation Manager report.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"report_id":{"description":"Pass a Reputation Manager report ID to read its reviews; omit to list reports.","type":"string","pattern":"^[a-z0-9_-]{1,64}$"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/whitespark_list_grids":{"post":{"operationId":"whitespark_list_grids","summary":"Whitespark list grids","description":"List Whitespark Local Ranking Grids with business name, keyword, visibility score, average rank, and review score.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"page":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"per_page":{"default":50,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/whitespark_get_grid":{"post":{"operationId":"whitespark_get_grid","summary":"Whitespark get grid","description":"Read one Whitespark ranking grid and its recent scan runs.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"grid_id":{"type":"string","pattern":"^[a-z0-9_-]{1,64}$"},"runs_limit":{"default":10,"type":"integer","minimum":1,"maximum":50},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["grid_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/whitespark_get_run_points":{"post":{"operationId":"whitespark_get_run_points","summary":"Whitespark get run points","description":"Read one Whitespark grid scan run and every scanned map point with coordinates and business rank.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"grid_id":{"type":"string","pattern":"^[a-z0-9_-]{1,64}$"},"run_id":{"type":"string","pattern":"^[a-z0-9_-]{1,64}$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["grid_id","run_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/whitespark_get_run_competitors":{"post":{"operationId":"whitespark_get_run_competitors","summary":"Whitespark get run competitors","description":"List local map competitors detected in a Whitespark ranking grid scan run.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"grid_id":{"type":"string","pattern":"^[a-z0-9_-]{1,64}$"},"run_id":{"type":"string","pattern":"^[a-z0-9_-]{1,64}$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["grid_id","run_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/birdeye_get_business":{"post":{"operationId":"birdeye_get_business","summary":"Birdeye get business","description":"Read a Birdeye business profile, address, contact info, average rating, and review count.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"business_id":{"description":"Child location business ID; defaults to the connected business ID.","type":"string","pattern":"^[a-z0-9_-]{1,64}$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/birdeye_list_locations":{"post":{"operationId":"birdeye_list_locations","summary":"Birdeye list locations","description":"List child business locations under a parent or enterprise Birdeye business ID.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"business_id":{"description":"Child location business ID; defaults to the connected business ID.","type":"string","pattern":"^[a-z0-9_-]{1,64}$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/birdeye_review_summary":{"post":{"operationId":"birdeye_review_summary","summary":"Birdeye review summary","description":"Read aggregate Birdeye review counts and average star rating for a business location.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"business_id":{"description":"Child location business ID; defaults to the connected business ID.","type":"string","pattern":"^[a-z0-9_-]{1,64}$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/birdeye_list_reviews":{"post":{"operationId":"birdeye_list_reviews","summary":"Birdeye list reviews","description":"List Birdeye customer reviews with rating, source, reviewer, review date, comment, and owner response.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"business_id":{"description":"Child location business ID; defaults to the connected business ID.","type":"string","pattern":"^[a-z0-9_-]{1,64}$"},"from_date":{"description":"Start date (YYYY-MM-DD).","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to_date":{"description":"End date (YYYY-MM-DD).","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"sources":{"description":"Filter to sources such as Google or Facebook.","maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"ratings":{"description":"Filter to specific star ratings (1 to 5).","maxItems":5,"type":"array","items":{"type":"integer","minimum":1,"maximum":5}},"sindex":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"count":{"default":25,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/workiz_list_jobs":{"post":{"operationId":"workiz_list_jobs","summary":"Workiz list jobs","description":"List Workiz jobs with schedule, status, source, customer, address, and totals.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"start_date":{"description":"Return jobs on or after this date (YYYY-MM-DD).","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"only_open":{"description":"Only return open jobs.","type":"boolean"},"status":{"type":"string","maxLength":60},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"records":{"default":50,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/workiz_get_job":{"post":{"operationId":"workiz_get_job","summary":"Workiz get job","description":"Read one Workiz job by UUID with customer details, notes, line items, and totals.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"uuid":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["uuid"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/workiz_list_leads":{"post":{"operationId":"workiz_list_leads","summary":"Workiz list leads","description":"List Workiz leads with source, status, contact info, and notes.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"start_date":{"description":"Return leads on or after this date (YYYY-MM-DD).","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"only_open":{"type":"boolean"},"status":{"type":"string","maxLength":60},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"records":{"default":50,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/workiz_list_invoices":{"post":{"operationId":"workiz_list_invoices","summary":"Workiz list invoices","description":"List Workiz invoices with payment status, balances, amounts, and linked jobs and clients.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"start_date":{"description":"Return invoices on or after this date (YYYY-MM-DD).","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"records":{"default":50,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/workiz_list_clients":{"post":{"operationId":"workiz_list_clients","summary":"Workiz list clients","description":"List Workiz clients with contact details and service addresses.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"records":{"default":50,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/fieldpulse_list_customers":{"post":{"operationId":"fieldpulse_list_customers","summary":"Fieldpulse list customers","description":"List or search FieldPulse customers with contact info and billing address.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"search":{"description":"Search filter.","type":"string","maxLength":200},"page":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"limit":{"default":25,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/fieldpulse_list_jobs":{"post":{"operationId":"fieldpulse_list_jobs","summary":"Fieldpulse list jobs","description":"List or search FieldPulse jobs with schedule, status, customer ID, and assigned technicians.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"search":{"description":"Search filter.","type":"string","maxLength":200},"page":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"limit":{"default":25,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/fieldpulse_list_invoices":{"post":{"operationId":"fieldpulse_list_invoices","summary":"Fieldpulse list invoices","description":"List or search FieldPulse invoices with totals, balance due, status, and due date.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"search":{"description":"Search filter.","type":"string","maxLength":200},"page":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"limit":{"default":25,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/fieldpulse_list_estimates":{"post":{"operationId":"fieldpulse_list_estimates","summary":"Fieldpulse list estimates","description":"List or search FieldPulse estimates with customer ID, status, and totals.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"search":{"description":"Search filter.","type":"string","maxLength":200},"page":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"limit":{"default":25,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/companycam_list_projects":{"post":{"operationId":"companycam_list_projects","summary":"Companycam list projects","description":"List or search CompanyCam jobsite projects with address, status, and photo count.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"description":"Search projects by name or address.","type":"string","maxLength":200},"page":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"per_page":{"default":25,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/companycam_get_project":{"post":{"operationId":"companycam_get_project","summary":"Companycam get project","description":"Read one CompanyCam jobsite project by project ID.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string","pattern":"^[a-z0-9_-]{1,64}$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["project_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/companycam_list_photos":{"post":{"operationId":"companycam_list_photos","summary":"Companycam list photos","description":"List CompanyCam jobsite photos across the company or for one project.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"description":"Pass a project ID to list only photos in that project.","type":"string","pattern":"^[a-z0-9_-]{1,64}$"},"start_time":{"description":"Unix timestamp (seconds) lower bound.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"end_time":{"description":"Unix timestamp (seconds) upper bound.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"page":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"per_page":{"default":25,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/companycam_list_users":{"post":{"operationId":"companycam_list_users","summary":"Companycam list users","description":"List users and field technicians in the connected CompanyCam company.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"page":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"per_page":{"default":50,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gorilladesk_list_customers":{"post":{"operationId":"gorilladesk_list_customers","summary":"Gorilladesk list customers","description":"List GorillaDesk customers with contact info, company, status, and service locations.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"page":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"limit":{"default":25,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gorilladesk_list_jobs":{"post":{"operationId":"gorilladesk_list_jobs","summary":"Gorilladesk list jobs","description":"List GorillaDesk jobs with schedule, status, customer ID, service type, and technician assignment.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"start_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"end_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"status":{"type":"string","maxLength":60},"page":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"limit":{"default":25,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gorilladesk_list_invoices":{"post":{"operationId":"gorilladesk_list_invoices","summary":"Gorilladesk list invoices","description":"List GorillaDesk invoices with customer ID, status, totals, balance due, and dates.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","maxLength":60},"page":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"limit":{"default":25,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gorilladesk_list_estimates":{"post":{"operationId":"gorilladesk_list_estimates","summary":"Gorilladesk list estimates","description":"List GorillaDesk estimates with customer ID, status, and totals.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"page":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"limit":{"default":25,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/permits_search":{"post":{"operationId":"permits_search","summary":"Permits search","description":"Search building permits by area or property address. Filter by work, status, dates, valuation or contractor. See coverage and source for each search.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"where":{"anyOf":[{"anyOf":[{"type":"object","properties":{"state":{"type":"string","pattern":"^[A-Z]{2}$"},"county_fips":{"type":"string","pattern":"^\\d{5}$"}},"required":["state","county_fips"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":120}},"required":["state","city"],"additionalProperties":false},{"type":"object","properties":{"zip":{"type":"string","pattern":"^\\d{5}$"}},"required":["zip"],"additionalProperties":false},{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180},"radius_m":{"type":"number","exclusiveMinimum":0,"maximum":50000}},"required":["lat","lng","radius_m"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["state"],"additionalProperties":false}],"description":"Search by state and county FIPS, state and city, ZIP, point and radius in metres, or state."},{"type":"object","properties":{"parcel":{"anyOf":[{"type":"object","properties":{"address":{"type":"string","minLength":1,"maxLength":256,"description":"Full US street address, including city, state, and ZIP code."}},"required":["address"],"additionalProperties":false},{"type":"object","properties":{"parcel_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["parcel_id"],"additionalProperties":false},{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false}]}},"required":["parcel"],"additionalProperties":false}]},"filters":{"type":"object","properties":{"work_tags":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$","description":"Mireye work tag, for example roof, hvac, solar or new_building."}},"status":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","enum":["in_review","active","final","inactive","unknown"]}},"date_field":{"type":"string","enum":["filed","issued","finaled","earliest"]},"date_from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"date_to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"valuation_min_usd":{"type":"number","minimum":0},"valuation_max_usd":{"type":"number","minimum":0},"contractor":{"type":"string","minLength":2,"maxLength":120},"contractor_id":{"type":"string","minLength":1,"maxLength":120},"include_undated":{"type":"boolean"}},"additionalProperties":false},"limit":{"default":25,"description":"Results per page. Use zero for a free count.","type":"integer","minimum":0,"maximum":100},"cursor":{"description":"Pass next_cursor with the same search to fetch its next page.","type":"string","minLength":1,"maxLength":2000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["where"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/property_permits":{"post":{"operationId":"property_permits","summary":"Property permits","description":"Read the recorded permit history for one property address or Mireye parcel ID, including older and undated permits.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"parcel":{"anyOf":[{"type":"object","properties":{"address":{"type":"string","minLength":1,"maxLength":256,"description":"Full US street address, including city, state, and ZIP code."}},"required":["address"],"additionalProperties":false},{"type":"object","properties":{"parcel_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["parcel_id"],"additionalProperties":false},{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false}]},"limit":{"default":100,"description":"Results per page. Use zero for a free count.","type":"integer","minimum":0,"maximum":100},"cursor":{"description":"Pass next_cursor with the same search to fetch its next page.","type":"string","minLength":1,"maxLength":2000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["parcel"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/contractor_permits":{"post":{"operationId":"contractor_permits","summary":"Contractor permits","description":"Find permits for a contractor in an area by name or Mireye contractor ID.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"area":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","pattern":"^[A-Z]{2}$"},"county_fips":{"type":"string","pattern":"^\\d{5}$"}},"required":["state","county_fips"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":120}},"required":["state","city"],"additionalProperties":false},{"type":"object","properties":{"zip":{"type":"string","pattern":"^\\d{5}$"}},"required":["zip"],"additionalProperties":false},{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180},"radius_m":{"type":"number","exclusiveMinimum":0,"maximum":50000}},"required":["lat","lng","radius_m"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["state"],"additionalProperties":false}],"description":"Search by state and county FIPS, state and city, ZIP, point and radius in metres, or state."},"contractor":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120}},"required":["name"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120}},"required":["id"],"additionalProperties":false}]},"filters":{"type":"object","properties":{"work_tags":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$","description":"Mireye work tag, for example roof, hvac, solar or new_building."}},"status":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","enum":["in_review","active","final","inactive","unknown"]}},"date_field":{"type":"string","enum":["filed","issued","finaled","earliest"]},"date_from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"date_to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"valuation_min_usd":{"type":"number","minimum":0},"valuation_max_usd":{"type":"number","minimum":0},"contractor":{"type":"string","minLength":2,"maxLength":120},"contractor_id":{"type":"string","minLength":1,"maxLength":120},"include_undated":{"type":"boolean"}},"additionalProperties":false},"limit":{"default":25,"description":"Results per page. Use zero for a free count.","type":"integer","minimum":0,"maximum":100},"cursor":{"description":"Pass next_cursor with the same search to fetch its next page.","type":"string","minLength":1,"maxLength":2000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["area","contractor"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/property_lookup":{"post":{"operationId":"property_lookup","summary":"Property lookup","description":"Single-source building data from ATTOM: property details, owner and construction year. Include the estimated value with a separate ATTOM lookup.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","minLength":1,"maxLength":256,"description":"Full US street address, including city, state, and ZIP code."},"include_valuation":{"default":true,"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["address"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/property_sales":{"post":{"operationId":"property_sales","summary":"Property sales","description":"Read the recorded sales history for one address from ATTOM Data.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","minLength":1,"maxLength":256,"description":"Full US street address, including city, state, and ZIP code."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["address"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/owner_lookup":{"post":{"operationId":"owner_lookup","summary":"Owner lookup","description":"Find owner phone numbers, emails and mailing addresses for one property. Use BatchData for licensed business purposes. Exclude consumer eligibility and covered-person targeting. Contact data carries no consent. Check Do Not Call lists, TCPA, CAN-SPAM and applicable privacy rules, and obtain any required consent before outreach.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"object","properties":{"street":{"type":"string","minLength":1,"maxLength":200},"city":{"type":"string","minLength":1,"maxLength":100},"state":{"type":"string","pattern":"^[A-Z]{2}$"},"zip":{"type":"string","pattern":"^\\d{5}(?:-\\d{4})?$"}},"required":["street","city","state"]},"certified_use":{"type":"boolean","const":true,"description":"Confirm this use complies with BatchData’s license and excludes FCRA-regulated eligibility or screening."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["address","certified_use"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/property_list_build":{"post":{"operationId":"property_list_build","summary":"Property list build","description":"Search property records by city, county or ZIP, with owner and valuation filters. Use BatchData for licensed business purposes. Exclude consumer eligibility and covered-person targeting.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"area":{"type":"string","minLength":1,"maxLength":120,"description":"City and state, county and state, or ZIP code."},"quick_list":{"type":"string","enum":["absentee-owner","out-of-state-owner","owner-occupied","corporate-owned","vacant"]},"property_type":{"description":"BatchData property type, for example Single Family.","type":"string","minLength":1,"maxLength":80},"minimum_value":{"type":"integer","minimum":0,"maximum":9007199254740991},"maximum_value":{"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"default":10,"description":"Properties per page. Zero requests a count and costs one record.","type":"integer","minimum":0,"maximum":25},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"certified_use":{"type":"boolean","const":true,"description":"Confirm this use complies with BatchData’s license and excludes FCRA-regulated eligibility or screening."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["area","certified_use"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/parcel_lookup":{"post":{"operationId":"parcel_lookup","summary":"Parcel lookup","description":"Parcel geometry from one provider: find US parcel boundaries and assessor attributes by street address or map point. Returns GeoJSON.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"location":{"anyOf":[{"type":"object","properties":{"address":{"type":"string","minLength":1,"maxLength":256,"description":"Full US street address, including city, state, and ZIP code."}},"required":["address"],"additionalProperties":false},{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lon"],"additionalProperties":false}]},"limit":{"default":1,"type":"integer","minimum":1,"maximum":10},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["location"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/ga4_create_key_event":{"post":{"operationId":"ga4_create_key_event","summary":"GA4 create key event","description":"Mark a GA4 event as a key event in a bound property.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"property":{"type":"string","pattern":"^(?:properties\\/)?\\d{1,30}$"},"dry_run":{"default":false,"description":"Check input and workspace binding without creating anything.","type":"boolean"},"event_name":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,39}$"},"counting_method":{"default":"ONCE_PER_EVENT","type":"string","enum":["ONCE_PER_EVENT","ONCE_PER_SESSION"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["property","event_name"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/ga4_list_data_streams":{"post":{"operationId":"ga4_list_data_streams","summary":"GA4 list data streams","description":"List the data stream IDs and display names of a bound GA4 property.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"property":{"type":"string","pattern":"^(?:properties\\/)?\\d{1,30}$"},"pageToken":{"type":"string","maxLength":2000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["property"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/ga4_list_measurement_protocol_secrets":{"post":{"operationId":"ga4_list_measurement_protocol_secrets","summary":"GA4 list measurement protocol secrets","description":"List Measurement Protocol credential names for a data stream in the bound GA4 property.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"property":{"type":"string","pattern":"^(?:properties\\/)?\\d{1,30}$"},"stream_id":{"type":"string","pattern":"^\\d{1,30}$"},"pageToken":{"type":"string","maxLength":2000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["property","stream_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/ga4_create_measurement_protocol_secret":{"post":{"operationId":"ga4_create_measurement_protocol_secret","summary":"GA4 create measurement protocol secret","description":"Create a Measurement Protocol credential for a bound GA4 data stream. Use GA4 Admin to retrieve its value for the server that sends events.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"property":{"type":"string","pattern":"^(?:properties\\/)?\\d{1,30}$"},"stream_id":{"type":"string","pattern":"^\\d{1,30}$"},"display_name":{"type":"string","minLength":1,"maxLength":200},"dry_run":{"default":false,"description":"Check input and workspace binding without creating anything.","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["property","stream_id","display_name"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gtm_create_tag":{"post":{"operationId":"gtm_create_tag","summary":"Gtm create tag","description":"Create a draft tag using a GTM template type and parameters. Supports GA4 events, Google Ads conversion tracking and website call tracking.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"container":{"type":"string","pattern":"^accounts\\/\\d{1,30}\\/containers\\/\\d{1,30}$"},"workspace_id":{"type":"string","pattern":"^\\d{1,30}$"},"dry_run":{"default":false,"description":"Check input and workspace binding without creating anything.","type":"boolean"},"entity":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"notes":{"type":"string","maxLength":2000},"type":{"type":"string","minLength":1,"maxLength":100},"parameter":{"maxItems":100,"type":"array","items":{"$ref":"#/$defs/__schema0"}},"firingTriggerId":{"maxItems":100,"type":"array","items":{"type":"string","pattern":"^\\d{1,30}$"}},"blockingTriggerId":{"maxItems":100,"type":"array","items":{"type":"string","pattern":"^\\d{1,30}$"}},"tagFiringOption":{"type":"string","enum":["unlimited","oncePerEvent","oncePerLoad"]},"paused":{"type":"boolean"},"consentSettings":{"type":"object","properties":{"consentStatus":{"type":"string","enum":["notSet","notNeeded","needed"]},"consentType":{"$ref":"#/$defs/__schema0"}},"required":["consentStatus"]}},"required":["name","type"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["container","workspace_id","entity"],"$defs":{"__schema0":{"type":"object","properties":{"type":{"type":"string","enum":["boolean","integer","list","map","template","triggerReference","tagReference"]},"key":{"type":"string","maxLength":200},"value":{"type":"string","maxLength":30000},"list":{"maxItems":100,"type":"array","items":{"$ref":"#/$defs/__schema0"}},"map":{"maxItems":100,"type":"array","items":{"$ref":"#/$defs/__schema0"}},"isWeakReference":{"type":"boolean"}},"required":["type"]}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gtm_create_trigger":{"post":{"operationId":"gtm_create_trigger","summary":"Gtm create trigger","description":"Create a draft trigger for a custom data layer event, page view, click or form submission.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"container":{"type":"string","pattern":"^accounts\\/\\d{1,30}\\/containers\\/\\d{1,30}$"},"workspace_id":{"type":"string","pattern":"^\\d{1,30}$"},"dry_run":{"default":false,"description":"Check input and workspace binding without creating anything.","type":"boolean"},"entity":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"notes":{"type":"string","maxLength":2000},"type":{"type":"string","enum":["pageview","domReady","windowLoaded","customEvent","click","linkClick","formSubmission","always"]},"filter":{"maxItems":30,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["equals","contains","startsWith","endsWith","matchRegex","cssSelector","urlMatches","less","lessOrEquals","greater","greaterOrEquals"]},"parameter":{"minItems":2,"maxItems":4,"type":"array","items":{"$ref":"#/$defs/__schema0"}}},"required":["type","parameter"]}},"customEventFilter":{"maxItems":30,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["equals","contains","startsWith","endsWith","matchRegex","cssSelector","urlMatches","less","lessOrEquals","greater","greaterOrEquals"]},"parameter":{"minItems":2,"maxItems":4,"type":"array","items":{"$ref":"#/$defs/__schema0"}}},"required":["type","parameter"]}},"autoEventFilter":{"maxItems":30,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["equals","contains","startsWith","endsWith","matchRegex","cssSelector","urlMatches","less","lessOrEquals","greater","greaterOrEquals"]},"parameter":{"minItems":2,"maxItems":4,"type":"array","items":{"$ref":"#/$defs/__schema0"}}},"required":["type","parameter"]}},"waitForTags":{"$ref":"#/$defs/__schema0"},"checkValidation":{"$ref":"#/$defs/__schema0"},"waitForTagsTimeout":{"$ref":"#/$defs/__schema0"}},"required":["name","type"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["container","workspace_id","entity"],"$defs":{"__schema0":{"type":"object","properties":{"type":{"type":"string","enum":["boolean","integer","list","map","template","triggerReference","tagReference"]},"key":{"type":"string","maxLength":200},"value":{"type":"string","maxLength":30000},"list":{"maxItems":100,"type":"array","items":{"$ref":"#/$defs/__schema0"}},"map":{"maxItems":100,"type":"array","items":{"$ref":"#/$defs/__schema0"}},"isWeakReference":{"type":"boolean"}},"required":["type"]}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gtm_create_variable":{"post":{"operationId":"gtm_create_variable","summary":"Gtm create variable","description":"Create a draft variable using its GTM type and parameters.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"container":{"type":"string","pattern":"^accounts\\/\\d{1,30}\\/containers\\/\\d{1,30}$"},"workspace_id":{"type":"string","pattern":"^\\d{1,30}$"},"dry_run":{"default":false,"description":"Check input and workspace binding without creating anything.","type":"boolean"},"entity":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"notes":{"type":"string","maxLength":2000},"type":{"type":"string","minLength":1,"maxLength":100},"parameter":{"maxItems":100,"type":"array","items":{"$ref":"#/$defs/__schema0"}}},"required":["name","type"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["container","workspace_id","entity"],"$defs":{"__schema0":{"type":"object","properties":{"type":{"type":"string","enum":["boolean","integer","list","map","template","triggerReference","tagReference"]},"key":{"type":"string","maxLength":200},"value":{"type":"string","maxLength":30000},"list":{"maxItems":100,"type":"array","items":{"$ref":"#/$defs/__schema0"}},"map":{"maxItems":100,"type":"array","items":{"$ref":"#/$defs/__schema0"}},"isWeakReference":{"type":"boolean"}},"required":["type"]}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gtm_create_version":{"post":{"operationId":"gtm_create_version","summary":"Gtm create version","description":"Save the draft as a container version. Google replaces the source Tag Manager workspace when the version is created.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"container":{"type":"string","pattern":"^accounts\\/\\d{1,30}\\/containers\\/\\d{1,30}$"},"workspace_id":{"type":"string","pattern":"^\\d{1,30}$"},"name":{"type":"string","minLength":1,"maxLength":200},"notes":{"type":"string","maxLength":2000},"dry_run":{"default":false,"description":"Check input and workspace binding without creating anything.","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["container","workspace_id","name"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gtm_publish_version":{"post":{"operationId":"gtm_publish_version","summary":"Gtm publish version","description":"Publish this Tag Manager version to the live container. Its tags can start firing on sites using this container.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"container":{"type":"string","pattern":"^accounts\\/\\d{1,30}\\/containers\\/\\d{1,30}$"},"version_id":{"type":"string","pattern":"^\\d{1,30}$"},"fingerprint":{"type":"string","pattern":"^\\d{1,30}$"},"dry_run":{"default":false,"description":"Check input and workspace binding without creating anything.","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["container","version_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gsc_list_sites":{"post":{"operationId":"gsc_list_sites","summary":"Search Console list sites","description":"List Search Console properties bound to this workspace.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gsc_search_analytics":{"post":{"operationId":"gsc_search_analytics","summary":"Search Console search analytics","description":"Get Search Console clicks, impressions, CTR, and position by query, page, country, device, or date.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"string","minLength":1,"maxLength":1000,"description":"Exact siteUrl from gsc_list_sites, including any sc-domain: prefix."},"startDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"endDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"dimensions":{"default":["query"],"maxItems":5,"type":"array","items":{"type":"string","enum":["query","page","device","country","date"]}},"rowLimit":{"default":25,"type":"integer","minimum":1,"maximum":200},"filters":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","enum":["query","page","device","country"]},"operator":{"default":"contains","type":"string","enum":["contains","equals","notContains","notEquals","includingRegex","excludingRegex"]},"expression":{"type":"string","maxLength":4096}},"required":["dimension","expression"]}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["site","startDate","endDate"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gsc_inspect_url":{"post":{"operationId":"gsc_inspect_url","summary":"Search Console inspect URL","description":"Check a URL’s Search Console index status, last crawl, and canonical URL.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"string","minLength":1,"maxLength":1000,"description":"Exact siteUrl from gsc_list_sites, including any sc-domain: prefix."},"url":{"type":"string","maxLength":2000,"format":"uri"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["site","url"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gsc_list_sitemaps":{"post":{"operationId":"gsc_list_sitemaps","summary":"Search Console list sitemaps","description":"List Search Console sitemaps, including the last download and error counts.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"string","minLength":1,"maxLength":1000,"description":"Exact siteUrl from gsc_list_sites, including any sc-domain: prefix."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["site"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/ga4_list_properties":{"post":{"operationId":"ga4_list_properties","summary":"GA4 list properties","description":"List GA4 properties bound to this workspace.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"pageToken":{"type":"string","maxLength":2000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/ga4_run_report":{"post":{"operationId":"ga4_run_report","summary":"GA4 run report","description":"Run a GA4 report with metrics such as sessions and activeUsers, and dimensions such as date or sessionDefaultChannelGroup.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"property":{"description":"GA4 property ID or properties/ID from ga4_list_properties.","type":"string","pattern":"^(?:properties\\/)?\\d{1,30}$"},"startDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"string","pattern":"^(today|yesterday|\\d{1,4}daysAgo)$"}]},"endDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"string","pattern":"^(today|yesterday|\\d{1,4}daysAgo)$"}]},"metrics":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"dimensions":{"maxItems":9,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"orderBy":{"description":"A selected metric or dimension. Prefix with - for descending order.","type":"string"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["property","startDate","endDate","metrics"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/ga4_realtime":{"post":{"operationId":"ga4_realtime","summary":"GA4 realtime","description":"Get active GA4 users over the last 30 minutes by country and device category.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"property":{"description":"GA4 property ID or properties/ID from ga4_list_properties.","type":"string","pattern":"^(?:properties\\/)?\\d{1,30}$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["property"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gsc_submit_sitemap":{"post":{"operationId":"gsc_submit_sitemap","summary":"Search Console submit sitemap","description":"Submit a sitemap for a bound Search Console site.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"string","minLength":1,"maxLength":1000,"description":"Exact siteUrl from gsc_list_sites, including any sc-domain: prefix."},"sitemap":{"type":"string","maxLength":2048,"format":"uri"},"dry_run":{"default":false,"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["site","sitemap"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/ga4_metadata":{"post":{"operationId":"ga4_metadata","summary":"GA4 metadata","description":"Read available dimensions and metrics for a bound GA4 property.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"property":{"description":"GA4 property ID or properties/ID from ga4_list_properties.","type":"string","pattern":"^(?:properties\\/)?\\d{1,30}$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["property"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gtm_list_containers":{"post":{"operationId":"gtm_list_containers","summary":"Gtm list containers","description":"List Tag Manager containers bound to this workspace.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gtm_list_workspaces":{"post":{"operationId":"gtm_list_workspaces","summary":"Gtm list workspaces","description":"List workspaces in a bound Tag Manager container.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"container":{"type":"string","pattern":"^accounts\\/\\d+\\/containers\\/\\d+$"},"pageToken":{"type":"string","maxLength":2000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["container"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gtm_list_tags":{"post":{"operationId":"gtm_list_tags","summary":"Gtm list tags","description":"List tags in a Tag Manager workspace within a bound container.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"container":{"type":"string","pattern":"^accounts\\/\\d+\\/containers\\/\\d+$"},"workspaceId":{"type":"string","pattern":"^\\d+$"},"pageToken":{"type":"string","maxLength":2000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["container","workspaceId"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gtm_list_triggers":{"post":{"operationId":"gtm_list_triggers","summary":"Gtm list triggers","description":"List triggers in a Tag Manager workspace within a bound container.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"container":{"type":"string","pattern":"^accounts\\/\\d+\\/containers\\/\\d+$"},"workspaceId":{"type":"string","pattern":"^\\d+$"},"pageToken":{"type":"string","maxLength":2000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["container","workspaceId"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gtm_list_variables":{"post":{"operationId":"gtm_list_variables","summary":"Gtm list variables","description":"List variables in a Tag Manager workspace within a bound container.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"container":{"type":"string","pattern":"^accounts\\/\\d+\\/containers\\/\\d+$"},"workspaceId":{"type":"string","pattern":"^\\d+$"},"pageToken":{"type":"string","maxLength":2000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["container","workspaceId"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gbp_list_accounts":{"post":{"operationId":"gbp_list_accounts","summary":"Business Profile list accounts","description":"List only Business Profile accounts accepted and bound to this workspace.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gbp_list_locations":{"post":{"operationId":"gbp_list_locations","summary":"Business Profile list locations","description":"List locations from account groups or individual locations accepted and bound to this workspace.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"account":{"type":"string","pattern":"^accounts\\/\\d{1,30}$","description":"Account resource name from gbp_list_accounts."},"pageToken":{"type":"string","maxLength":2000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gbp_list_reviews":{"post":{"operationId":"gbp_list_reviews","summary":"Business Profile list reviews","description":"List reviews for a location bound to this workspace. Pass nextPageToken as pageToken to continue.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"account":{"type":"string","pattern":"^accounts\\/\\d{1,30}$","description":"Account resource name from gbp_list_accounts."},"location":{"type":"string","pattern":"^locations\\/\\d{1,30}$","description":"Location resource name from gbp_list_locations."},"pageToken":{"type":"string","maxLength":2000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["account","location"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gbp_reply_to_review":{"post":{"operationId":"gbp_reply_to_review","summary":"Business Profile reply to review","description":"Publish a public reply for a review at a Business Profile location bound to this workspace. Replaces any existing reply. (Sends an external message; confirm with the user first. If the workspace requires approval for sends, the result has status needs_approval: share the approve_url, then call again with the same arguments plus approval_id.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"review":{"type":"string","pattern":"^accounts\\/\\d{1,30}\\/locations\\/\\d{1,30}\\/reviews\\/[A-Za-z0-9_-]{1,300}$","description":"Full review resource name from gbp_list_reviews."},"comment":{"type":"string","minLength":1,"maxLength":4096},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["review","comment"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"send","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/gbp_create_post":{"post":{"operationId":"gbp_create_post","summary":"Business Profile create post","description":"Publish a public update, offer or event to a bound Business Profile location. (Sends an external message; confirm with the user first. If the workspace requires approval for sends, the result has status needs_approval: share the approve_url, then call again with the same arguments plus approval_id.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"account":{"type":"string","pattern":"^accounts\\/\\d{1,30}$","description":"Account resource name from gbp_list_accounts."},"location":{"type":"string","pattern":"^locations\\/\\d{1,30}$","description":"Location resource name from gbp_list_locations."},"dry_run":{"default":false,"type":"boolean"},"post":{"oneOf":[{"type":"object","properties":{"topicType":{"type":"string","const":"STANDARD"},"callToAction":{"type":"object","properties":{"actionType":{"type":"string","enum":["BOOK","ORDER","SHOP","LEARN_MORE","SIGN_UP","CALL"]},"url":{"type":"string","maxLength":2048,"format":"uri"}},"required":["actionType"]}},"required":["topicType"]},{"type":"object","properties":{"topicType":{"type":"string","const":"EVENT"},"event":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"schedule":{"type":"object","properties":{"startDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"endDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"startTime":{"type":"object","properties":{"hours":{"type":"integer","minimum":0,"maximum":23},"minutes":{"default":0,"type":"integer","minimum":0,"maximum":59}},"required":["hours"]},"endTime":{"type":"object","properties":{"hours":{"type":"integer","minimum":0,"maximum":23},"minutes":{"default":0,"type":"integer","minimum":0,"maximum":59}},"required":["hours"]}},"required":["startDate","endDate"]}},"required":["title","schedule"]},"callToAction":{"type":"object","properties":{"actionType":{"type":"string","enum":["BOOK","ORDER","SHOP","LEARN_MORE","SIGN_UP","CALL"]},"url":{"type":"string","maxLength":2048,"format":"uri"}},"required":["actionType"]}},"required":["topicType","event"]},{"type":"object","properties":{"topicType":{"type":"string","const":"OFFER"},"event":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"schedule":{"type":"object","properties":{"startDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"endDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"startTime":{"type":"object","properties":{"hours":{"type":"integer","minimum":0,"maximum":23},"minutes":{"default":0,"type":"integer","minimum":0,"maximum":59}},"required":["hours"]},"endTime":{"type":"object","properties":{"hours":{"type":"integer","minimum":0,"maximum":23},"minutes":{"default":0,"type":"integer","minimum":0,"maximum":59}},"required":["hours"]}},"required":["startDate","endDate"]}},"required":["title","schedule"]},"offer":{"type":"object","properties":{"couponCode":{"type":"string","maxLength":100},"redeemOnlineUrl":{"type":"string","maxLength":2048,"format":"uri"},"termsConditions":{"type":"string","maxLength":1500}}}},"required":["topicType","event","offer"]}]},"language_code":{"type":"string","pattern":"^[A-Za-z0-9-]{2,35}$"},"summary":{"type":"string","minLength":1,"maxLength":1500},"photos":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":2048,"format":"uri"}},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["account","location","post","language_code","summary"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"send","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/gbp_update_location":{"post":{"operationId":"gbp_update_location","summary":"Business Profile update location","description":"Update the regular hours, special hours or public description for a bound Business Profile location. Supply only the fields to replace.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"account":{"type":"string","pattern":"^accounts\\/\\d{1,30}$","description":"Account resource name from gbp_list_accounts."},"location":{"type":"string","pattern":"^locations\\/\\d{1,30}$","description":"Location resource name from gbp_list_locations."},"dry_run":{"default":false,"type":"boolean"},"description":{"type":"string","maxLength":750},"regular_hours":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"openDay":{"type":"string","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]},"openTime":{"type":"object","properties":{"hours":{"type":"integer","minimum":0,"maximum":23},"minutes":{"default":0,"type":"integer","minimum":0,"maximum":59}},"required":["hours"]},"closeDay":{"type":"string","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]},"closeTime":{"anyOf":[{"type":"object","properties":{"hours":{"type":"integer","minimum":0,"maximum":23},"minutes":{"default":0,"type":"integer","minimum":0,"maximum":59}},"required":["hours"]},{"type":"object","properties":{"hours":{"type":"number","const":24},"minutes":{"default":0,"type":"number","const":0}},"required":["hours"]}]}},"required":["openDay","openTime","closeDay","closeTime"]}},"special_hours":{"maxItems":100,"type":"array","items":{"anyOf":[{"type":"object","properties":{"startDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"closed":{"type":"boolean","const":true}},"required":["startDate","closed"]},{"type":"object","properties":{"startDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"endDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"openTime":{"type":"object","properties":{"hours":{"type":"integer","minimum":0,"maximum":23},"minutes":{"default":0,"type":"integer","minimum":0,"maximum":59}},"required":["hours"]},"closeTime":{"anyOf":[{"type":"object","properties":{"hours":{"type":"integer","minimum":0,"maximum":23},"minutes":{"default":0,"type":"integer","minimum":0,"maximum":59}},"required":["hours"]},{"type":"object","properties":{"hours":{"type":"number","const":24},"minutes":{"default":0,"type":"number","const":0}},"required":["hours"]}]},"closed":{"default":false,"type":"boolean","const":false}},"required":["startDate","openTime","closeTime"]}]}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["account","location"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gbp_list_attributes":{"post":{"operationId":"gbp_list_attributes","summary":"Business Profile list attributes","description":"List the attributes currently set on a bound Business Profile location.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"account":{"type":"string","pattern":"^accounts\\/\\d{1,30}$","description":"Account resource name from gbp_list_accounts."},"location":{"type":"string","pattern":"^locations\\/\\d{1,30}$","description":"Location resource name from gbp_list_locations."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["account","location"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gbp_update_attributes":{"post":{"operationId":"gbp_update_attributes","summary":"Business Profile update attributes","description":"Update supported attributes on a bound Business Profile location. Attribute names and value types depend on the business category.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"account":{"type":"string","pattern":"^accounts\\/\\d{1,30}$","description":"Account resource name from gbp_list_accounts."},"location":{"type":"string","pattern":"^locations\\/\\d{1,30}$","description":"Location resource name from gbp_list_locations."},"dry_run":{"default":false,"type":"boolean"},"attributes":{"minItems":1,"maxItems":50,"type":"array","items":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","pattern":"^attributes\\/[A-Za-z0-9_-]{1,200}$"},"values":{"minItems":1,"maxItems":1,"type":"array","items":{"anyOf":[{"type":"boolean"},{"type":"string","maxLength":200},{"type":"number"}]}}},"required":["name","values"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","pattern":"^attributes\\/[A-Za-z0-9_-]{1,200}$"},"uriValues":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"object","properties":{"uri":{"type":"string","maxLength":2048,"format":"uri"}},"required":["uri"]}}},"required":["name","uriValues"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","pattern":"^attributes\\/[A-Za-z0-9_-]{1,200}$"},"repeatedEnumValue":{"type":"object","properties":{"setValues":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}},"unsetValues":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":200}}}}},"required":["name","repeatedEnumValue"],"additionalProperties":false}]}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["account","location","attributes"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/roof_report":{"post":{"operationId":"roof_report","summary":"Roof report","description":"Measure a roof from satellite imagery for a roofing quote: roof area in square feet, each roof plane with pitch (x/12) and the direction it faces, yearly sunshine, and squares with a waste factor, plus a plain summary. Included in Keystone and billed pay-as-you-go from the workspace wallet; no API key setup is required. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","minLength":5,"maxLength":300,"description":"Street address of the building, with city and state."},"waste_percent":{"default":10,"description":"Waste factor added to the squares count.","type":"number","minimum":0,"maximum":30},"min_quality":{"default":"MEDIUM","description":"Lowest imagery quality to accept. Better imagery is returned when available.","type":"string","enum":["HIGH","MEDIUM","BASE"]},"request_id":{"description":"Optional idempotency ID so retries do not double-charge.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["address"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/gads_list_accounts":{"post":{"operationId":"gads_list_accounts","summary":"Gads list accounts","description":"List the Google Ads customer IDs bound to this workspace and the requests still waiting for the account owner. A request binds after the owner accepts the Keystone manager invitation and creates the label shown here.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gads_query":{"post":{"operationId":"gads_query","summary":"Gads query","description":"Run a read-only GAQL SELECT for a customer bound to this workspace. Returns up to 500 rows. Money fields ending in Micros use millionths of the account currency.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customer_id":{"description":"Bound Google Ads customer ID, with or without hyphens.","type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"query":{"type":"string","minLength":10,"maxLength":4000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["customer_id","query"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gads_campaign_performance":{"post":{"operationId":"gads_campaign_performance","summary":"Gads campaign performance","description":"Get impressions, clicks, cost in account currency, conversions, and phone calls for campaigns in a customer bound to this workspace.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"by":{"default":"campaign","type":"string","enum":["campaign","week","day"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["customer_id","from","to"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gads_create_budget":{"post":{"operationId":"gads_create_budget","summary":"Gads create budget","description":"Create a daily Google Ads budget for one campaign.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"daily_budget_micros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^[1-9]\\d{0,18}$"}],"description":"Millionths of the Google Ads account currency."},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["name","daily_budget_micros","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gads_update_budget":{"post":{"operationId":"gads_update_budget","summary":"Gads update budget","description":"Change the daily budget of a Google Ads campaign budget. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"budget_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"daily_budget_micros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^[1-9]\\d{0,18}$"}],"description":"Millionths of the Google Ads account currency."},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["budget_id","daily_budget_micros","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/gads_create_search_campaign":{"post":{"operationId":"gads_create_search_campaign","summary":"Gads create search campaign","description":"Create a paused Search campaign. Add targeting, ad groups and ads before enabling it.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"budget_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"bidding":{"oneOf":[{"type":"object","properties":{"strategy":{"type":"string","const":"MANUAL_CPC"}},"required":["strategy"]},{"type":"object","properties":{"strategy":{"type":"string","const":"MAXIMIZE_CLICKS"},"max_cpc_micros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^[1-9]\\d{0,18}$"}],"description":"Millionths of the Google Ads account currency."}},"required":["strategy"]},{"type":"object","properties":{"strategy":{"type":"string","const":"MAXIMIZE_CONVERSIONS"},"target_cpa_micros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^[1-9]\\d{0,18}$"}],"description":"Millionths of the Google Ads account currency."}},"required":["strategy"]}]},"networks":{"type":"object","properties":{"search_partners":{"default":false,"type":"boolean"},"display_expansion":{"default":false,"type":"boolean"}}},"contains_eu_political_advertising":{"type":"boolean","description":"Advertiser declaration that the campaign contains political advertising targeted at the EU."},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["name","budget_id","bidding","contains_eu_political_advertising","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gads_update_search_campaign":{"post":{"operationId":"gads_update_search_campaign","summary":"Gads update search campaign","description":"Change Search campaign name, budget, networks or bidding. Supply one or more fields. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"name":{"type":"string","minLength":1,"maxLength":128},"budget_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"bidding":{"oneOf":[{"type":"object","properties":{"strategy":{"type":"string","const":"MANUAL_CPC"}},"required":["strategy"]},{"type":"object","properties":{"strategy":{"type":"string","const":"MAXIMIZE_CLICKS"},"max_cpc_micros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^[1-9]\\d{0,18}$"}],"description":"Millionths of the Google Ads account currency."}},"required":["strategy"]},{"type":"object","properties":{"strategy":{"type":"string","const":"MAXIMIZE_CONVERSIONS"},"target_cpa_micros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^[1-9]\\d{0,18}$"}],"description":"Millionths of the Google Ads account currency."}},"required":["strategy"]}]},"networks":{"type":"object","properties":{"search_partners":{"type":"boolean"},"display_expansion":{"type":"boolean"}}},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["campaign_id","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/gads_add_campaign_criteria":{"post":{"operationId":"gads_add_campaign_criteria","summary":"Gads add campaign criteria","description":"Add location targets, ad schedules or negative keywords to a campaign. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"criteria":{"minItems":1,"maxItems":100,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"LOCATION"},"geo_target_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"negative":{"default":false,"type":"boolean"}},"required":["kind","geo_target_id"]},{"type":"object","properties":{"kind":{"type":"string","const":"SCHEDULE"},"schedule":{"type":"object","properties":{"day_of_week":{"type":"string","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]},"start_hour":{"type":"integer","minimum":0,"maximum":23},"start_minute":{"default":"ZERO","type":"string","enum":["ZERO","FIFTEEN","THIRTY","FORTY_FIVE"]},"end_hour":{"type":"integer","minimum":0,"maximum":24},"end_minute":{"default":"ZERO","type":"string","enum":["ZERO","FIFTEEN","THIRTY","FORTY_FIVE"]}},"required":["day_of_week","start_hour","end_hour"]}},"required":["kind","schedule"]},{"type":"object","properties":{"kind":{"type":"string","const":"NEGATIVE_KEYWORD"},"keyword":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":80},"match_type":{"type":"string","enum":["EXACT","PHRASE","BROAD"]}},"required":["text","match_type"]}},"required":["kind","keyword"]}]}},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["campaign_id","criteria","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/gads_remove_campaign_criteria":{"post":{"operationId":"gads_remove_campaign_criteria","summary":"Gads remove campaign criteria","description":"Remove location, schedule or negative keyword criteria. Removing a criterion may broaden serving. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"criterion_ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","pattern":"^[1-9]\\d{0,18}$"}},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["campaign_id","criterion_ids","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/gads_create_ad_group":{"post":{"operationId":"gads_create_ad_group","summary":"Gads create ad group","description":"Create a Search ad group. An enabled group can serve once it has eligible ads, keywords and an enabled campaign. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"name":{"type":"string","minLength":1,"maxLength":128},"cpc_bid_micros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^[1-9]\\d{0,18}$"}],"description":"Millionths of the Google Ads account currency."},"status":{"default":"PAUSED","type":"string","enum":["PAUSED","ENABLED"]},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["campaign_id","name","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/gads_update_ad_group":{"post":{"operationId":"gads_update_ad_group","summary":"Gads update ad group","description":"Change the name or manual CPC bid of an existing Search ad group. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ad_group_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"name":{"type":"string","minLength":1,"maxLength":128},"cpc_bid_micros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^[1-9]\\d{0,18}$"}],"description":"Millionths of the Google Ads account currency."},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["ad_group_id","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/gads_add_keywords":{"post":{"operationId":"gads_add_keywords","summary":"Gads add keywords","description":"Add exact, phrase or broad keywords to an ad group. Set negative to exclude them. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ad_group_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"keywords":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":80},"match_type":{"type":"string","enum":["EXACT","PHRASE","BROAD"]}},"required":["text","match_type"]}},"negative":{"default":false,"type":"boolean"},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["ad_group_id","keywords","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/gads_replace_keyword":{"post":{"operationId":"gads_replace_keyword","summary":"Gads replace keyword","description":"Replace the text or match type of an existing ad group keyword. Supply its intended status and whether it is negative. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ad_group_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"criterion_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"keyword":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":80},"match_type":{"type":"string","enum":["EXACT","PHRASE","BROAD"]}},"required":["text","match_type"]},"negative":{"default":false,"type":"boolean"},"status":{"default":"PAUSED","type":"string","enum":["PAUSED","ENABLED"]},"cpc_bid_micros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^[1-9]\\d{0,18}$"}],"description":"Millionths of the Google Ads account currency."},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["ad_group_id","criterion_id","keyword","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/gads_update_keyword_bid":{"post":{"operationId":"gads_update_keyword_bid","summary":"Gads update keyword bid","description":"Change the manual CPC bid of an existing positive ad group keyword. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ad_group_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"criterion_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"cpc_bid_micros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^[1-9]\\d{0,18}$"}],"description":"Millionths of the Google Ads account currency."},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["ad_group_id","criterion_id","cpc_bid_micros","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/gads_remove_keywords":{"post":{"operationId":"gads_remove_keywords","summary":"Gads remove keywords","description":"Remove ad group criteria by ID. Removing a negative keyword broadens targeting. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ad_group_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"criterion_ids":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","pattern":"^[1-9]\\d{0,18}$"}},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["ad_group_id","criterion_ids","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/gads_create_negative_list":{"post":{"operationId":"gads_create_negative_list","summary":"Gads create negative list","description":"Create a shared negative keyword list with its initial entries.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"keywords":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":80},"match_type":{"type":"string","enum":["EXACT","PHRASE","BROAD"]}},"required":["text","match_type"]}},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["name","keywords","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gads_rename_negative_list":{"post":{"operationId":"gads_rename_negative_list","summary":"Gads rename negative list","description":"Rename a shared negative keyword list.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"list_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"name":{"type":"string","minLength":1,"maxLength":128},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["list_id","name","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gads_add_negative_list_keywords":{"post":{"operationId":"gads_add_negative_list_keywords","summary":"Gads add negative list keywords","description":"Add negative keywords to a shared list.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"list_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"keywords":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":80},"match_type":{"type":"string","enum":["EXACT","PHRASE","BROAD"]}},"required":["text","match_type"]}},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["list_id","keywords","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gads_remove_negative_list_keywords":{"post":{"operationId":"gads_remove_negative_list_keywords","summary":"Gads remove negative list keywords","description":"Remove negative keywords from a shared list. This may broaden all linked campaigns. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"list_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"criterion_ids":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","pattern":"^[1-9]\\d{0,18}$"}},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["list_id","criterion_ids","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/gads_attach_negative_list":{"post":{"operationId":"gads_attach_negative_list","summary":"Gads attach negative list","description":"Attach a shared negative keyword list to a campaign.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"list_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"campaign_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["list_id","campaign_id","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/gads_detach_negative_list":{"post":{"operationId":"gads_detach_negative_list","summary":"Gads detach negative list","description":"Detach a shared negative keyword list from a campaign. This may broaden targeting. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"list_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"campaign_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["list_id","campaign_id","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/gads_create_responsive_search_ad":{"post":{"operationId":"gads_create_responsive_search_ad","summary":"Gads create responsive search ad","description":"Create a responsive search ad with 3 to 15 headlines and 2 to 4 descriptions. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ad_group_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"ad":{"type":"object","properties":{"headlines":{"minItems":3,"maxItems":15,"type":"array","items":{"type":"string","minLength":1,"maxLength":30}},"descriptions":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":90}},"path1":{"type":"string","minLength":1,"maxLength":15},"path2":{"type":"string","minLength":1,"maxLength":15},"landing_url":{"type":"string","maxLength":2048,"format":"uri"}},"required":["headlines","descriptions","landing_url"]},"status":{"default":"PAUSED","type":"string","enum":["PAUSED","ENABLED"]},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["ad_group_id","ad","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/gads_update_responsive_search_ad":{"post":{"operationId":"gads_update_responsive_search_ad","summary":"Gads update responsive search ad","description":"Replace the landing URL, headlines and descriptions of a responsive search ad. Supply all copy you want to keep. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ad_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"ad":{"type":"object","properties":{"headlines":{"minItems":3,"maxItems":15,"type":"array","items":{"type":"string","minLength":1,"maxLength":30}},"descriptions":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":90}},"path1":{"type":"string","minLength":1,"maxLength":15},"path2":{"type":"string","minLength":1,"maxLength":15},"landing_url":{"type":"string","maxLength":2048,"format":"uri"}},"required":["headlines","descriptions","landing_url"]},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["ad_id","ad","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/gads_add_campaign_assets":{"post":{"operationId":"gads_add_campaign_assets","summary":"Gads add campaign assets","description":"Create and attach call assets, sitelinks and callouts to a campaign. To replace an asset, attach its replacement and pause the old link. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"assets":{"type":"object","properties":{"phone":{"type":"object","properties":{"country_code":{"type":"string","pattern":"^[A-Z]{2}$"},"number":{"type":"string","pattern":"^\\+?[0-9 ()-]{5,25}$"},"conversion_action_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"}},"required":["country_code","number"]},"sitelinks":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":25},"url":{"type":"string","maxLength":2048,"format":"uri"},"description_1":{"type":"string","minLength":1,"maxLength":35},"description_2":{"type":"string","minLength":1,"maxLength":35}},"required":["text","url"]}},"callouts":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":25}}}},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["campaign_id","assets","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/gads_replace_campaign_asset":{"post":{"operationId":"gads_replace_campaign_asset","summary":"Gads replace campaign asset","description":"Attach a replacement call asset, sitelink or callout and pause the old campaign link in one operation. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"asset_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"replacement":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"CALL"},"phone":{"type":"object","properties":{"country_code":{"type":"string","pattern":"^[A-Z]{2}$"},"number":{"type":"string","pattern":"^\\+?[0-9 ()-]{5,25}$"},"conversion_action_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"}},"required":["country_code","number"]}},"required":["kind","phone"]},{"type":"object","properties":{"kind":{"type":"string","const":"SITELINK"},"sitelink":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":25},"url":{"type":"string","maxLength":2048,"format":"uri"},"description_1":{"type":"string","minLength":1,"maxLength":35},"description_2":{"type":"string","minLength":1,"maxLength":35}},"required":["text","url"]}},"required":["kind","sitelink"]},{"type":"object","properties":{"kind":{"type":"string","const":"CALLOUT"},"callout":{"type":"string","minLength":1,"maxLength":25}},"required":["kind","callout"]}]},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["campaign_id","asset_id","replacement","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/gads_create_conversion_action":{"post":{"operationId":"gads_create_conversion_action","summary":"Gads create conversion action","description":"Create a conversion action for calls from ads, website calls or successful form submissions. Use OFFLINE_LEAD for Data Manager form imports. Website actions require tags on the site. A primary action can affect automated bidding. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"kind":{"type":"string","enum":["CALLS_FROM_ADS","WEBSITE_CALLS","FORM_SUBMIT","OFFLINE_LEAD"]},"minimum_call_seconds":{"type":"integer","minimum":0,"maximum":10000},"primary_for_goal":{"default":false,"type":"boolean"},"counting":{"default":"one","description":"one counts one conversion per ad click. every counts each one, for repeat customer value.","type":"string","enum":["one","every"]},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["name","kind","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/gads_update_conversion_action":{"post":{"operationId":"gads_update_conversion_action","summary":"Gads update conversion action","description":"Change a conversion action name, call duration or use in bidding. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"conversion_action_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"name":{"type":"string","minLength":1,"maxLength":128},"minimum_call_seconds":{"type":"integer","minimum":0,"maximum":10000},"primary_for_goal":{"type":"boolean"},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["conversion_action_id","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/gads_pause":{"post":{"operationId":"gads_pause","summary":"Gads pause","description":"Pause a campaign, ad group, ad, positive keyword or campaign asset link.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"CAMPAIGN"},"id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"}},"required":["kind","id"]},{"type":"object","properties":{"kind":{"type":"string","const":"AD_GROUP"},"id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"}},"required":["kind","id"]},{"type":"object","properties":{"kind":{"type":"string","const":"AD"},"ad_group_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"}},"required":["kind","ad_group_id","id"]},{"type":"object","properties":{"kind":{"type":"string","const":"KEYWORD"},"ad_group_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"}},"required":["kind","ad_group_id","id"]},{"type":"object","properties":{"kind":{"type":"string","const":"CAMPAIGN_ASSET"},"campaign_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"field_type":{"type":"string","enum":["CALL","SITELINK","CALLOUT"]}},"required":["kind","campaign_id","id","field_type"]}]},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["target","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/google_ads_entity_enable":{"post":{"operationId":"google_ads_entity_enable","summary":"Google ads entity enable","description":"Google Ads: enable an ad group, ad, positive keyword or campaign asset link. This can start serving ads. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"AD_GROUP"},"id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"}},"required":["kind","id"]},{"type":"object","properties":{"kind":{"type":"string","const":"AD"},"ad_group_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"}},"required":["kind","ad_group_id","id"]},{"type":"object","properties":{"kind":{"type":"string","const":"KEYWORD"},"ad_group_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"}},"required":["kind","ad_group_id","id"]},{"type":"object","properties":{"kind":{"type":"string","const":"CAMPAIGN_ASSET"},"campaign_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"field_type":{"type":"string","enum":["CALL","SITELINK","CALLOUT"]}},"required":["kind","campaign_id","id","field_type"]}]},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["target","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/gads_enable":{"post":{"operationId":"gads_enable","summary":"Gads enable","description":"Compatibility alias for google_ads_entity_enable. Google Ads: enable an ad group, ad, positive keyword or campaign asset link. This can start serving ads. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"AD_GROUP"},"id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"}},"required":["kind","id"]},{"type":"object","properties":{"kind":{"type":"string","const":"AD"},"ad_group_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"}},"required":["kind","ad_group_id","id"]},{"type":"object","properties":{"kind":{"type":"string","const":"KEYWORD"},"ad_group_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"}},"required":["kind","ad_group_id","id"]},{"type":"object","properties":{"kind":{"type":"string","const":"CAMPAIGN_ASSET"},"campaign_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"field_type":{"type":"string","enum":["CALL","SITELINK","CALLOUT"]}},"required":["kind","campaign_id","id","field_type"]}]},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["target","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/google_ads_campaign_enable":{"post":{"operationId":"google_ads_campaign_enable","summary":"Google ads campaign enable","description":"Google Ads: enable a paused campaign after checking the budget, targeting, policy status and tracking. This can start ad spend. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["campaign_id","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/ads_campaign_enable":{"post":{"operationId":"ads_campaign_enable","summary":"Ads campaign enable","description":"Compatibility alias for google_ads_campaign_enable. Google Ads: enable a paused campaign after checking the budget, targeting, policy status and tracking. This can start ad spend. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["campaign_id","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"apps","x-keystone-needs-approval":true}},"/v1/tools/google_ads_campaign_create_paused":{"post":{"operationId":"google_ads_campaign_create_paused","summary":"Google ads campaign create paused","description":"Google Ads: create a paused Search campaign without starting spend in one validated batch. Use ads_campaign_enable to start serving after review.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"daily_budget_micros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^[1-9]\\d{0,18}$"}],"description":"Millionths of the Google Ads account currency."},"bidding":{"oneOf":[{"type":"object","properties":{"strategy":{"type":"string","const":"MANUAL_CPC"}},"required":["strategy"]},{"type":"object","properties":{"strategy":{"type":"string","const":"MAXIMIZE_CLICKS"},"max_cpc_micros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^[1-9]\\d{0,18}$"}],"description":"Millionths of the Google Ads account currency."}},"required":["strategy"]},{"type":"object","properties":{"strategy":{"type":"string","const":"MAXIMIZE_CONVERSIONS"},"target_cpa_micros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^[1-9]\\d{0,18}$"}],"description":"Millionths of the Google Ads account currency."}},"required":["strategy"]}]},"networks":{"type":"object","properties":{"search_partners":{"default":false,"type":"boolean"},"display_expansion":{"default":false,"type":"boolean"}}},"contains_eu_political_advertising":{"type":"boolean","description":"Advertiser declaration that the campaign contains political advertising targeted at the EU."},"locations":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"description":"Google Ads geo target constant IDs. Defaults to presence targeting."},"schedule":{"maxItems":42,"type":"array","items":{"type":"object","properties":{"day_of_week":{"type":"string","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]},"start_hour":{"type":"integer","minimum":0,"maximum":23},"start_minute":{"default":"ZERO","type":"string","enum":["ZERO","FIFTEEN","THIRTY","FORTY_FIVE"]},"end_hour":{"type":"integer","minimum":0,"maximum":24},"end_minute":{"default":"ZERO","type":"string","enum":["ZERO","FIFTEEN","THIRTY","FORTY_FIVE"]}},"required":["day_of_week","start_hour","end_hour"]}},"landing_url":{"type":"string","maxLength":2048,"format":"uri"},"phone":{"type":"object","properties":{"country_code":{"type":"string","pattern":"^[A-Z]{2}$"},"number":{"type":"string","pattern":"^\\+?[0-9 ()-]{5,25}$"},"conversion_action_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"}},"required":["country_code","number"]},"sitelinks":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":25},"url":{"type":"string","maxLength":2048,"format":"uri"},"description_1":{"type":"string","minLength":1,"maxLength":35},"description_2":{"type":"string","minLength":1,"maxLength":35}},"required":["text","url"]}},"callouts":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":25}},"negative_keywords":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":80},"match_type":{"type":"string","enum":["EXACT","PHRASE","BROAD"]}},"required":["text","match_type"]}},"negative_list_ids":{"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[1-9]\\d{0,18}$"}},"services":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"keywords":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":80},"match_type":{"type":"string","enum":["EXACT","PHRASE","BROAD"]}},"required":["text","match_type"]}},"copy":{"type":"object","properties":{"headlines":{"minItems":3,"maxItems":15,"type":"array","items":{"type":"string","minLength":1,"maxLength":30}},"descriptions":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":90}},"path1":{"type":"string","minLength":1,"maxLength":15},"path2":{"type":"string","minLength":1,"maxLength":15}},"required":["headlines","descriptions"]},"landing_url":{"type":"string","maxLength":2048,"format":"uri"},"cpc_bid_micros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^[1-9]\\d{0,18}$"}],"description":"Millionths of the Google Ads account currency."}},"required":["name","keywords","copy"]}}},"required":["name","daily_budget_micros","bidding","contains_eu_political_advertising","locations","landing_url","phone","services"]},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["plan","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/ads_campaign_launch":{"post":{"operationId":"ads_campaign_launch","summary":"Ads campaign launch","description":"Compatibility alias for google_ads_campaign_create_paused. Google Ads: create a paused Search campaign without starting spend in one validated batch. Use ads_campaign_enable to start serving after review.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"daily_budget_micros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^[1-9]\\d{0,18}$"}],"description":"Millionths of the Google Ads account currency."},"bidding":{"oneOf":[{"type":"object","properties":{"strategy":{"type":"string","const":"MANUAL_CPC"}},"required":["strategy"]},{"type":"object","properties":{"strategy":{"type":"string","const":"MAXIMIZE_CLICKS"},"max_cpc_micros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^[1-9]\\d{0,18}$"}],"description":"Millionths of the Google Ads account currency."}},"required":["strategy"]},{"type":"object","properties":{"strategy":{"type":"string","const":"MAXIMIZE_CONVERSIONS"},"target_cpa_micros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^[1-9]\\d{0,18}$"}],"description":"Millionths of the Google Ads account currency."}},"required":["strategy"]}]},"networks":{"type":"object","properties":{"search_partners":{"default":false,"type":"boolean"},"display_expansion":{"default":false,"type":"boolean"}}},"contains_eu_political_advertising":{"type":"boolean","description":"Advertiser declaration that the campaign contains political advertising targeted at the EU."},"locations":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"description":"Google Ads geo target constant IDs. Defaults to presence targeting."},"schedule":{"maxItems":42,"type":"array","items":{"type":"object","properties":{"day_of_week":{"type":"string","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]},"start_hour":{"type":"integer","minimum":0,"maximum":23},"start_minute":{"default":"ZERO","type":"string","enum":["ZERO","FIFTEEN","THIRTY","FORTY_FIVE"]},"end_hour":{"type":"integer","minimum":0,"maximum":24},"end_minute":{"default":"ZERO","type":"string","enum":["ZERO","FIFTEEN","THIRTY","FORTY_FIVE"]}},"required":["day_of_week","start_hour","end_hour"]}},"landing_url":{"type":"string","maxLength":2048,"format":"uri"},"phone":{"type":"object","properties":{"country_code":{"type":"string","pattern":"^[A-Z]{2}$"},"number":{"type":"string","pattern":"^\\+?[0-9 ()-]{5,25}$"},"conversion_action_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"}},"required":["country_code","number"]},"sitelinks":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":25},"url":{"type":"string","maxLength":2048,"format":"uri"},"description_1":{"type":"string","minLength":1,"maxLength":35},"description_2":{"type":"string","minLength":1,"maxLength":35}},"required":["text","url"]}},"callouts":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":25}},"negative_keywords":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":80},"match_type":{"type":"string","enum":["EXACT","PHRASE","BROAD"]}},"required":["text","match_type"]}},"negative_list_ids":{"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[1-9]\\d{0,18}$"}},"services":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"keywords":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":80},"match_type":{"type":"string","enum":["EXACT","PHRASE","BROAD"]}},"required":["text","match_type"]}},"copy":{"type":"object","properties":{"headlines":{"minItems":3,"maxItems":15,"type":"array","items":{"type":"string","minLength":1,"maxLength":30}},"descriptions":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":90}},"path1":{"type":"string","minLength":1,"maxLength":15},"path2":{"type":"string","minLength":1,"maxLength":15}},"required":["headlines","descriptions"]},"landing_url":{"type":"string","maxLength":2048,"format":"uri"},"cpc_bid_micros":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^[1-9]\\d{0,18}$"}],"description":"Millionths of the Google Ads account currency."}},"required":["name","keywords","copy"]}}},"required":["name","daily_budget_micros","bidding","contains_eu_political_advertising","locations","landing_url","phone","services"]},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"dry_run":{"default":false,"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["plan","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/property_report":{"post":{"operationId":"property_report","summary":"Property report","description":"Combined address report using multiple provider lookups. Combine available parcel records, owner of record, home age, last sale and permit history for one address. See recent permits within about one mile. Use for licensed business purposes outside consumer eligibility and screening.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","minLength":1,"maxLength":256,"description":"US address in street, city, state ZIP format."},"work_type":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$","description":"Mireye work tag, for example roof, hvac, solar or new_building."},"history_cursor":{"description":"Continue a long permit history using permit_history.next_cursor.","type":"string","minLength":1,"maxLength":2000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["address"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/permit_leads":{"post":{"operationId":"permit_leads","summary":"Permit leads","description":"Find recently issued permits for a type of work and rank contractors by permit records on the returned page.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"area":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","pattern":"^[A-Z]{2}$"},"county_fips":{"type":"string","pattern":"^\\d{5}$"}},"required":["state","county_fips"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":120}},"required":["state","city"],"additionalProperties":false},{"type":"object","properties":{"zip":{"type":"string","pattern":"^\\d{5}$"}},"required":["zip"],"additionalProperties":false},{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180},"radius_m":{"type":"number","exclusiveMinimum":0,"maximum":50000}},"required":["lat","lng","radius_m"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["state"],"additionalProperties":false}],"description":"Search by state and county FIPS, state and city, ZIP, point and radius in metres, or state."},"work_type":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$","description":"Mireye work tag, for example roof, hvac, solar or new_building."},"since":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","minLength":1,"maxLength":2000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["area","work_type","since"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/nearby_addresses":{"post":{"operationId":"nearby_addresses","summary":"Nearby addresses","description":"Find nearby mapped US street addresses for a neighbor mailer. Free by default using open map data, with Current Resident as the recipient. BatchData adds owner names, mailing addresses and property filters and bills per property record. Auto checks free coverage first. Set certified_use to true before any BatchData search. Use BatchData for licensed business purposes. Exclude consumer eligibility and covered-person targeting. Contact data carries no consent. Check Do Not Call lists, TCPA, CAN-SPAM and applicable privacy rules, and obtain any required consent before outreach.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","minLength":1,"maxLength":256,"description":"Full US street address, including city, state, and ZIP code."},"count":{"default":50,"type":"integer","minimum":1,"maximum":500},"radius_m":{"description":"Maximum search radius in meters. Defaults to 5,000.","type":"integer","minimum":1,"maximum":5000},"source":{"default":"free","type":"string","enum":["free","batchdata","auto"]},"format":{"default":"json","type":"string","enum":["json","csv"]},"owner_occupied":{"type":"boolean"},"absentee_owner":{"type":"boolean"},"property_type":{"type":"string","minLength":1,"maxLength":80},"min_value":{"type":"integer","minimum":0,"maximum":9007199254740991},"max_value":{"type":"integer","minimum":0,"maximum":9007199254740991},"owner_names":{"description":"Request owner names with source auto or batchdata.","type":"boolean"},"certified_use":{"type":"boolean","const":true,"description":"Confirm this use complies with BatchData’s license and excludes FCRA-regulated eligibility or screening."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["address"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/custom_connect":{"post":{"operationId":"custom_connect","summary":"Custom connect","description":"Connect any app that has an API with the person's own API key. The person only types the app name and pastes the key on a secure Keystone page; Keystone finds the API docs itself, works out how the key is sent and builds tools to review. Returns that page link. Never ask for an API key in chat. If the app already connects directly, returns that link instead.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app":{"type":"string","minLength":1,"maxLength":100,"description":"The app name, for example the scheduling or invoicing app the business uses."},"docsUrl":{"description":"A link to the API docs, only if the person already gave one.","type":"string","maxLength":500,"format":"uri"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["app"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/custom_list":{"post":{"operationId":"custom_list","summary":"Custom list","description":"List custom API connectors and every generated operation in this workspace, including typed parameters, examples and risk. Read the operation descriptions to choose the right connector and operation before custom_call. Draft connectors are visible for review but only enabled connectors can run.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/custom_call":{"post":{"operationId":"custom_call","summary":"Custom call","description":"Execute a customer-defined operation in an explicit workspace using the exact operation name and typed parameters returned by custom_list. Check its risk first. Ask the person before sends, purchases, destructive changes or other writes. Responses over 128 KiB are rejected. Credentials never appear in results.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connector":{"type":"string","minLength":1,"maxLength":120,"description":"Connector id, slug or exact name from custom_list."},"operation":{"type":"string","minLength":1,"maxLength":80,"description":"Exact generated operation name from custom_list."},"params":{"default":{},"description":"Parameters matching the generated operation schema.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["connector","operation"],"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}]}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"destructive","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/crm_account":{"post":{"operationId":"crm_account","summary":"CRM account","description":"The ServiceLine CRM account included with this plan for the current workspace: whether it is on, its link (opens sl.app signed in with the ServiceLine login), and whether it is read only. Pass setup true to turn it on when it is not on yet (owner or admin). Personal includes one CRM account; Agency and the trial include one per client workspace.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"setup":{"description":"Turn the CRM on for this workspace when it is not on yet.","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/crm_search_contacts":{"post":{"operationId":"crm_search_contacts","summary":"CRM search contacts","description":"Search contacts in the workspace CRM by name, email, phone or company, or look one up by exact email. Returns contacts and a cursor for the next page.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"search":{"type":"string","minLength":1,"maxLength":200},"email":{"description":"Exact email lookup.","type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"tags":{"description":"Comma-separated tag names.","type":"string","maxLength":300},"limit":{"description":"Rows per page, 1 to 100 (default 25).","type":"integer","minimum":1,"maximum":100},"cursor":{"description":"Cursor from the previous page.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/crm_get_contact":{"post":{"operationId":"crm_get_contact","summary":"CRM get contact","description":"One contact from the workspace CRM by id, with its fields, tags and lifecycle stage.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contact_id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9;_-]+$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["contact_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/crm_create_contact":{"post":{"operationId":"crm_create_contact","summary":"CRM create contact","description":"Add a contact to the workspace CRM. First and last name are required. Search first so you do not add a duplicate.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":100},"last_name":{"type":"string","minLength":1,"maxLength":100},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"description":"E.164 when you have it, like +15551234567.","type":"string","maxLength":40},"company":{"type":"string","maxLength":200},"tags":{"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"city":{"type":"string","maxLength":100},"state":{"type":"string","maxLength":100},"postal_code":{"type":"string","maxLength":20},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["first_name","last_name"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/crm_update_contact":{"post":{"operationId":"crm_update_contact","summary":"CRM update contact","description":"Change fields on one contact in the workspace CRM. Only the fields you pass change. Tags you pass replace the contact tags.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contact_id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9;_-]+$"},"first_name":{"type":"string","minLength":1,"maxLength":100},"last_name":{"type":"string","minLength":1,"maxLength":100},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"description":"E.164 when you have it, like +15551234567.","type":"string","maxLength":40},"company":{"type":"string","maxLength":200},"tags":{"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"city":{"type":"string","maxLength":100},"state":{"type":"string","maxLength":100},"postal_code":{"type":"string","maxLength":20},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["contact_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/crm_list_pipelines":{"post":{"operationId":"crm_list_pipelines","summary":"CRM list pipelines","description":"Sales pipelines in the workspace CRM with their stages and ids. Call this before creating or moving an opportunity.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/crm_list_opportunities":{"post":{"operationId":"crm_list_opportunities","summary":"CRM list opportunities","description":"Opportunities (deals) in the workspace CRM, filtered by pipeline, stage, contact or status (open, won, lost).","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"pipeline_id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9;_-]+$"},"stage_id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9;_-]+$"},"contact_id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9;_-]+$"},"status":{"type":"string","enum":["open","won","lost","abandoned"]},"limit":{"description":"Rows per page, 1 to 100 (default 25).","type":"integer","minimum":1,"maximum":100},"cursor":{"description":"Cursor from the previous page.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/crm_create_opportunity":{"post":{"operationId":"crm_create_opportunity","summary":"CRM create opportunity","description":"Open an opportunity (deal) for a contact in a pipeline stage. Get pipeline and stage ids from crm_list_pipelines.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contact_id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9;_-]+$"},"pipeline_id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9;_-]+$"},"stage_id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9;_-]+$"},"name":{"type":"string","minLength":1,"maxLength":200},"value":{"description":"Deal value in dollars.","type":"number","minimum":0,"maximum":100000000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["contact_id","pipeline_id","stage_id","name"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/crm_move_opportunity":{"post":{"operationId":"crm_move_opportunity","summary":"CRM move opportunity","description":"Move an opportunity to another stage, or mark it won or lost.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"opportunity_id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9;_-]+$"},"stage_id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9;_-]+$"},"status":{"type":"string","enum":["open","won","lost"]},"lost_reason":{"type":"string","maxLength":300},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["opportunity_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/crm_create_task":{"post":{"operationId":"crm_create_task","summary":"CRM create task","description":"Add a follow-up task in the workspace CRM, optionally tied to a contact or opportunity.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000},"due_date":{"description":"YYYY-MM-DD.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"contact_id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9;_-]+$"},"opportunity_id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9;_-]+$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["title"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/crm_list_conversations":{"post":{"operationId":"crm_list_conversations","summary":"CRM list conversations","description":"List recent SMS, email, and call conversations in the workspace CRM, optionally filtered by contact or channel.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"contact_id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9;_-]+$"},"channel":{"type":"string","enum":["sms","email","gmail","messenger","instagram"]},"limit":{"description":"Rows per page, 1 to 100 (default 25).","type":"integer","minimum":1,"maximum":100},"cursor":{"description":"Cursor from the previous page.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/crm_get_messages":{"post":{"operationId":"crm_get_messages","summary":"CRM get messages","description":"Read messages inside one conversation from the workspace CRM.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"conversation_id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9;_-]+$"},"limit":{"description":"Rows per page, 1 to 100 (default 25).","type":"integer","minimum":1,"maximum":100},"cursor":{"description":"Cursor from the previous page.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["conversation_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/crm_list_appointments":{"post":{"operationId":"crm_list_appointments","summary":"CRM list appointments","description":"List calendar appointments in the workspace CRM, optionally filtered by contact or status.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"contact_id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9;_-]+$"},"status":{"type":"string","enum":["scheduled","confirmed","completed","cancelled","no_show"]},"limit":{"description":"Rows per page, 1 to 100 (default 25).","type":"integer","minimum":1,"maximum":100},"cursor":{"description":"Cursor from the previous page.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/crm_log_event":{"post":{"operationId":"crm_log_event","summary":"CRM log event","description":"Write a Keystone event (call, text, email, form, booking, review, receptionist_call, job, or attribution) onto a contact timeline in the workspace CRM. Matches the contact by id, email, or phone, creates one if needed, and deduplicates by external_event_id.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"external_event_id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9:._-]+$"},"event_type":{"type":"string","enum":["call","text","email","form","booking","review","receptionist_call","job","attribution","direct_mail","audience","visitor"]},"title":{"type":"string","minLength":1,"maxLength":180},"summary":{"type":"string","minLength":1,"maxLength":1800},"direction":{"type":"string","enum":["inbound","outbound"]},"contact_id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9;_-]+$"},"deal_id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9;_-]+$"},"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","maxLength":40},"tags":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"utm_source":{"type":"string","maxLength":200},"utm_medium":{"type":"string","maxLength":200},"utm_campaign":{"type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["external_event_id","event_type","summary"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/crm_recent_events":{"post":{"operationId":"crm_recent_events","summary":"CRM recent events","description":"List recent real-time webhook events received from the workspace CRM (pipeline stage moves, won or lost opportunities, new contacts, completed tasks, appointments, paid invoices, and opt-outs).","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"event_type":{"description":"Optional filter like opportunity.stage_changed or opportunity.won.","type":"string","minLength":1,"maxLength":80},"limit":{"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/crm_sync_status":{"post":{"operationId":"crm_sync_status","summary":"CRM sync status","description":"Check two-way sync health between this workspace and its ServiceLine CRM account (webhook status, linked contacts, inbound CRM events, and outbound timeline deliveries). Pass setup_webhook true (owner or admin) to wire or refresh the CRM webhook.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"setup_webhook":{"description":"Register or refresh the CRM -> Keystone webhook for this workspace.","type":"boolean"},"rotate_secret":{"description":"Rotate the webhook signing secret when setup_webhook is true.","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/crm_hand_off":{"post":{"operationId":"crm_hand_off","summary":"CRM hand off","description":"Offboarding: hand the workspace CRM account to its owner. Keystone stops managing it and its CRM tools stop working here. The data stays in the CRM. Pass transfer_to_email to give that person admin access (they get an invite if they have no ServiceLine login). Account owner only.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"transfer_to_email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"destructive","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/app_request":{"post":{"operationId":"app_request","summary":"App request","description":"Ask for an app Keystone does not have yet, in one step. Use it when apps_search, connections_list or the person cannot find an app among Keystone's apps. Keystone checks its catalog, then looks for the app's API (a way for software to talk to it directly). With an API, Keystone connects it through the vendor sign-in or a credential passed server-side, then writes and tests the tools. Without one, Keystone builds it with API Anything: it gets its own user in the app, signs in on a Keystone Computer, learns each job and tests it on the real screens. Finished tools wait for a person to turn them on, then show up in this workspace (custom_list and custom_call, or anything_apps and anything_run). Returns the request with its status, the person's next step and a status page. Asking again for the same app returns the open request. Never ask for an API key, password or code in chat. Start Keystone-managed setup with app_request_update action \"connect\", or pass a credential to that tool only when the vendor supplied it for this workspace.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app":{"type":"string","minLength":1,"maxLength":60,"description":"The app name as the person says it."},"jobs":{"description":"What the person wants the AI to do in the app, each in plain words, for example \"list today's jobs with the customer and address\".","maxItems":5,"type":"array","items":{"type":"string","minLength":5,"maxLength":300}},"site":{"description":"The web address where the person signs in to the app, if they said it.","type":"string","maxLength":500},"credential":{"description":"A vendor-supplied API credential for this workspace, passed server-side. Never ask the person to paste one in chat.","type":"object","properties":{"secret":{"type":"string","maxLength":4096},"username":{"type":"string","maxLength":320},"password":{"type":"string","maxLength":4096}},"additionalProperties":false},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["app"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/app_requests":{"post":{"operationId":"app_requests","summary":"App requests","description":"Lists this workspace's app requests with status (Checking, Needs you, Building, Ready to turn on, Ready, Stopped, Cancelled), the step Keystone is on, the person's next step with its link, the tools built and the last test. Pass request (an id or app name) for one request with its full timeline; refresh true looks again now instead of within five minutes.","tags":["Connected apps and CRM"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"request":{"description":"Request id or app name. Omit to list all.","type":"string","minLength":1,"maxLength":80},"refresh":{"default":false,"description":"true to check the request again now.","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/app_request_update":{"post":{"operationId":"app_request_update","summary":"App request update","description":"Changes an app request. action \"connect\": start Keystone-managed setup and, when the vendor needs the person once, return the sign-in popup address. action \"credential\": hand a vendor-supplied API credential into the request server-side (pass credential, never a chat message). action \"site\": add the web address where the person signs in (pass site). action \"cancel\": stop the request. action \"offer\": once the app is Ready, offer it to every workspace in this account (to \"account\") or to every Keystone workspace (to \"everyone\"). The offer carries the tool descriptions only, never keys, logins or results; each workspace still connects with its own access. An offer to everyone may wait for Keystone's check before it lists. action \"withdraw\": take an offer back. Offers need an owner or admin.","tags":["Connected apps and CRM"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"request":{"type":"string","minLength":1,"maxLength":80,"description":"Request id or app name."},"action":{"type":"string","enum":["connect","credential","site","cancel","offer","withdraw"]},"site":{"description":"For action \"site\": the sign-in web address.","type":"string","maxLength":500},"to":{"default":"account","description":"For action \"offer\".","type":"string","enum":["account","everyone"]},"credential":{"description":"For action \"credential\": the vendor-supplied API credential.","type":"object","properties":{"secret":{"type":"string","maxLength":4096},"username":{"type":"string","maxLength":320},"password":{"type":"string","maxLength":4096}},"additionalProperties":false},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["request","action"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"apps","x-keystone-needs-approval":false}},"/v1/tools/phone_recording_notice_set":{"post":{"operationId":"phone_recording_notice_set","summary":"Phone recording notice set","description":"Add a workspace notice after the recording disclosure for callers and answering staff. Set an empty notice to restore the default.","tags":["Phone, texts and receptionist"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"notice":{"type":"string","maxLength":240},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["notice"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/messaging_time_zone_set":{"post":{"operationId":"messaging_time_zone_set","summary":"Messaging time zone set","description":"Set the local time zone for a known recipient or the workspace default for messaging hours.","tags":["Phone, texts and receptionist"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"recipient":{"type":"string","pattern":"^\\+1[2-9]\\d{9}$"},"time_zone":{"type":"string","maxLength":64},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["time_zone"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/call_rescue_settings":{"post":{"operationId":"call_rescue_settings","summary":"Call rescue settings","description":"Configure call coaching, the booking window and local sending hours (8 am to 8 pm). Automatic texts apply only to missed calls. Supply a tracking company ID to include its inbound calls. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Phone, texts and receptionist"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"disable":{"type":"boolean"},"configure":{"type":"object","properties":{"timeZone":{"type":"string"},"windowHours":{"default":24,"type":"integer","minimum":1,"maximum":168},"autoMissed":{"default":false,"type":"boolean"},"bookingSource":{"type":"string","enum":["fieldpulse","workiz","housecall_pro","jobber","highlevel_location"]},"trackingCompany":{"type":"string","pattern":"^(COM[a-f0-9]+|\\d+)$"}},"required":["timeZone"]},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"phone","x-keystone-needs-approval":true}},"/v1/tools/call_transcript":{"post":{"operationId":"call_transcript","summary":"Call transcript","description":"Read a call transcript and booking assessment in this workspace.","tags":["Phone, texts and receptionist"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":180},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/calls_unbooked":{"post":{"operationId":"calls_unbooked","summary":"Calls unbooked","description":"List callers who wanted to book and had no matching job after the booking window.","tags":["Phone, texts and receptionist"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/call_rescue_queue":{"post":{"operationId":"call_rescue_queue","summary":"Call rescue queue","description":"List pending rescue drafts, edit a text, approve delivery or skip a caller. (Sends an external message; confirm with the user first. If the workspace requires approval for sends, the result has status needs_approval: share the approve_url, then call again with the same arguments plus approval_id.)","tags":["Phone, texts and receptionist"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"default":"list","type":"string","enum":["list","edit","approve","skip"]},"id":{"type":"string","minLength":1,"maxLength":180},"body":{"type":"string","minLength":1,"maxLength":1200},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"send","x-keystone-module":"phone","x-keystone-needs-approval":true}},"/v1/tools/call_coaching_report":{"post":{"operationId":"call_coaching_report","summary":"Call coaching report","description":"Read seven days of call outcomes, staff booking rates, lost reasons and coaching examples. Pass end_date for an exclusive UTC end date.","tags":["Phone, texts and receptionist"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"end":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/phone_search":{"post":{"operationId":"phone_search","summary":"Phone search","description":"Find available US voice numbers and quote the monthly rental and setup in USD micros. Toll-free numbers have no city.","tags":["Phone, texts and receptionist"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"default":"local","type":"string","enum":["local","toll-free"]},"areaCode":{"type":"string","pattern":"^[2-9]\\d{2}$"},"city":{"type":"string","minLength":1,"maxLength":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/phone_lookup_once":{"post":{"operationId":"phone_lookup_once","summary":"Phone lookup once","description":"One-time lookup: get the caller name and line type for a US number. Each lookup costs about 0.022 USD from the wallet. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Phone, texts and receptionist"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","pattern":"^\\+1[2-9]\\d{9}$"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["number"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"phone","x-keystone-needs-approval":true}},"/v1/tools/phone_lookup":{"post":{"operationId":"phone_lookup","summary":"Phone lookup","description":"Compatibility alias for phone_lookup_once. One-time lookup: get the caller name and line type for a US number. Each lookup costs about 0.022 USD from the wallet. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Phone, texts and receptionist"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","pattern":"^\\+1[2-9]\\d{9}$"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["number"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"phone","x-keystone-needs-approval":true}},"/v1/tools/phone_buy":{"post":{"operationId":"phone_buy","summary":"Phone buy","description":"Charge the card for the first month and setup, then buy the quoted US tracking number. Reuse the same UUID on retries. Keystone asks the owner to approve the first-month total before buying. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Phone, texts and receptionist"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Purchase reference for this tracking number."},"number":{"type":"string","pattern":"^\\+1[2-9]\\d{9}$"},"maximumMicros":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"First-month total including setup in USD micros, from the phone_search quote."},"label":{"type":"string","minLength":1,"maxLength":100,"description":"Campaign or source to attribute incoming calls to."},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id","number","maximumMicros","label"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"phone","x-keystone-needs-approval":true}},"/v1/tools/phone_list":{"post":{"operationId":"phone_list","summary":"Phone list","description":"List this workspace’s tracking numbers, forwarding settings and renewal dates.","tags":["Phone, texts and receptionist"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/phone_forward":{"post":{"operationId":"phone_forward","summary":"Phone forward","description":"Forward incoming calls to a business number. Enable recording only with the required consent. If set, the whisper plays to the answering party.","tags":["Phone, texts and receptionist"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Purchase reference for this tracking number."},"to":{"type":"string","pattern":"^\\+1[2-9]\\d{9}$"},"whisper":{"default":"","type":"string","maxLength":300},"record":{"default":false,"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id","to"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/phone_release":{"post":{"operationId":"phone_release","summary":"Phone release","description":"Release a tracking number and stop forwarding and future renewals.","tags":["Phone, texts and receptionist"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Purchase reference for this tracking number."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"destructive","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/calls_list":{"post":{"operationId":"calls_list","summary":"Calls list","description":"List the 100 most recent inbound calls with their campaign, tracking number, and caller lookup: caller name, business or consumer, line type (mobile, landline, VoIP) and a note when the lookup was skipped.","tags":["Phone, texts and receptionist"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/call_get":{"post":{"operationId":"call_get","summary":"Call get","description":"Get an inbound call with its caller lookup (name, line type, carrier) and its recordings. Open recording links while signed in to Keystone.","tags":["Phone, texts and receptionist"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sid":{"anyOf":[{"type":"string","pattern":"^CA[0-9a-f]{32}$"},{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","pattern":"^v[23]:[A-Za-z0-9_-]{8,240}$"}]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["sid"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/caller_lookup_settings_get":{"post":{"operationId":"caller_lookup_settings_get","summary":"Caller lookup settings get","description":"Read workspace caller enrichment settings, price per new caller and recent lookup counts.","tags":["Phone, texts and receptionist"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/caller_lookup_settings_set":{"post":{"operationId":"caller_lookup_settings_set","summary":"Caller lookup settings set","description":"Enable or disable ongoing paid caller enrichment for this workspace. Each new US caller is billed once per 30 days.","tags":["Phone, texts and receptionist"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["enabled"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/caller_lookup":{"post":{"operationId":"caller_lookup","summary":"Caller lookup","description":"Read or change caller lookup on Keystone Numbers for this workspace. When on, each new US caller is looked up once (name and line type) and billed to the wallet; repeat callers within 30 days are free, and lookups stop when the wallet has no balance.","tags":["Phone, texts and receptionist"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"description":"Turn caller lookup on or off. Leave empty to read the setting.","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/sms_send":{"post":{"operationId":"sms_send","summary":"SMS send","description":"Send one text through this workspace’s approved US messaging campaign to a recipient who opted in. (Sends an external message; confirm with the user first. If the workspace requires approval for sends, the result has status needs_approval: share the approve_url, then call again with the same arguments plus approval_id.)","tags":["Phone, texts and receptionist"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","pattern":"^\\+1[2-9]\\d{9}$"},"body":{"type":"string","minLength":1,"maxLength":1600},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["to","body"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"send","x-keystone-module":"phone","x-keystone-needs-approval":true}},"/v1/tools/a2p_start":{"post":{"operationId":"a2p_start","summary":"Texting start","description":"Drafts business texting registration from what Keystone already knows about the business, looks up public EIN records, runs read-only website compliance pre-flight (planning exact additive edits for Keystone-hosted sites or exact patches for external sites), and submits only after the owner reviews the exact carrier submission and approves the plain wallet fee. Leave submit false first to draft and pre-flight without editing live pages; set submit true once legal facts are confirmed and website checks pass. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Phone, texts and receptionist"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"legal_name":{"description":"Exact IRS legal business name.","type":"string","minLength":1,"maxLength":120},"dba_name":{"description":"Public DBA or brand name if different from legal name.","type":"string","minLength":1,"maxLength":120},"ein":{"description":"US Federal Tax ID (EIN, 9 digits).","type":"string","maxLength":20},"entity_type":{"description":"Legal entity type (LLC, CORPORATION, SOLE_PROPRIETOR, PARTNERSHIP, NON_PROFIT, CO_OPERATIVE).","type":"string","enum":["LLC","CORPORATION","SOLE_PROPRIETOR","PARTNERSHIP","NON_PROFIT","CO_OPERATIVE"]},"vertical":{"description":"Industry vertical, e.g. HEALTHCARE, LEGAL, RETAIL, PROFESSIONAL.","type":"string","minLength":2,"maxLength":40},"website":{"description":"Public business website URL.","type":"string","minLength":3,"maxLength":300},"street":{"description":"Registered business street address.","type":"string","minLength":2,"maxLength":160},"city":{"description":"Business city.","type":"string","minLength":2,"maxLength":80},"state":{"description":"Two-letter US state code.","type":"string","minLength":2,"maxLength":30},"postal_code":{"description":"Five-digit US ZIP code.","type":"string","minLength":5,"maxLength":10},"contact_first_name":{"description":"Authorized representative first name.","type":"string","minLength":1,"maxLength":60},"contact_last_name":{"description":"Authorized representative last name.","type":"string","minLength":1,"maxLength":60},"contact_email":{"description":"Authorized representative email.","type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"contact_phone":{"description":"Authorized representative US phone number.","type":"string","minLength":10,"maxLength":20},"contact_title":{"description":"Authorized representative title (default Owner).","type":"string","minLength":1,"maxLength":60},"support_email":{"description":"Customer support email for SMS help replies.","type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"support_phone":{"description":"Customer support phone for SMS help replies.","type":"string","minLength":10,"maxLength":20},"tier":{"description":"Messaging volume tier: low_volume (default), standard, or sole_proprietor.","type":"string","enum":["low_volume","standard","sole_proprietor"]},"use_case":{"description":"Messaging use case (auto-drafted when omitted).","type":"string","enum":["LOW_VOLUME","MIXED","CUSTOMER_CARE","ACCOUNT_NOTIFICATION","DELIVERY_NOTIFICATION","MARKETING","SOLE_PROPRIETOR"]},"confirm_facts":{"description":"Set true once the owner has confirmed the legal business facts.","type":"boolean"},"fix_site":{"default":false,"description":"When submit is true, apply the approved additive Keystone site updates shown in the approval diff before submitting (default false).","type":"boolean"},"create_agent_job":{"description":"For external sites, queue an agent job to apply the compliance patches.","type":"boolean"},"submit":{"default":false,"description":"Set true after legal facts are confirmed and pre-flight passes to approve the exact submission, pay the wallet fee, and submit to carriers.","type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"phone","x-keystone-needs-approval":true}},"/v1/tools/a2p_status":{"post":{"operationId":"a2p_status","summary":"Texting status","description":"Returns the workspace business texting registration status, exact carrier submission draft, website compliance checks, planned additive site diffs, plain wallet fees, what is left, and recent updates. Polls the phone carrier when registration is in review.","tags":["Phone, texts and receptionist"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"refresh":{"default":true,"description":"Poll the carrier for the latest review status when pending (default true).","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/a2p_fix":{"post":{"operationId":"a2p_fix","summary":"Texting fix","description":"Checks website compliance, drafts updated carrier-facing copy after a rejection, applies approved additive compliance edits to Keystone-hosted sites (showing the exact diff in approval), or resubmits updated registration details after fresh owner approval. Pass resubmit:false and apply_site_edits:false to draft and inspect changes without mutating the site or submitting. (Ends access or deletes data, so a person must approve it first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. approved: true in the input never counts as approval.)","tags":["Phone, texts and receptionist"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"legal_name":{"description":"Exact IRS legal business name.","type":"string","minLength":1,"maxLength":120},"dba_name":{"description":"Public DBA or brand name if different from legal name.","type":"string","minLength":1,"maxLength":120},"ein":{"description":"US Federal Tax ID (EIN, 9 digits).","type":"string","maxLength":20},"entity_type":{"description":"Legal entity type (LLC, CORPORATION, SOLE_PROPRIETOR, PARTNERSHIP, NON_PROFIT, CO_OPERATIVE).","type":"string","enum":["LLC","CORPORATION","SOLE_PROPRIETOR","PARTNERSHIP","NON_PROFIT","CO_OPERATIVE"]},"vertical":{"description":"Industry vertical, e.g. HEALTHCARE, LEGAL, RETAIL, PROFESSIONAL.","type":"string","minLength":2,"maxLength":40},"website":{"description":"Public business website URL.","type":"string","minLength":3,"maxLength":300},"street":{"description":"Registered business street address.","type":"string","minLength":2,"maxLength":160},"city":{"description":"Business city.","type":"string","minLength":2,"maxLength":80},"state":{"description":"Two-letter US state code.","type":"string","minLength":2,"maxLength":30},"postal_code":{"description":"Five-digit US ZIP code.","type":"string","minLength":5,"maxLength":10},"contact_first_name":{"description":"Authorized representative first name.","type":"string","minLength":1,"maxLength":60},"contact_last_name":{"description":"Authorized representative last name.","type":"string","minLength":1,"maxLength":60},"contact_email":{"description":"Authorized representative email.","type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"contact_phone":{"description":"Authorized representative US phone number.","type":"string","minLength":10,"maxLength":20},"contact_title":{"description":"Authorized representative title (default Owner).","type":"string","minLength":1,"maxLength":60},"support_email":{"description":"Customer support email for SMS help replies.","type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"support_phone":{"description":"Customer support phone for SMS help replies.","type":"string","minLength":10,"maxLength":20},"apply_site_edits":{"default":false,"description":"Apply the narrow additive compliance edits (privacy clause, terms, unchecked consent checkbox, append footer links) to a Keystone-hosted site after owner approval.","type":"boolean"},"create_agent_job":{"default":false,"description":"Queue an agent job to apply compliance patches on an external site.","type":"boolean"},"resubmit":{"description":"Resubmit updated details to carriers after owner approval (defaults to true when rejected).","type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"destructive","x-keystone-module":"phone","x-keystone-needs-approval":true}},"/v1/tools/receptionist_setup":{"post":{"operationId":"receptionist_setup","summary":"Receptionist setup","description":"Create or update an AI receptionist on a legacy Retell AI or Vapi connection already present in this workspace. New workspaces use keystone_receptionist_setup, Keystone's built-in receptionist. Automatically pulls business name, hours, services, service area, and booking rules from workspace memory and lets you override any field.","tags":["Phone, texts and receptionist"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"description":"Legacy voice provider: \"retell\" or \"vapi\". Omit when only one is connected in this workspace.","type":"string","enum":["retell","vapi"]},"agent_id":{"description":"Existing Keystone AI receptionist ID to update.","type":"string","maxLength":60},"name":{"description":"Label for this AI receptionist agent.","type":"string","minLength":1,"maxLength":100},"business_name":{"description":"Business name spoken by the receptionist.","type":"string","minLength":1,"maxLength":120},"hours":{"description":"Business hours in plain text, such as \"Mon-Fri 8am-5pm, Sat 9am-1pm\".","type":"string","minLength":1,"maxLength":300},"business_hours":{"description":"Structured daily schedule keyed by sun..sat (for example { mon: \"08:00-17:00\" }).","type":"object","propertyNames":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]},"additionalProperties":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"required":["sun","mon","tue","wed","thu","fri","sat"]},"time_zone":{"description":"IANA time zone for after-hours routing, such as America/Chicago.","type":"string","maxLength":80},"services":{"description":"Services offered by the business.","type":"string","minLength":1,"maxLength":1500},"service_area":{"description":"Cities, counties, or ZIP codes served.","type":"string","minLength":1,"maxLength":800},"booking_rules":{"description":"Scheduling rules, dispatch minimums, and emergency handling.","type":"string","minLength":1,"maxLength":1500},"greeting":{"description":"Opening sentence spoken when the call connects.","type":"string","minLength":1,"maxLength":400},"voice_id":{"description":"Provider voice ID to use for the receptionist.","type":"string","minLength":1,"maxLength":120},"model_provider":{"description":"Vapi LLM provider (default openai).","type":"string","minLength":1,"maxLength":40},"model_name":{"description":"Vapi LLM model (default gpt-4o-mini).","type":"string","minLength":1,"maxLength":80},"crm_target":{"default":"auto","description":"Where booked appointments and captured leads route: auto (connected CRM), highlevel_location, hubspot, jobber, housecall_pro, or dashboard.","type":"string","enum":["auto","serviceline_crm","highlevel_location","hubspot","jobber","housecall_pro","dashboard"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/receptionist_attach":{"post":{"operationId":"receptionist_attach","summary":"Receptionist attach","description":"Route a workspace Keystone Number to an AI receptionist always, after business hours, as overflow when nobody answers, or turn AI routing off.","tags":["Phone, texts and receptionist"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string","minLength":1,"maxLength":80,"description":"Keystone tracking number ID or E.164 phone number (+1...) in this workspace."},"agent_id":{"description":"Keystone AI receptionist ID. Defaults to the sole receptionist when the workspace has only one.","type":"string","maxLength":60},"mode":{"type":"string","enum":["always","after_hours","overflow","off"],"description":"Routing mode: always, after_hours, overflow (ring business first, then AI), or off."},"overflow_timeout_seconds":{"default":20,"description":"Seconds to ring the forwarding number before overflowing to the AI receptionist (5 to 60).","type":"integer","minimum":5,"maximum":60},"time_zone":{"description":"IANA time zone override for after-hours routing.","type":"string","maxLength":80},"hours":{"description":"Business hours override for after-hours routing.","type":"string","maxLength":300},"business_hours":{"description":"Structured daily schedule override.","type":"object","propertyNames":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]},"additionalProperties":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"required":["sun","mon","tue","wed","thu","fri","sat"]},"vapi_phone_number_id":{"description":"Existing Vapi phone number ID for provider-bypass routing instead of a new Vapi SIP URI.","type":"string","maxLength":120},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["phone","mode"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/receptionist_calls":{"post":{"operationId":"receptionist_calls","summary":"Receptionist calls","description":"List recent AI receptionist calls with transcripts, call outcomes, booked appointments, CRM delivery status, and campaign attribution.","tags":["Phone, texts and receptionist"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"description":"Filter by one Keystone AI receptionist ID.","type":"string","maxLength":60},"outcome":{"description":"Filter by outcome (booked, lead_captured, callback_requested, question_answered, spam, other).","type":"string","enum":["booked","lead_captured","callback_requested","question_answered","spam","other"]},"sync":{"default":true,"description":"Pull latest calls from the legacy provider and push any new booked or captured leads to the workspace CRM.","type":"boolean"},"include_transcript":{"default":true,"description":"Include call transcripts in the response.","type":"boolean"},"limit":{"default":20,"description":"Maximum calls to return (1 to 50).","type":"integer","minimum":1,"maximum":50},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/keystone_receptionist_setup":{"post":{"operationId":"keystone_receptionist_setup","summary":"Keystone receptionist setup","description":"Set up or change the Keystone receptionist, Keystone's own AI that answers calls on Keystone Numbers. Needs Keystone Computers on the workspace ($15 a month); call minutes are billed to the wallet. It can check the calendar and book within your rules, look up the caller in your records, check job status, check whether an email arrived, take a lead or a message, text an approved link, and transfer to a person. By default it only reads and records inside Keystone: booking stays a request for the team to confirm, and texting, CRM push and calendar writes stay off until you turn them on. It says it is an AI up front where a state law asks for it, and truthfully whenever a caller asks. Leave every field empty to read the current setup. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Phone, texts and receptionist"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"description":"Turn the receptionist on or off for this workspace.","type":"boolean"},"business_name":{"type":"string","minLength":1,"maxLength":120},"greeting":{"description":"First words on every call. Keystone always adds that the caller is speaking with an AI.","type":"string","maxLength":300},"hours":{"description":"Business hours in plain English, e.g. \"Mon-Fri 8am-5pm, Sat 9am-1pm\".","type":"string","maxLength":300},"time_zone":{"description":"IANA time zone, e.g. America/Chicago.","type":"string","maxLength":80},"services":{"type":"string","maxLength":1500},"service_area":{"type":"string","maxLength":500},"notes":{"description":"Facts the receptionist may share: policies, parking, warranty, FAQ answers.","type":"string","maxLength":2000},"voice":{"type":"string","enum":["marin","cedar","alloy","ash","coral","sage","verse"]},"booking_mode":{"description":"off: never offers times. request: records the chosen time for the team to confirm (default). book: books inside the rules below.","type":"string","enum":["off","request","book"]},"slot_minutes":{"type":"integer","minimum":15,"maximum":480},"min_notice_minutes":{"type":"integer","minimum":0,"maximum":10080},"max_days_ahead":{"type":"integer","minimum":1,"maximum":90},"max_per_day":{"type":"integer","minimum":1,"maximum":50},"bookable_services":{"description":"Services that may be booked by phone. Empty means any listed service.","maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"calendar_events":{"description":"Check the connected Google Calendar for busy times and add booked appointments to it.","type":"boolean"},"push_leads":{"description":"Send captured leads to the connected CRM. Off keeps them in Keystone.","type":"boolean"},"crm_target":{"type":"string","maxLength":40},"allow_sms":{"description":"Let the receptionist text the caller one of the approved links.","type":"boolean"},"sms_links":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":40},"url":{"type":"string","maxLength":500}},"required":["label","url"]}},"transfer_number":{"type":["string","null"]},"transfer_when":{"type":"string","enum":["never","asked","urgent"]},"recording_notice":{"description":"always (default), all_party (only where state law requires consent from everyone), or off.","type":"string","enum":["always","all_party","off"]},"business_state":{"anyOf":[{"type":"string","pattern":"^[A-Za-z]{2}$"},{"type":"null"}]},"numbers":{"description":"Which Keystone Numbers the receptionist answers: always, after_hours, overflow (when nobody picks up), or off.","maxItems":50,"type":"array","items":{"type":"object","properties":{"phone_id":{"type":"string","minLength":1,"maxLength":80},"mode":{"type":"string","enum":["always","after_hours","overflow","off"]},"overflow_seconds":{"type":"integer","minimum":5,"maximum":60}},"required":["phone_id","mode"]}},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"phone","x-keystone-needs-approval":true}},"/v1/tools/keystone_receptionist_calls":{"post":{"operationId":"keystone_receptionist_calls","summary":"Keystone receptionist calls","description":"Review calls the Keystone receptionist answered: outcome, summary, bookings, messages and cost. Pass call_id for the full transcript and every tool it used.","tags":["Phone, texts and receptionist"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"call_id":{"type":"string","maxLength":60},"limit":{"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/appointment_get":{"post":{"operationId":"appointment_get","summary":"Appointment get","description":"Show an appointment the Keystone receptionist booked or took as a request: service, time, customer, address and notes. Omit id for the soonest request waiting for confirmation (or the next booked one). In AI apps that show cards it has a Confirm button.","tags":["Phone, texts and receptionist"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"Booking id, for example kbk_... from keystone_receptionist_calls.","type":"string","minLength":1,"maxLength":60},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/appointment_confirm":{"post":{"operationId":"appointment_confirm","summary":"Appointment confirm","description":"Confirm an appointment request the Keystone receptionist took, so it counts as booked. Adds it to the connected Google Calendar when calendar writes are on. Does not message the customer. Confirm with the person first.","tags":["Phone, texts and receptionist"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":60,"description":"Booking id from appointment_get."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/call_place":{"post":{"operationId":"call_place","summary":"Call place","description":"Keystone Voice: call a phone number from this workspace's Keystone Number and get something done, in a natural voice. Give the goal (\"confirm Sarah Miller's Thursday 2 PM appointment\", \"ask the supplier when order 4417 ships\", \"get a quote for a 50-gallon water heater install\") and the facts it may share. It works phone menus, waits on hold without running up the bill, talks with the person, checks Keystone (calendar, customer records, invoices, notebook) mid-call, and returns the answer, transcript, recording and outcome. Pass up to 25 numbers in \"calls\" to call several at once with the same goal. Returns call ids right away; read results with call_status (wait_seconds waits for the calls to finish). Calls to businesses need nothing else. Calls to people need consent Keystone already has (a booking, a form, a recorded opt-in) and ring only in their local calling hours; Keystone checks this and says why when a call cannot go out. The owner can listen live and take over from the call page. Billed to the wallet per call. (Sends an external message; confirm with the user first. If the workspace requires approval for sends, the result has status needs_approval: share the approve_url, then call again with the same arguments plus approval_id.)","tags":["Phone, texts and receptionist"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"US phone number to call. Use \"calls\" for several.","type":"string","maxLength":25},"name":{"description":"Who you are calling.","type":"string","maxLength":120},"calls":{"description":"Several numbers to call with the same goal.","maxItems":25,"type":"array","items":{"type":"object","properties":{"to":{"type":"string","minLength":7,"maxLength":25,"description":"US phone number to call."},"name":{"description":"Who it is: \"Northside Supply\", \"Sarah Miller\".","type":"string","maxLength":120},"goal":{"description":"Overrides the shared goal for this number.","type":"string","maxLength":2000},"facts":{"description":"Extra facts for this number only.","type":"string","maxLength":4000}},"required":["to"]}},"goal":{"type":"string","minLength":5,"maxLength":2000,"description":"What the call should get done, in plain words."},"facts":{"description":"What the caller may share: account numbers, order numbers, dates, names, budget. Nothing else is shared.","type":"string","maxLength":4000},"recipient":{"type":"string","enum":["business","consumer"],"description":"business: a company, office, store or phone menu. consumer: a person at their own phone, such as a customer."},"purpose":{"description":"informational (default): about an order, a job, an appointment, a question. marketing: selling or promoting; needs written consent for people.","type":"string","enum":["informational","marketing"]},"consent_note":{"description":"For a business reached on a cell phone: why this business may call it, e.g. \"their order line from the supplier's invoice\".","type":"string","maxLength":500},"language":{"description":"Language to start in, e.g. \"en\" or \"es\". The caller switches if they answer in another.","type":"string","maxLength":5},"max_minutes":{"description":"Time limit, holds included. Default 20.","type":"integer","minimum":2,"maximum":90},"voicemail":{"description":"On voicemail: leave a short message (default) or hang up.","type":"string","enum":["leave","hang_up"]},"allow_tools":{"description":"Extra Keystone tools the call may use, beyond reading the calendar, records, invoices and notebook.","maxItems":20,"type":"array","items":{"type":"string","maxLength":80}},"record":{"description":"Record the call (default true). Keystone adds the recording notice where state law asks for it.","type":"boolean"},"fast":{"description":"Use the quicker, lower-cost voice for short, simple calls such as a confirmation.","type":"boolean"},"from_phone_id":{"description":"Which Keystone Number to call from. Defaults to the newest.","type":"string","maxLength":60},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["goal","recipient"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"send","x-keystone-module":"phone","x-keystone-needs-approval":true}},"/v1/tools/call_status":{"post":{"operationId":"call_status","summary":"Call status","description":"Keystone Voice: the result of calls placed with call_place: status, answer, details, summary, outcome, recording link and the full transcript. Pass call_id or batch_id; wait_seconds waits for live calls to finish.","tags":["Phone, texts and receptionist"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"call_id":{"type":"string","maxLength":40},"batch_id":{"type":"string","maxLength":40},"wait_seconds":{"description":"Wait up to this long for live calls to finish.","type":"integer","minimum":0,"maximum":50},"include_timeline":{"description":"Every step: keys pressed, holds, tools used.","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/calls_placed":{"post":{"operationId":"calls_placed","summary":"Calls placed","description":"Keystone Voice: recent calls this workspace placed, newest first, with answers and outcomes.","tags":["Phone, texts and receptionist"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/call_hangup":{"post":{"operationId":"call_hangup","summary":"Call hangup","description":"Keystone Voice: end a live call now, or cancel one still waiting to dial.","tags":["Phone, texts and receptionist"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"call_id":{"type":"string","maxLength":40},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["call_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/call_consent_record":{"post":{"operationId":"call_consent_record","summary":"Call consent record","description":"Keystone Voice: record that a person agreed to get calls from this business, with the evidence, so calls to them can go out. express: they agreed to calls about their job, order or appointment (for example they asked to be called, or gave this number on a work order). written: a signed agreement to marketing calls. Also use do_not_call to record that someone asked not to be called, or undo=true to remove that.","tags":["Phone, texts and receptionist"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string","maxLength":25},"kind":{"type":"string","enum":["express","written"]},"scope":{"type":"string","enum":["informational","marketing","all"]},"evidence":{"description":"How and when they agreed, in plain words. Required to record consent.","type":"string","maxLength":1000},"do_not_call":{"description":"Record that this number asked not to be called.","type":"boolean"},"undo":{"description":"With do_not_call, remove the number from the do-not-call list (only when they asked to be called again).","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["phone"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/speed_settings":{"post":{"operationId":"speed_settings","summary":"Speed settings","description":"Configure automatic SMS for opted-in callers and form leads. Hours use the workspace time zone. Texts can be sent from 8 AM until 8 PM. (Sends an external message; confirm with the user first. If the workspace requires approval for sends, the result has status needs_approval: share the approve_url, then call again with the same arguments plus approval_id.)","tags":["Phone, texts and receptionist"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"missed":{"type":"string","minLength":1,"maxLength":1200},"form":{"type":"string","minLength":1,"maxLength":1200},"owner":{"type":"string","pattern":"^\\+1[2-9]\\d{9}$"},"timeZone":{"type":"string"},"startHour":{"type":"integer","minimum":0,"maximum":23},"endHour":{"type":"integer","minimum":0,"maximum":24},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["enabled","missed","form","timeZone","startHour","endHour"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"send","x-keystone-module":"phone","x-keystone-needs-approval":true}},"/v1/tools/speed_form_received":{"post":{"operationId":"speed_form_received","summary":"Speed form received","description":"Record a new form submission and trigger configured lead and owner texts. Reuse the submission ID on retry. (Sends an external message; confirm with the user first. If the workspace requires approval for sends, the result has status needs_approval: share the approve_url, then call again with the same arguments plus approval_id.)","tags":["Phone, texts and receptionist"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"phone":{"type":"string","pattern":"^\\+1[2-9]\\d{9}$"},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"type":"string","maxLength":200},"smsConsent":{"type":"boolean"},"channel":{"type":"string","minLength":1,"maxLength":100},"campaign":{"default":"","type":"string","maxLength":200},"click":{"type":"string","maxLength":250},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id","phone","smsConsent","channel"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"send","x-keystone-module":"phone","x-keystone-needs-approval":true}},"/v1/tools/frontdoor_setup":{"post":{"operationId":"frontdoor_setup","summary":"Frontdoor setup","description":"Set up or update the front door for this workspace: one phone number, one inbox address the business can forward lead emails to or publish, and one booking link. Reuses an existing Keystone Number (pass phoneId from phone_list, or it picks the first active one). It never buys a number: when there is none, it says so; buying is phone_search then phone_buy, which charges the card and needs the owner's approval. Also saves settings: business hours, quiet hours for texts, owner contact for alerts, whether email leads may be texted, allowed senders, the auto reply, and booking options. Returns the inbox address, the booking link, a small page file to publish at /book on the workspace site with site_deploy, and what is still missing.","tags":["Phone, texts and receptionist"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"phoneId":{"description":"An active Keystone Number in this workspace, from phone_list.","type":"string","minLength":1,"maxLength":80},"forwardTo":{"description":"Ring this number when someone calls the front door number (E.164, e.g. +12025550100).","type":"string","pattern":"^\\+1[2-9]\\d{9}$"},"settings":{"type":"object","properties":{"businessName":{"type":"string","minLength":1,"maxLength":100},"timeZone":{"type":"string","minLength":1,"maxLength":64},"hours":{"type":"string","minLength":1,"maxLength":200},"quietStart":{"type":"integer","minimum":0,"maximum":23},"quietEnd":{"type":"integer","minimum":0,"maximum":23},"textEmailLeads":{"type":"boolean"},"ownerName":{"type":"string","minLength":1,"maxLength":100},"ownerPhone":{"type":"string","pattern":"^\\+1[2-9]\\d{9}$"},"ownerEmail":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"allowedSenders":{"maxItems":50,"type":"array","items":{"type":"string","minLength":3,"maxLength":254}},"autoReply":{"type":"string","minLength":1,"maxLength":600},"booking":{"type":"object","properties":{"enabled":{"type":"boolean"},"slotMinutes":{"type":"integer","minimum":15,"maximum":240},"daysAhead":{"type":"integer","minimum":1,"maximum":30},"leadHours":{"type":"integer","minimum":0,"maximum":72},"services":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}}}}}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/frontdoor_inbox":{"post":{"operationId":"frontdoor_inbox","summary":"Frontdoor inbox","description":"Recent items from the front door timeline (calls, texts, emails, bookings), newest first, each with who it was from, the source and service, the rule that matched, and what Keystone did (filed, added to the CRM, texted, alerted someone, queued for after quiet hours).","tags":["Phone, texts and receptionist"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"default":25,"type":"integer","minimum":1,"maximum":100},"channel":{"type":"string","enum":["call","text","email","booking"]},"kind":{"description":"lead, reply, spam, receipt or other.","type":"string","enum":["lead","reply","spam","receipt","other"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/frontdoor_rules":{"post":{"operationId":"frontdoor_rules","summary":"Frontdoor rules","description":"Read or replace the front door routing rules. The first enabled rule that matches decides what happens. Match by channels (call, text, email, booking), source, service, keyword, and hours (open, closed or any, from the business hours). Actions: person (alert a phone or email; empty uses the owner), receptionist (calls only), auto_reply (text with consent, otherwise email), crm_stage (pipelineId and stageId), file (no action). Leads always go to the CRM unless a file rule matches. Pass rules to replace them all, reset to restore the defaults, or nothing to read.","tags":["Phone, texts and receptionist"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"rules":{"maxItems":25,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"enabled":{"default":true,"type":"boolean"},"match":{"default":{},"type":"object","properties":{"channels":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","enum":["call","text","email","booking"]}},"source":{"description":"Matches when the lead source contains this text.","type":"string","minLength":1,"maxLength":80},"service":{"description":"Matches when the requested service contains this text.","type":"string","minLength":1,"maxLength":80},"keyword":{"description":"Matches when the subject or message contains this text.","type":"string","minLength":1,"maxLength":80},"hours":{"default":"any","type":"string","enum":["any","open","closed"]}}},"action":{"type":"string","enum":["person","receptionist","auto_reply","crm_stage","file"]},"target":{"default":{},"type":"object","properties":{"name":{"type":"string","maxLength":100},"phone":{"type":"string","pattern":"^\\+1[2-9]\\d{9}$"},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"pipelineId":{"type":"string","minLength":1,"maxLength":120},"stageId":{"type":"string","minLength":1,"maxLength":120},"message":{"type":"string","minLength":1,"maxLength":600}}}},"required":["name","action"]}},"reset":{"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/frontdoor_reply":{"post":{"operationId":"frontdoor_reply","summary":"Frontdoor reply","description":"Reply to a front door item. Without send it returns a draft in the business voice to show the owner. With send true it sends the exact message the owner approved, by text when the person may be texted (they texted or called, booked with consent, or the workspace allows texting email leads), otherwise by email. Sending checks opt-outs, business texting approval and quiet hours; a text during quiet hours waits until they end. (Sends an external message; confirm with the user first. If the workspace requires approval for sends, the result has status needs_approval: share the approve_url, then call again with the same arguments plus approval_id.)","tags":["Phone, texts and receptionist"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"itemId":{"type":"string","pattern":"^fdi_[a-f0-9]{20}$"},"message":{"description":"Required when send is true: the exact text the owner approved.","type":"string","minLength":1,"maxLength":1200},"channel":{"type":"string","enum":["sms","email"]},"send":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["itemId"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"send","x-keystone-module":"phone","x-keystone-needs-approval":true}},"/v1/tools/inbox_list":{"post":{"operationId":"inbox_list","summary":"Inbox list","description":"List conversations in this workspace, newest first: one thread per contact across texts, email, calls (with transcripts and recordings), voicemail and missed calls. Each row says whether it is unread, needs a reply, who it is assigned to, and the last message. Open one with inbox_thread.","tags":["Phone, texts and receptionist"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"filter":{"default":"open","description":"open: not marked done. mine: assigned to you.","type":"string","enum":["open","unread","mine","unassigned","done","all"]},"channel":{"description":"Only threads that include this channel.","type":"string","enum":["text","email","call","voicemail","chat","dm"]},"limit":{"default":25,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/inbox_thread":{"post":{"operationId":"inbox_thread","summary":"Inbox thread","description":"Read one conversation: every text, email, call card (who answered, length, summary, transcript, recording link), voicemail and missed call with this contact, oldest first, plus the channel inbox_reply would use. Pass mark_read true when a person has seen it.","tags":["Phone, texts and receptionist"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"thread":{"type":"string","minLength":3,"maxLength":254,"description":"The thread: the contact's phone (+18135550142) or email, as inbox_list returns it."},"mark_read":{"default":false,"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["thread"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/inbox_reply":{"post":{"operationId":"inbox_reply","summary":"Inbox reply","description":"Reply in a conversation. With no channel it answers the way the contact last wrote (a text gets a text, an email gets an email; after a call it texts). Pass channel to choose. Show the owner the exact words before sending. Texts check opt-outs, consent, business texting approval and quiet hours; a text in quiet hours waits until they end. The first text to a number adds \"Reply STOP to opt out.\" (Sends an external message; confirm with the user first. If the workspace requires approval for sends, the result has status needs_approval: share the approve_url, then call again with the same arguments plus approval_id.)","tags":["Phone, texts and receptionist"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"thread":{"type":"string","minLength":3,"maxLength":254,"description":"The thread: the contact's phone (+18135550142) or email, as inbox_list returns it."},"message":{"type":"string","minLength":1,"maxLength":1200,"description":"The exact words the owner approved."},"channel":{"description":"Leave empty to answer on the channel the contact used.","type":"string","enum":["text","email"]},"subject":{"description":"Email only. Defaults to \"Re:\" and the last subject.","type":"string","maxLength":200},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["thread","message"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"send","x-keystone-module":"phone","x-keystone-needs-approval":true}},"/v1/tools/inbox_assign":{"post":{"operationId":"inbox_assign","summary":"Inbox assign","description":"Assign a conversation to a team member (\"me\", their email or name), or pass to as null to unassign.","tags":["Phone, texts and receptionist"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"thread":{"type":"string","minLength":3,"maxLength":254,"description":"The thread: the contact's phone (+18135550142) or email, as inbox_list returns it."},"to":{"anyOf":[{"type":"string","minLength":1,"maxLength":254},{"type":"null"}],"description":"\"me\", a team member's email or name, or null."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["thread","to"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/inbox_mark":{"post":{"operationId":"inbox_mark","summary":"Inbox mark","description":"Mark a conversation read or unread, or done (it leaves the open list until the contact writes again).","tags":["Phone, texts and receptionist"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"thread":{"type":"string","minLength":3,"maxLength":254,"description":"The thread: the contact's phone (+18135550142) or email, as inbox_list returns it."},"read":{"type":"boolean"},"done":{"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["thread"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/chat_booking_get":{"post":{"operationId":"chat_booking_get","summary":"Chat booking get","description":"Shows whether this business takes bookings in ChatGPT, Claude and Gemini, its services with length and deposit, area, hours, the cell that gets booking texts, and upcoming chat bookings.","tags":["Phone, texts and receptionist"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/chat_booking_setup":{"post":{"operationId":"chat_booking_setup","summary":"Chat booking setup","description":"Sets up chat booking from what Keystone already knows about the business: front door settings, saved memory, appointment requests, the website, rank tracking places and Google Business Profile. Preserves owner choices already saved, turns it on when enough is known, and reports what still needs an owner decision. Owners and admins only.","tags":["Phone, texts and receptionist"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/chat_booking_save":{"post":{"operationId":"chat_booking_save","summary":"Chat booking save","description":"Turns chat booking on or off and saves its settings: services (name, minutes in 15-minute steps, deposit in cents, price label), town, state, ZIP, area served, hours, time zone and the verified owner cell for booking texts. Read chat_booking_get first and send every field back. Owners and admins only.","tags":["Phone, texts and receptionist"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"name":{"type":"string"},"category":{"type":"string"},"about":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"postal_code":{"type":"string"},"service_area":{"type":"string"},"time_zone":{"type":"string"},"hours":{"type":"string"},"step_minutes":{"anyOf":[{"type":"number","const":15},{"type":"number","const":30},{"type":"number","const":60}]},"lead_hours":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"days_ahead":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"services":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"deposit_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"price_label":{"type":"string"}},"required":["name","minutes","deposit_cents"]}},"notify_contact_id":{"type":["string","null"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["enabled","name","time_zone","hours","services"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/chat_booking_cancel":{"post":{"operationId":"chat_booking_cancel","summary":"Chat booking cancel","description":"Cancels one chat booking by id and opens its time again. Keystone support refunds the deposit until Stripe Connect is on. Keystone does not message the buyer; call or text them yourself.","tags":["Phone, texts and receptionist"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"booking_id":{"type":"string","minLength":4,"maxLength":40},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["booking_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"destructive","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/text_assistant_settings":{"post":{"operationId":"text_assistant_settings","summary":"Text assistant settings","description":"Read or change the workspace text assistant. Turns texting the Keystone line on or off and chooses which assistant capabilities are allowed.","tags":["Phone, texts and receptionist"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"description":"Whether verified workspace phones can text the assistant.","type":"boolean"},"allowed_tools":{"description":"Assistant capabilities to allow: summary, calendar, leads, calls, text_customer, reminders.","type":"array","items":{"type":"string","enum":["summary","calendar","leads","calls","text_customer","reminders"]}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/gap_fill_launch":{"post":{"operationId":"gap_fill_launch","summary":"Gap fill launch","description":"A booked appointment canceled: open the slot and line up who to offer it to. Ranks the waitlist (people waiting on a later booking go first) and past customers who are due back, in waves. Nothing is sent: it returns the people, the text they would get and a page link. Offers go out only when the owner or an admin presses Send offers on that page. With a deposit, the first person to pay it gets the slot and anyone who pays after it is taken is refunded automatically. starts_at takes a local time like \"2026-11-27 14:00\" (read in the business time zone) or an ISO time with a zone.","tags":["Phone, texts and receptionist"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"starts_at":{"type":"string","minLength":10,"maxLength":40},"ends_at":{"type":"string","minLength":10,"maxLength":40},"duration_minutes":{"type":"integer","minimum":5,"maximum":600},"service":{"type":"string","maxLength":80},"with_whom":{"description":"The stylist, doctor or person the appointment is with.","type":"string","maxLength":80},"deposit_dollars":{"description":"Deposit to claim the slot, 0 for none. Charged by card on a claim page.","type":"number","minimum":0,"maximum":100000},"worth_dollars":{"description":"What the appointment is worth, for the money-saved total.","type":"number","minimum":0,"maximum":100000},"time_zone":{"type":"string","maxLength":64},"message":{"description":"Custom text. Must include {link} and an opt-out line. Can use {first_name}, {service}, {business}, {when}, {with}, {deposit}.","type":"string","maxLength":480},"max_people":{"type":"integer","minimum":1,"maximum":40},"wave_size":{"type":"integer","minimum":1,"maximum":20},"wave_gap_minutes":{"type":"integer","minimum":5,"maximum":120},"close_before_minutes":{"description":"Stop offering this many minutes before the start. Default 30.","type":"integer","minimum":0,"maximum":1440},"overdue_weeks":{"description":"Past customers count as due back after this many weeks. Default 8.","type":"integer","minimum":2,"maximum":104},"source":{"type":"string","maxLength":40},"source_ref":{"description":"The canceled booking or calendar event id, so one cancellation opens one slot.","type":"string","maxLength":200},"canceled_phone":{"description":"The phone of the person who canceled. They are not offered the slot.","type":"string","maxLength":40},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["starts_at"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/gap_fill_status":{"post":{"operationId":"gap_fill_status","summary":"Gap fill status","description":"Open slots from cancellations in this workspace: who was offered each one, who opened the link, who paid, and who booked it. Pass slot_id for one slot with every person.","tags":["Phone, texts and receptionist"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"slot_id":{"type":"string","maxLength":40},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/gap_fill_cancel":{"post":{"operationId":"gap_fill_cancel","summary":"Gap fill cancel","description":"Stop offering an open slot: no more waves go out and open card pages close. A booked slot cannot be canceled here.","tags":["Phone, texts and receptionist"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slot_id":{"type":"string","minLength":1,"maxLength":40},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["slot_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/waitlist_add":{"post":{"operationId":"waitlist_add","summary":"Waitlist add","description":"Add a customer to the waitlist for last-minute openings, or update them. Only add people who asked to be texted about openings. days and the earliest and latest start times limit which openings they are offered; current_booking_at marks someone holding a later appointment who wants to come in sooner.","tags":["Phone, texts and receptionist"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"phone":{"type":"string","minLength":7,"maxLength":40},"asked_to_be_texted":{"type":"boolean","const":true,"description":"true: they asked to be texted when a time opens."},"service":{"type":"string","maxLength":80},"days":{"maxItems":7,"type":"array","items":{"type":"string","maxLength":12}},"earliest_start":{"type":"string","maxLength":10},"latest_start":{"type":"string","maxLength":10},"current_booking_at":{"type":"string","maxLength":40},"note":{"type":"string","maxLength":300},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["name","phone","asked_to_be_texted"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/waitlist_list":{"post":{"operationId":"waitlist_list","summary":"Waitlist list","description":"The waitlist for last-minute openings in this workspace, with the days and times each person can come.","tags":["Phone, texts and receptionist"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"include_removed":{"default":false,"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/waitlist_remove":{"post":{"operationId":"waitlist_remove","summary":"Waitlist remove","description":"Take a person off the waitlist. They are not offered openings again unless added back.","tags":["Phone, texts and receptionist"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"waitlist_id":{"type":"string","minLength":1,"maxLength":40},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["waitlist_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"phone","x-keystone-needs-approval":false}},"/v1/tools/financing_link":{"post":{"operationId":"financing_link","summary":"Financing link","description":"Create a Wisetack customer financing link for a quote amount ($500 to $65,000) and customer using this workspace’s connected Wisetack partner credentials. Requires Wisetack partner approval. (Sends an external message; confirm with the user first. If the workspace requires approval for sends, the result has status needs_approval: share the approve_url, then call again with the same arguments plus approval_id.)","tags":["Wallet, purchases and financing"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount_usd":{"type":"number","minimum":500,"maximum":65000,"description":"Quote amount in USD ($500 to $65,000)."},"customer_name":{"type":"string","minLength":1,"maxLength":120,"description":"Customer full name."},"customer_phone":{"description":"Customer mobile phone number.","type":"string","maxLength":30},"customer_email":{"description":"Customer email address.","type":"string","maxLength":200},"quote_reference":{"description":"Estimate, proposal, or invoice reference ID.","type":"string","maxLength":100},"service_description":{"description":"Short description of the quoted work.","type":"string","maxLength":300},"estimated_completion_date":{"description":"Estimated completion date (YYYY-MM-DD).","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"send_via":{"default":"link_only","description":"Return link_only, or ask Wisetack to send the application by sms or email.","type":"string","enum":["link_only","sms","email"]},"idempotency_key":{"description":"Reuse the same key on retries so duplicate financing links are not created.","type":"string","minLength":4,"maxLength":100},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["amount_usd","customer_name"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"send","x-keystone-module":"wallet","x-keystone-needs-approval":true}},"/v1/tools/financing_status":{"post":{"operationId":"financing_status","summary":"Financing status","description":"Check status of one financing link (refreshing live status from Wisetack when partner access is enabled) or list recent financing applications in this workspace.","tags":["Wallet, purchases and financing"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"financing_id":{"description":"Keystone financing ID (fin_...) or Wisetack application ID. Omit to list recent applications.","type":"string","maxLength":120},"refresh":{"default":true,"description":"When financing_id is provided, query Wisetack for the latest status.","type":"boolean"},"status":{"description":"Status filter when listing workspace applications.","type":"string","enum":["created","prequal_started","prequalified","pending","action_required","offer_locked","confirmed","funded","declined","expired","canceled"]},"limit":{"default":20,"description":"Maximum applications to list (1 to 50).","type":"integer","minimum":1,"maximum":50},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"wallet","x-keystone-needs-approval":false}},"/v1/tools/wallet_status":{"post":{"operationId":"wallet_status","summary":"Wallet status","description":"Shows the account wallet balance, whether a card is on file, and auto top-up settings.","tags":["Wallet, purchases and financing"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"wallet","x-keystone-needs-approval":false}},"/v1/tools/wallet_history":{"post":{"operationId":"wallet_history","summary":"Wallet history","description":"Shows the receipt for the last 50 charges and credits: date, item, description, amount, and whether the wallet or the card paid. Includes formatted USD and micro-dollar amounts.","tags":["Wallet, purchases and financing"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"wallet","x-keystone-needs-approval":false}},"/v1/tools/client_wallet_status":{"post":{"operationId":"client_wallet_status","summary":"Client wallet status","description":"Agency view of this client's wallet: on or off, balance, this month's billing to the client, Keystone's cost to the agency, the agency's margin, the agency's prices for each item, and the latest ledger lines. Owners and admins only.","tags":["Wallet, purchases and financing"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"wallet","x-keystone-needs-approval":false}},"/v1/tools/client_wallet_settings":{"post":{"operationId":"client_wallet_settings","summary":"Client wallet settings","description":"Turn this client's wallet on or off, set the balance that triggers a low-balance notice to the agency, and choose whether the agency's own wallet covers the client when their balance runs short. When on, everything Keystone charges for this client comes out of the client's wallet at the agency's prices.","tags":["Wallet, purchases and financing"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"low_balance_usd":{"type":"number","minimum":0,"maximum":100000},"agency_backstop":{"description":"Move money from the agency's wallet when the client's balance is short.","type":"boolean"},"agency_backstop_usd":{"type":"number","minimum":1,"maximum":10000},"client_auto_top_up_off":{"description":"Turn off the client's automatic card payments. Only the client can turn them on.","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"wallet","x-keystone-needs-approval":false}},"/v1/tools/client_wallet_recharge_set":{"post":{"operationId":"client_wallet_recharge_set","summary":"Client wallet recharge set","description":"Set the recharge terms for a client wallet. The client approves them when saving a card.","tags":["Wallet, purchases and financing"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"threshold_usd":{"type":"number","minimum":0.01,"maximum":5000},"amount_usd":{"type":"number","minimum":10,"maximum":5000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["threshold_usd","amount_usd"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"wallet","x-keystone-needs-approval":false}},"/v1/tools/client_wallet_price_set":{"post":{"operationId":"client_wallet_price_set","summary":"Client wallet price set","description":"Set the agency's price to its client for one item or every item, as a percent over the agency's cost or a fixed price per charge (never below the agency's cost). applies_to 'client' sets it for this client; 'default' sets it for every client without their own price. Pass clear: true to remove a price. Keystone's own price to the agency does not change.","tags":["Wallet, purchases and financing"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"string","enum":["*","instant","domain","phone_number","calls","texts","caller_lookup","transcription","receptionist","voice_calls","queries","ai_visibility","notebook_writer","ad_drafts","client_videos","social_videos","site_drafts","direct_mail","email","email_marketing","audiences","visitor_id","ctv","computers","ai","redshift_compute","redshift_storage","roof_reports"],"description":"An item, or '*' for every item."},"applies_to":{"default":"client","type":"string","enum":["client","default"]},"percent":{"description":"Percent over your cost, for example 40 for plus 40%.","type":"number","minimum":0,"maximum":1000},"fixed_usd":{"description":"Client price per charge in dollars.","type":"number","minimum":0,"maximum":100000},"clear":{"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["item"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"wallet","x-keystone-needs-approval":false}},"/v1/tools/client_wallet_fund":{"post":{"operationId":"client_wallet_fund","summary":"Client wallet fund","description":"Move money from the agency's own Keystone wallet into this client's wallet. Use when the agency pays for the client and bills them itself. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Wallet, purchases and financing"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount_usd":{"type":"number","minimum":1,"maximum":10000},"request_key":{"type":"string","minLength":6,"maxLength":80,"description":"A new random value per transfer, reused only to retry the same transfer."},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["amount_usd","request_key"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"wallet","x-keystone-needs-approval":true}},"/v1/tools/client_wallet_receipts":{"post":{"operationId":"client_wallet_receipts","summary":"Client wallet receipts","description":"This client's wallet balance and receipts at the prices the client pays. Safe to show the client. Works for client seats too.","tags":["Wallet, purchases and financing"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"wallet","x-keystone-needs-approval":false}},"/v1/tools/attribution_sync":{"post":{"operationId":"attribution_sync","summary":"Attribution sync","description":"Refresh a lead cohort. Select one booking system and the client-specific tracker IDs. Includes workspace tracking calls, received forms and bound Google Ads spend. Replaces the exact period atomically.","tags":["Reports, tracking and research"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"crm":{"type":"string","enum":["fieldpulse","workiz","housecall_pro","jobber","highlevel_location"]},"timeZone":{"default":"UTC","description":"Business time zone for CRM dates without offsets and lead cohorts. Choose the advertising account time zone.","type":"string"},"trackingLabels":{"default":[],"maxItems":100,"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"channel":{"type":"string"},"campaign":{"type":"string"}},"required":["label","channel","campaign"]}},"callrailCompany":{"type":"string","minLength":1},"whatconvertsProfile":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"ctmAccount":{"type":"string","pattern":"^\\d+$"},"metaAccount":{"type":"string","pattern":"^act_\\d+$"},"localServices":{"default":true,"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["from","to","crm"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/cost_per_booked_job":{"post":{"operationId":"cost_per_booked_job","summary":"Cost per booked job","description":"Preferred acquisition metric. Spend for the lead cohort divided by jobs booked within 30 days of those leads. Returns channel and campaign totals, account currencies, and name-only matches excluded for review.","tags":["Reports, tracking and research"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"leadOffset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["from","to"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/lead_to_revenue":{"post":{"operationId":"lead_to_revenue","summary":"Lead to revenue","description":"Trace a source-prefixed lead ID to customer, booked jobs, confidence and linked invoice amounts in source currency.","tags":["Reports, tracking and research"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lead":{"type":"string"},"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["lead","from","to"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/budget_recommendations":{"post":{"operationId":"budget_recommendations","summary":"Budget recommendations","description":"Compare channels by cost per booked job. Suggest a budget test when the 30-day booking window has closed and channels have comparable spend.","tags":["Reports, tracking and research"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["from","to"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/briefing_today":{"post":{"operationId":"briefing_today","summary":"Briefing today","description":"Build the morning briefing for this workspace from the numbers Keystone already has: yesterday's calls answered and missed, new form leads, new reviews and the bad ones, open watchdog alerts, content waiting for approval, and ad spend against leads when ads are connected. It reads stored data only and calls no paid data service. For an account owner or admin of an agency with several clients it also builds the roll-up across all of them, with the clients that need attention first. Pass send_email to send it to the addresses in the briefing settings. (Sends an external message; confirm with the user first. If the workspace requires approval for sends, the result has status needs_approval: share the approve_url, then call again with the same arguments plus approval_id.)","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"send_email":{"default":false,"description":"Send the briefing by email as well as showing it here.","type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"send","x-keystone-module":"reports","x-keystone-needs-approval":true}},"/v1/tools/briefing_settings":{"post":{"operationId":"briefing_settings","summary":"Briefing settings","description":"Read or change the morning briefing settings: the time it arrives, the time zone it uses, the addresses that receive it and whether it is on. For an agency, set the roll-up across every client instead of one workspace.","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"default":"workspace","description":"One workspace, or the roll-up across every client in the account.","type":"string","enum":["workspace","account"]},"enabled":{"description":"Turn the briefing on or off.","type":"boolean"},"send_hour":{"description":"The hour it arrives, in the time zone below.","type":"integer","minimum":0,"maximum":23},"send_minute":{"description":"The minute it arrives.","type":"integer","minimum":0,"maximum":59},"time_zone":{"description":"The time zone of the business, like America/New_York.","type":"string","minLength":1,"maxLength":64},"recipients":{"description":"The addresses that get the briefing. Leave it out to send it to the account owners.","maxItems":10,"type":"array","items":{"type":"string","minLength":3,"maxLength":254}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/track_keywords":{"post":{"operationId":"track_keywords","summary":"Track keywords","description":"Save up to 100 keywords for recurring Google organic checks in a workspace. Use a city or US ZIP and choose the device and cadence. Checks are billed pay-as-you-go from the Keystone wallet. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Reports, tracking and research"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","maxLength":253},"location":{"type":"string","minLength":1,"maxLength":200,"description":"US ZIP or full location name such as Atlanta,Georgia,United States."},"device":{"default":"mobile","type":"string","enum":["mobile","desktop"]},"engine":{"default":"google","type":"string","const":"google"},"language":{"default":"en","type":"string","pattern":"^[a-z]{2}(?:-[a-z]{2,4})?$"},"frequency":{"default":"weekly","type":"string","enum":["daily","weekly"]},"keywords":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["domain","location","keywords"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"reports","x-keystone-needs-approval":true}},"/v1/tools/untrack_keywords":{"post":{"operationId":"untrack_keywords","summary":"Untrack keywords","description":"Stop recurring checks for keyword IDs from tracked_keywords. Keep saved history.","tags":["Reports, tracking and research"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["ids"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/tracked_keywords":{"post":{"operationId":"tracked_keywords","summary":"Tracked keywords","description":"List scheduled keywords, current Google organic position, ranking URL, best position, and 7- and 30-day change. Positions outside the top 100 are null. Changes use the latest observation at or before the comparison date, with unranked treated as 101.","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/rank_history":{"post":{"operationId":"rank_history","summary":"Rank history","description":"Get recent organic checks for one keyword ID from tracked_keywords, including the ranking URL and check status.","tags":["Reports, tracking and research"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"days":{"default":90,"type":"integer","minimum":1,"maximum":365},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/rank_report":{"post":{"operationId":"rank_report","summary":"Rank report","description":"Report ranking gains, losses, entries to the top 3 and 10, and organic share of voice against named competitor domains. Change compares successful observations.","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"days":{"default":7,"anyOf":[{"type":"number","const":7},{"type":"number","const":30}]},"domain":{"type":"string","maxLength":253},"competitors":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":253}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/rank_check_now":{"post":{"operationId":"rank_check_now","summary":"Rank check now","description":"Run one paid live Google organic check for a tracked keyword ID and save the result. Scheduled checks continue on their usual cadence. (Paid lookup, a few cents. It runs right away within the workspace daily lookup allowance. Past the allowance it returns needs_approval: share approve_url, then call again with approval_id.)","tags":["Reports, tracking and research"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"reports","x-keystone-needs-approval":true}},"/v1/tools/grid_track":{"post":{"operationId":"grid_track","summary":"Grid track","description":"Schedule recurring Google Maps checks for a keyword around a Google Place ID. Each point is a paid search. Radius is the distance from the center to the middle of each edge in miles. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Reports, tracking and research"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keyword":{"type":"string","minLength":1,"maxLength":200},"place_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,200}$","description":"Google Business Profile Place ID."},"business_name":{"type":"string","minLength":1,"maxLength":160},"latitude":{"type":"number","minimum":-85,"maximum":85},"longitude":{"type":"number","minimum":-180,"maximum":180},"radius_miles":{"default":3,"type":"number","minimum":0.1,"maximum":30},"size":{"default":7,"anyOf":[{"type":"number","const":3},{"type":"number","const":5},{"type":"number","const":7},{"type":"number","const":9}]},"language":{"default":"en","type":"string","pattern":"^[a-z]{2}(?:-[a-z]{2,4})?$"},"frequency":{"default":"weekly","type":"string","enum":["daily","weekly"]},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["keyword","place_id","business_name","latitude","longitude"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"reports","x-keystone-needs-approval":true}},"/v1/tools/grid_results":{"post":{"operationId":"grid_results","summary":"Grid results","description":"List tracked map grids or pass an ID to see the latest and previous runs, average rank among ranked points, share of checked points in the top 3, and up to three competitors per point.","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/grid_untrack":{"post":{"operationId":"grid_untrack","summary":"Grid untrack","description":"Stop recurring checks for a map grid ID from grid_results. Keep saved grid history.","tags":["Reports, tracking and research"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/tracking_resume":{"post":{"operationId":"tracking_resume","summary":"Tracking resume","description":"Resume scheduled rank tracking after adding wallet funds. Keystone will settle any outstanding search charges before starting new checks. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"reports","x-keystone-needs-approval":true}},"/v1/tools/queries_research":{"post":{"operationId":"queries_research","summary":"Queries research","description":"Run and save Keystone Queries research. Choose keyword ideas or metrics, live Google results, organic competitors, ranked keywords, backlinks, or a backlink summary. Billed pay-as-you-go from the Keystone wallet. Provide a name to make the saved result easy to find. (Paid lookup, a few cents. It runs right away within the workspace daily lookup allowance. Past the allowance it returns needs_approval: share approve_url, then call again with approval_id.)","tags":["Reports, tracking and research"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["keyword_ideas","keyword_metrics","serp","competitors","ranked_keywords","backlinks","backlink_summary"]},"query":{"type":"string","minLength":1,"maxLength":300,"description":"A keyword for keyword ideas, keyword metrics, or search results. A domain for competitor or backlink research."},"name":{"description":"Name for the saved run. Defaults to the research type and query.","type":"string","minLength":1,"maxLength":120},"market":{"default":"United States","description":"Country for keyword and competitor data, or a country or full location name for live search.","type":"string","minLength":1,"maxLength":150},"language":{"default":"en","type":"string","pattern":"^[a-z]{2,3}(?:-[a-z]{2,4})?$"},"request_id":{"description":"Reuse this ID when retrying the same run to avoid another provider charge.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["kind","query"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"reports","x-keystone-needs-approval":true}},"/v1/tools/queries_saved":{"post":{"operationId":"queries_saved","summary":"Queries saved","description":"List saved Keystone Queries research in the current workspace, newest first. Use a result ID with queries_get to reopen a snapshot.","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["keyword_ideas","keyword_metrics","serp","competitors","ranked_keywords","backlinks","backlink_summary"]},"limit":{"default":20,"type":"integer","minimum":1,"maximum":50},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/queries_get":{"post":{"operationId":"queries_get","summary":"Queries get","description":"Open a saved Keystone Queries run in this workspace. Returns the original inputs, date and available results without a new lookup.","tags":["Reports, tracking and research"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/queries_rename":{"post":{"operationId":"queries_rename","summary":"Queries rename","description":"Change the name of completed Keystone Queries research in this workspace.","tags":["Reports, tracking and research"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":120},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id","name"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/queries_payment_retry":{"post":{"operationId":"queries_payment_retry","summary":"Queries payment retry","description":"Retry the wallet payment for a saved Keystone Queries run marked payment_due. Uses the recorded cost and returns the saved run. (Paid lookup, a few cents. It runs right away within the workspace daily lookup allowance. Past the allowance it returns needs_approval: share approve_url, then call again with approval_id.)","tags":["Reports, tracking and research"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"reports","x-keystone-needs-approval":true}},"/v1/tools/queries_pay":{"post":{"operationId":"queries_pay","summary":"Queries pay","description":"Compatibility alias for queries_payment_retry. Retry the wallet payment for a saved Keystone Queries run marked payment_due. Uses the recorded cost and returns the saved run. (Paid lookup, a few cents. It runs right away within the workspace daily lookup allowance. Past the allowance it returns needs_approval: share approve_url, then call again with approval_id.)","tags":["Reports, tracking and research"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"reports","x-keystone-needs-approval":true}},"/v1/tools/research_page_snapshot":{"post":{"operationId":"research_page_snapshot","summary":"Research page snapshot","description":"Inspect any public webpage in a single rendered page load. Returns two or more formats together: markdown, links, scraped DOM elements, accessibilityTree, HTML content, screenshot, PDF (base64), or AI-extracted JSON. Useful for competitor landing pages, service-page teardowns, and prospect audits.","tags":["Reports, tracking and research"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri","description":"Public http or https webpage URL to inspect."},"formats":{"default":["markdown","links","scrape"],"description":"At least two distinct formats to capture in one load (markdown, links, scrape, json, accessibilityTree, pdf, screenshot, content).","minItems":2,"maxItems":6,"type":"array","items":{"type":"string","enum":["content","screenshot","markdown","accessibilityTree","pdf","links","scrape","json"]}},"selectors":{"description":"CSS selectors to extract when scrape is included. Defaults to title, meta description, headings, tel links, forms, and JSON-LD.","maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"prompt":{"description":"Extraction instruction required when requesting the json format.","type":"string","minLength":1,"maxLength":1500},"visible_links_only":{"default":true,"description":"Return only visible links when links format is requested.","type":"boolean"},"exclude_external_links":{"default":false,"description":"Return only same-site links when links format is requested.","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["url"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/playbook_list":{"post":{"operationId":"playbook_list","summary":"Playbook list","description":"List the marketing playbooks (local SEO, Business Profile and reviews, AI search visibility, Google Ads and LSA, Meta ads, call tracking, landing pages, client reports, competitor research, reactivation, technical SEO, service pages, why calls dropped) and the playbooks this agency saved. Pass the job in plain words to get the best matches first. Call this before any marketing job, then playbook_get the best match and follow it.","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"job":{"description":"The job in plain words, e.g. \"why did calls drop\" or \"build a google ads campaign\"","type":"string","maxLength":300},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/playbook_get":{"post":{"operationId":"playbook_get","summary":"Playbook get","description":"Get one playbook as markdown: when to use it, the steps with the Keystone tools to call at each step, thresholds, what good output looks like and common mistakes. Pass the id from playbook_list (a plain-language job also works).","tags":["Reports, tracking and research"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":2,"maxLength":300,"description":"Playbook id from playbook_list, e.g. \"local-seo\""},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/ai_visibility_check":{"post":{"operationId":"ai_visibility_check","summary":"AI visibility check","description":"Check whether AI assistants recommend a business. With no queries: runs this client's tracked buyer questions in ChatGPT, Google AI Overviews, Google AI Mode, Perplexity and Gemini (the engines set up for it), saves the answers to the weekly history, and returns the share of answers that name the client, who was named instead and the sources cited. The weekly run is covered by the allowance the owner approved when turning tracking on; any other run asks first. Billed pay-as-you-go from the Keystone wallet. With brand, domain and queries: a one-off check (LLM mention counts, AI Overviews, ChatGPT) that saves nothing. Keep the business name out of the questions. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"brand":{"type":"string","minLength":2,"maxLength":120,"description":"Business name as customers say it"},"domain":{"type":"string","minLength":3,"maxLength":253,"description":"Website domain, e.g. example.com"},"queries":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","minLength":3,"maxLength":300},"description":"Buyer questions as people ask an assistant, e.g. \"who is the best roofing company in Tampa\""},"location_name":{"default":"United States","description":"DataForSEO location for Google results, e.g. \"Tampa,Florida,United States\"","type":"string","maxLength":200},"language_code":{"default":"en","type":"string","minLength":2,"maxLength":8},"chatgpt":{"default":true,"description":"Also ask ChatGPT each question through DataForSEO","type":"boolean"},"chatgpt_runs":{"default":1,"description":"Ask ChatGPT each question this many times; answers vary between runs","type":"integer","minimum":1,"maximum":3},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"reports","x-keystone-needs-approval":true}},"/v1/tools/local_seo_snapshot":{"post":{"operationId":"local_seo_snapshot","summary":"Local SEO snapshot","description":"Local SEO snapshot for one business in one city: its Google Business Profile facts (categories, rating, review count, photos, claimed, hours), its map pack, Google Maps and organic positions for up to 5 money terms, the pack winners with their ratings and review counts, the most common competitor category, the directories Google shows for the brand name with a phone match check, and plain findings. Follow playbook local-seo. DataForSEO bills each call (2 per term plus 2); the result includes the total cost. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Reports, tracking and research"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"business":{"type":"string","minLength":2,"maxLength":200,"description":"Business name exactly as on the Google profile"},"domain":{"description":"Website domain, e.g. example.com","type":"string","maxLength":253},"location_name":{"type":"string","minLength":3,"maxLength":200,"description":"City as DataForSEO names it, e.g. \"Tampa,Florida,United States\""},"keywords":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","minLength":2,"maxLength":200},"description":"Money terms, e.g. \"roof replacement\", \"electrician near me\""},"language_code":{"default":"en","type":"string","minLength":2,"maxLength":8},"maps_depth":{"default":20,"type":"integer","minimum":10,"maximum":100},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["business","location_name","keywords"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"reports","x-keystone-needs-approval":true}},"/v1/tools/keyword_opportunities":{"post":{"operationId":"keyword_opportunities","summary":"Keyword opportunities","description":"Organic keyword opportunities for a domain against up to 3 named competitors (DataForSEO Labs, country-level data). Returns striking-distance keywords (the site ranks 4 to 20), gaps (a competitor ranks top 10, the site does not rank), and keywords where both rank but the competitor is ahead, each with volume and a score, competitor brand terms removed, plus a merged top list. Pass include_terms (services, cities) to keep only relevant keywords. Follow playbooks service-area-pages and competitor-research. DataForSEO bills each call (1 plus 2 per competitor); the result includes the total cost. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Reports, tracking and research"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"description":"Your website domain","type":"string","minLength":3,"maxLength":253},"competitors":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","minLength":3,"maxLength":253},"description":"Competitor domains that rank organically (not directories)"},"location_name":{"default":"United States","description":"Country for DataForSEO Labs; a city is reduced to its country","type":"string","maxLength":200},"language_code":{"default":"en","type":"string","minLength":2,"maxLength":8},"include_terms":{"description":"Keep only keywords containing at least one of these words, e.g. [\"roof\", \"panel upgrade\", \"tampa\"]","maxItems":30,"type":"array","items":{"type":"string","minLength":2,"maxLength":60}},"min_volume":{"default":20,"type":"integer","minimum":0,"maximum":100000},"limit":{"default":200,"description":"Rows read per DataForSEO call","type":"integer","minimum":10,"maximum":500},"top":{"default":25,"type":"integer","minimum":5,"maximum":100},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["domain","competitors"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"reports","x-keystone-needs-approval":true}},"/v1/tools/ai_visibility_report":{"post":{"operationId":"ai_visibility_report","summary":"AI visibility report","description":"Read this client's AI search tracking: share of AI answers that name it, week by week; the latest check engine by engine; the businesses named instead and how often; the sources engines cite when they leave it out; each question with which engines named the client; open fixes; and the monthly cost estimate. Spends nothing.","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"weeks":{"default":12,"type":"integer","minimum":1,"maximum":26},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/ai_visibility_fixes":{"post":{"operationId":"ai_visibility_fixes","summary":"AI visibility fixes","description":"Turn this client's AI search gaps into fixes Keystone can do: answer pages with FAQ schema for questions the engines answer without the client, Business Profile completeness, review requests that mention the service, listings on the directories the engines cite, a reply for a cited forum thread, an email to a cited list, and an llms.txt file. Each fix names the Keystone tool that does it and carries a draft. With draft true, page fixes go to the content review queue as pending drafts. Nothing is published, posted or sent; those steps follow the normal approval rules. Pass fix_id with status to mark one done or dismissed.","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"draft":{"default":false,"description":"Put page drafts in the content review queue and mark the other fixes drafted","type":"boolean"},"fix_id":{"type":"string","maxLength":40},"status":{"description":"With fix_id: mark that fix","type":"string","enum":["open","done","dismissed"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/ai_visibility_setup":{"post":{"operationId":"ai_visibility_setup","summary":"AI visibility setup","description":"Set up weekly AI search tracking. preview true returns suggested buyer questions, the engines and the cost before anything changes. on true turns it on for this client (or every client with all_clients true): an owner or admin approves the monthly estimate, and the Account Manager's weekly Loop runs the check. on false turns it off. Pass questions, engines (chatgpt, google_ai_overview, google_ai_mode, perplexity, gemini), location_name and competitors to change them. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"preview":{"default":false,"type":"boolean"},"on":{"type":"boolean"},"all_clients":{"default":false,"type":"boolean"},"questions":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"string","minLength":5,"maxLength":300}},"engines":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["chatgpt","google_ai_overview","google_ai_mode","perplexity","gemini"]}},"location_name":{"description":"Location, e.g. \"Tampa,Florida,United States\"","type":"string","minLength":2,"maxLength":200},"competitors":{"maxItems":15,"type":"array","items":{"type":"string","minLength":2,"maxLength":120}},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"reports","x-keystone-needs-approval":true}},"/v1/tools/site_audit":{"post":{"operationId":"site_audit","summary":"Site audit","description":"Check a public page for mobile lab speed, visitor performance, technical headers, and a single-load rendered page snapshot (title, meta description, H1s, structured data, tap-to-call phone links, forms, links, and word count). A paid mobile test uses the workspace search account if the free lab is unavailable. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Reports, tracking and research"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["url"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"reports","x-keystone-needs-approval":true}},"/v1/tools/report_monthly":{"post":{"operationId":"report_monthly","summary":"Report monthly","description":"Generate this month's client report for the workspace: pulls calls, leads, booked jobs, ad spend, rankings, map grids, and reviews, writes a plain-English summary with the agency model, saves it to the workspace documents, and shows it in the client portal. Returns the report id and where to find it.","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/prospect_audit":{"post":{"operationId":"prospect_audit","summary":"Prospect audit","description":"Win the pitch: run live search checks on a prospect (business profile, map pack and a 5x5 map grid, organic rankings, backlinks, mobile speed, ads competitors run, AI search visibility), then produce an agency-branded report page and PDF with findings and a 90-day plan, and return a shareable link. Billed pay-as-you-go from the workspace wallet. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Reports, tracking and research"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","minLength":3,"maxLength":253,"description":"Prospect website domain, e.g. example.com"},"business_name":{"type":"string","minLength":2,"maxLength":200,"description":"Business name exactly as on the Google profile"},"city":{"type":"string","minLength":3,"maxLength":200,"description":"City and country, e.g. \"Tampa,Florida,United States\""},"keywords":{"description":"Money terms to check, e.g. \"water heater repair\". Guessed from the name when omitted.","maxItems":3,"type":"array","items":{"type":"string","minLength":2,"maxLength":200}},"place_id":{"description":"Google place_id when known, improves grid matching.","type":"string","maxLength":64},"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["domain","business_name","city"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"reports","x-keystone-needs-approval":true}},"/v1/tools/reports_list":{"post":{"operationId":"reports_list","summary":"Reports list","description":"List generated monthly reports and prospect audits for this workspace.","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["monthly","audit"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/report_share":{"post":{"operationId":"report_share","summary":"Report share","description":"Create a shareable link for a saved prospect audit report so it can be sent to the prospect. Monthly reports are shared through the client portal link instead.","tags":["Reports, tracking and research"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"report_id":{"type":"string","minLength":6,"maxLength":80},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["report_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/watchdog_status":{"post":{"operationId":"watchdog_status","summary":"Watchdog status","description":"Read the overnight watchdog for this workspace: the settings, the last nightly run with every check result, and the open alerts.","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/watchdog_alerts":{"post":{"operationId":"watchdog_alerts","summary":"Watchdog alerts","description":"List the watchdog alerts for this workspace. Open alerts are the ones nobody has dealt with yet.","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"default":"open","type":"string","enum":["open","resolved","all"]},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/watchdog_settings":{"post":{"operationId":"watchdog_settings","summary":"Watchdog settings","description":"Read or change the watchdog settings for this workspace: turn the nightly run on or off, set the thresholds, list the form pages to check, and turn on the safe auto-fixes. Auto-fixes stay off until the agency turns them on.","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"description":"Turn the nightly run on or off.","type":"boolean"},"thresholds":{"type":"object","properties":{"ads_spend_multiple":{"description":"How many times the daily average a day has to cost before it counts as a spike.","type":"number","minimum":1,"maximum":10},"ads_spend_floor":{"description":"Dollars below which a spike is noise.","type":"number","minimum":0,"maximum":100000},"ads_conversion_days":{"description":"Days without a conversion before the tracker counts as broken.","type":"integer","minimum":1,"maximum":7},"rank_drop_positions":{"description":"Places a keyword has to lose before it counts as a drop.","type":"integer","minimum":1,"maximum":50},"calls_silence_days":{"description":"Days a tracking number may be quiet before it counts as stopped.","type":"integer","minimum":1,"maximum":14},"calls_baseline_days":{"description":"Days of calls that make a tracking number worth watching.","type":"integer","minimum":2,"maximum":30},"site_timeout_ms":{"description":"How long a site check waits for an answer.","type":"integer","minimum":2000,"maximum":30000}}},"auto_fix":{"type":"object","properties":{"pause_ads_over_cap":{"description":"Pause a Google Ads campaign that spends more than the cap in one day.","type":"boolean"},"ads_daily_cap":{"description":"The daily cap in dollars for the pause fix.","type":"number","minimum":1,"maximum":100000},"resubmit_sitemap":{"description":"Send the sitemap to Search Console after the site comes back.","type":"boolean"}}},"form_urls":{"description":"Form pages to check every night.","maxItems":25,"type":"array","items":{"type":"string","maxLength":2048,"format":"uri"}},"sitemap_url":{"description":"The sitemap to send to Search Console after the site comes back.","anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/watchdog_run_now":{"post":{"operationId":"watchdog_run_now","summary":"Watchdog run now","description":"Run the overnight checks for this workspace right now and return every result. The nightly schedule does not change.","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/watchdog_resolve_alert":{"post":{"operationId":"watchdog_resolve_alert","summary":"Watchdog resolve alert","description":"Close a watchdog alert after it has been dealt with.","tags":["Reports, tracking and research"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/competitors_list":{"post":{"operationId":"competitors_list","summary":"Competitors list","description":"List the competitors this workspace watches, with the date each one was last checked and what changed since then.","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/competitors_add":{"post":{"operationId":"competitors_add","summary":"Competitors add","description":"Watch a named competitor for this workspace. Give the business name, its domain, the city it serves and the keywords its ads are bought for. The weekly run compares what it does against the client.","tags":["Reports, tracking and research"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":160,"description":"The competitor business name as customers know it."},"domain":{"description":"The competitor website domain, e.g. example.com.","type":"string","maxLength":253},"location_name":{"type":"string","minLength":2,"maxLength":160,"description":"The city the competitor serves, e.g. \"Tampa,Florida,United States\"."},"keywords":{"description":"Keywords to check its ads against, e.g. \"water heater replacement\".","maxItems":5,"type":"array","items":{"type":"string","minLength":2,"maxLength":160}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["name","location_name"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/competitors_remove":{"post":{"operationId":"competitors_remove","summary":"Competitors remove","description":"Stop watching a competitor in this workspace.","tags":["Reports, tracking and research"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/competitor_weekly_summary":{"post":{"operationId":"competitor_weekly_summary","summary":"Competitor weekly summary","description":"Read the latest weekly competitor summary: new ads with the keyword and landing page, new and changed pages, review count and rating changes, and how the client stands against each competitor.","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/competitor_snapshot_get":{"post":{"operationId":"competitor_snapshot_get","summary":"Competitor snapshot get","description":"Read one stored competitor snapshot without refreshing providers: the ads it was running, the pages it published, its review count and rating, and its share of voice.","tags":["Reports, tracking and research"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/competitor_check":{"post":{"operationId":"competitor_check","summary":"Competitor check","description":"Compatibility alias for competitor_snapshot_get. Read one stored competitor snapshot without refreshing providers: the ads it was running, the pages it published, its review count and rating, and its share of voice.","tags":["Reports, tracking and research"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/competitors_refresh":{"post":{"operationId":"competitors_refresh","summary":"Competitors refresh","description":"Refresh this workspace from connected providers now, using their lookup allowances, and return the summary. The weekly schedule does not change.","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/competitor_run_now":{"post":{"operationId":"competitor_run_now","summary":"Competitor run now","description":"Compatibility alias for competitors_refresh. Refresh this workspace from connected providers now, using their lookup allowances, and return the summary. The weekly schedule does not change.","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/revenue_feedback_configure":{"post":{"operationId":"revenue_feedback_configure","summary":"Revenue feedback configure","description":"Read or change revenue feedback for this workspace: Keystone sends each booked, invoiced and paid job from the connected field-service app (Jobber, Housecall Pro, Workiz, FieldPulse or GorillaDesk) back to Google Ads and Meta with its dollar value, matched to the original ad click or to contact details the lead agreed to share. Pick the stage that counts as the main conversion (paid by default) and whether the value is revenue or gross profit. Each stage goes to its own Google Ads conversion action (create them with gads_create_conversion_action kind OFFLINE_LEAD). Call with no arguments to read the settings.","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"description":"Turn the scheduled sends on or off.","type":"boolean"},"field_app":{"description":"Field-service app to read jobs from. auto uses the only connected one.","type":"string","enum":["auto","workiz","fieldpulse","gorilladesk","jobber","housecall_pro"]},"primary_stage":{"description":"Stage that counts as the main conversion. Default paid when the app reports payments.","type":"string","enum":["booked","invoiced","paid"]},"value":{"description":"Send the job revenue, or revenue times margin_percent.","type":"string","enum":["revenue","gross_profit"]},"margin_percent":{"description":"Gross margin percent used when value is gross_profit.","anyOf":[{"type":"number","minimum":1,"maximum":100},{"type":"null"}]},"currency":{"description":"ISO currency code of the job amounts. Default USD.","type":"string","pattern":"^[A-Z]{3}$"},"google_customer_id":{"description":"Google Ads customer bound to this workspace. null stops Google sends.","anyOf":[{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},{"type":"null"}]},"google_actions":{"description":"Conversion action ID per stage. The primary stage needs one. Stages without one are not sent to Google.","type":"object","properties":{"booked":{"anyOf":[{"type":"string","pattern":"^\\d{1,20}$"},{"type":"null"}]},"invoiced":{"anyOf":[{"type":"string","pattern":"^\\d{1,20}$"},{"type":"null"}]},"paid":{"anyOf":[{"type":"string","pattern":"^\\d{1,20}$"},{"type":"null"}]}}},"meta":{"description":"pasted uses the dataset ID and access token saved with connect meta_conversions. connected uses the connected Meta Ads account. off stops Meta sends.","type":"string","enum":["pasted","connected","off"]},"meta_dataset_id":{"description":"Dataset (pixel) ID, for the connected route.","type":"string","pattern":"^\\d{6,20}$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/revenue_feedback_status":{"post":{"operationId":"revenue_feedback_status","summary":"Revenue feedback status","description":"Show what revenue feedback sent to Google Ads and Meta for this workspace: the last run, counts by result, and the latest sends with job, stage, value, match type and any error. Contact details never appear.","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"default":25,"type":"integer","minimum":1,"maximum":100},"errors_only":{"default":false,"description":"Only show failed sends.","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/revenue_feedback_backfill":{"post":{"operationId":"revenue_feedback_backfill","summary":"Revenue feedback backfill","description":"Send booked, invoiced and paid jobs from the last 1 to 90 days that were never sent, each stage once. Dry run by default: returns counts, total value and a sample of what would go to Google Ads and Meta. Pass confirm: true to send. Meta only takes events up to 7 days old, so older stages go to Google only. (Sends an external message; confirm with the user first. If the workspace requires approval for sends, the result has status needs_approval: share the approve_url, then call again with the same arguments plus approval_id.)","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"days":{"default":90,"type":"integer","minimum":1,"maximum":90},"confirm":{"default":false,"description":"true sends. false (default) only reports what would be sent.","type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"send","x-keystone-module":"reports","x-keystone-needs-approval":true}},"/v1/tools/customer_attribution":{"post":{"operationId":"customer_attribution","summary":"Customer attribution","description":"Customer card for one customer in this workspace: who they are (masked phone and email), the source that first acquired them (channel, campaign, ad, keyword, click type), every job with new or repeat and the source that brought that job in, and the lifetime value credited to the acquiring source. Find the customer by customer id, phone, email, field-service customer id, or name. With no argument, lists the top customers by lifetime value.","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customer":{"description":"Customer id from ltv tools or the dashboard (lc_...).","type":"string","maxLength":64},"phone":{"type":"string","maxLength":40},"email":{"type":"string","maxLength":200},"app":{"description":"Field-service app for app_customer_id.","type":"string","enum":["workiz","fieldpulse","gorilladesk","jobber","housecall_pro"]},"app_customer_id":{"type":"string","maxLength":80},"name":{"description":"Name search. Returns matches to pick from when more than one fits.","type":"string","maxLength":120},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/ltv_by_source":{"post":{"operationId":"ltv_by_source","summary":"Ltv by source","description":"Lifetime value by the source that first acquired each customer, for customers whose first job is in the period: new customers, first-job revenue, lifetime value to date, 90, 180 and 365-day cohort value per customer, spend, cost per new customer (CAC), LTV:CAC and payback days. by campaign splits each channel by campaign.","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"description":"First day, YYYY-MM-DD. Default: 365 days before to.","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"description":"Last day, YYYY-MM-DD. Default: today.","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"by":{"default":"channel","type":"string","enum":["channel","campaign"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/ltv_cac_report":{"post":{"operationId":"ltv_cac_report","summary":"Ltv cac report","description":"Which channels pay back: per channel CAC, lifetime value per customer, LTV:CAC and payback days, plus revenue in the period credited two ways (to what brought each job in, and to the source that first acquired the customer). The difference column shows where last-touch reports under-credit acquisition channels such as Google Ads.","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"description":"First day, YYYY-MM-DD. Default: 365 days before to.","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"description":"Last day, YYYY-MM-DD. Default: today.","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/repeat_job_sources":{"post":{"operationId":"repeat_job_sources","summary":"Repeat job sources","description":"Jobs booked in the period grouped by what brought each job in (truck wrap number, past-customer texts, review requests, Google Ads and so on): total, new and repeat jobs and revenue, and for repeat jobs the sources that first acquired those customers. Shows which channels bring repeat work in and who deserves the customer credit.","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"description":"First day, YYYY-MM-DD. Default: 365 days before to.","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"description":"Last day, YYYY-MM-DD. Default: today.","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/ltv_settings":{"post":{"operationId":"ltv_settings","summary":"Ltv settings","description":"Read or change lifetime attribution for this workspace. ad_feedback: off, report_only (default: shows the repeat customer value it would credit to Google Ads or Meta) or send (sends it). Repeat jobs from customers that Google Ads or Meta first acquired go to a separate repeat customer value conversion action in Google Ads (google_action_id, create one with gads_create_conversion_action) and a custom Meta event (meta_event_name), so new-customer conversions are never counted twice. Consent rules match revenue feedback. Also shows backfill progress and the latest results.","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"ad_feedback":{"type":"string","enum":["off","report_only","send"]},"google_action_id":{"description":"Google Ads conversion action id for repeat customer value. null clears it.","anyOf":[{"type":"string","pattern":"^\\d{1,20}$"},{"type":"null"}]},"meta_event_name":{"description":"Meta custom event name. Default RepeatCustomerValue.","type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{2,49}$"},"rebuild":{"description":"true rebuilds history from the start on the next cron ticks.","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/ltv_spend_set":{"post":{"operationId":"ltv_spend_set","summary":"Ltv spend set","description":"Record monthly spend for a channel the ad readers cannot see, such as a truck wrap, yard signs, mailers or a sponsorship, so cost per new customer and LTV:CAC cover it. Use the channel name the reports show (Truck wrap, Yard sign, Print and mail, or a tracking number label). amount 0 removes the entry.","tags":["Reports, tracking and research"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"month":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"YYYY-MM"},"channel":{"type":"string","minLength":1,"maxLength":120},"campaign":{"default":"","type":"string","maxLength":200},"amount":{"type":"number","minimum":0,"maximum":10000000},"currency":{"default":"USD","type":"string","pattern":"^[A-Z]{3}$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["month","channel","amount"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/market_benchmarks":{"post":{"operationId":"market_benchmarks","summary":"Market benchmarks","description":"Shows where the current workspace stands against the market on cost per lead, cost per booked job, call answer rate and new reviews per 30 days: its own number, the market median and quartiles for its industry and metro (or the nearest wider group), and whether it is in the top quarter. Works only when the account owner has turned on outcome data sharing.","tags":["Reports, tracking and research"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reports","x-keystone-needs-approval":false}},"/v1/tools/logins_list":{"post":{"operationId":"logins_list","summary":"Logins list","description":"Lists the logins saved in this workspace: app name, sign-in page, masked username, two-factor method, whether it is turned on, and the owner's notes on where things are in the app. Never returns passwords or codes. To have Keystone sign in to any web app by itself and turn its jobs into tools, use API Anything (anything_app_add, anything_learn, anything_run).","tags":["API Anything apps and saved logins"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"anything","x-keystone-needs-approval":false}},"/v1/tools/login_use":{"post":{"operationId":"login_use","summary":"Login use","description":"Hands ONE saved login in this workspace to API Anything, so Keystone signs in to that app by itself on a Keystone Computer, handles the authenticator code and keeps the session. Keystone never returns the username, password or code to you: you work in the app through Keystone tools (anything_learn to teach a job, anything_run to do it). Every call is recorded in the workspace audit trail with your reason, and each workspace gets 10 calls per 15 minutes.","tags":["API Anything apps and saved logins"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app":{"type":"string","minLength":1,"maxLength":80,"description":"App name as shown by logins_list, or its id."},"reason":{"type":"string","minLength":3,"maxLength":200,"description":"What you want to do in the app, in a few words. Saved in the audit trail."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["app","reason"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"anything","x-keystone-needs-approval":false}},"/v1/tools/computer_use_guide":{"post":{"operationId":"computer_use_guide","summary":"Computer use guide","description":"Short, practical steps for signing in to apps with no API using computer use: in Claude with Claude in Chrome, in ChatGPT agent mode, or with a browser agent on the person's own computer. Lists this workspace's saved logins and the safety rules for login_use. Call it before the first sign-in.","tags":["API Anything apps and saved logins"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"client":{"description":"Only the steps for one AI client. Omit for all three.","type":"string","enum":["claude","chatgpt","local"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"anything","x-keystone-needs-approval":false}},"/v1/tools/memory_save":{"post":{"operationId":"memory_save","summary":"Memory save","description":"Save a client memory, or choose account for agency-wide facts and preferences.","tags":["Memory and documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":12000},"kind":{"type":"string","enum":["fact","decision","preference","note"]},"tags":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"level":{"default":"workspace","type":"string","enum":["workspace","account"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["text","kind"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"memory","x-keystone-needs-approval":false}},"/v1/tools/memory_list":{"post":{"operationId":"memory_list","summary":"Memory list","description":"List recent memories. Includes the current workspace and its account by default.","tags":["Memory and documents"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"level":{"type":"string","enum":["workspace","account"]},"kind":{"type":"string","enum":["fact","decision","preference","note"]},"limit":{"default":20,"type":"integer","minimum":1,"maximum":50},"offset":{"default":0,"type":"integer","minimum":0,"maximum":1000000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"memory","x-keystone-needs-approval":false}},"/v1/tools/memory_search":{"post":{"operationId":"memory_search","summary":"Memory search","description":"Search memories and documents by keyword and meaning. Higher scores indicate closer matches.","tags":["Memory and documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"level":{"type":"string","enum":["workspace","account"]},"kind":{"type":"string","enum":["fact","decision","preference","note"]},"limit":{"default":20,"type":"integer","minimum":1,"maximum":50},"offset":{"default":0,"type":"integer","minimum":0,"maximum":1000000},"query":{"type":"string","minLength":1,"maxLength":300},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["query"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"memory","x-keystone-needs-approval":false}},"/v1/tools/memory_forget":{"post":{"operationId":"memory_forget","summary":"Memory forget","description":"Delete one memory by id and level.","tags":["Memory and documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"level":{"default":"workspace","type":"string","enum":["workspace","account"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"destructive","x-keystone-module":"memory","x-keystone-needs-approval":false}},"/v1/tools/docs_save":{"post":{"operationId":"docs_save","summary":"Docs save","description":"Save a report, audit or document in the workspace library.","tags":["Memory and documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":240},"folder":{"default":"","type":"string","maxLength":240},"content":{"type":"string","minLength":1,"maxLength":120000},"format":{"default":"markdown","type":"string","enum":["markdown","text"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["title","content"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"memory","x-keystone-needs-approval":false}},"/v1/tools/docs_list":{"post":{"operationId":"docs_list","summary":"Docs list","description":"List recent documents in the workspace.","tags":["Memory and documents"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"default":20,"type":"integer","minimum":1,"maximum":50},"offset":{"default":0,"type":"integer","minimum":0,"maximum":1000000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"memory","x-keystone-needs-approval":false}},"/v1/tools/docs_search":{"post":{"operationId":"docs_search","summary":"Docs search","description":"Search document titles, folders and indexed text by relevance.","tags":["Memory and documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":300},"limit":{"default":20,"type":"integer","minimum":1,"maximum":50},"offset":{"default":0,"type":"integer","minimum":0,"maximum":1000000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["query"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"memory","x-keystone-needs-approval":false}},"/v1/tools/docs_get":{"post":{"operationId":"docs_get","summary":"Docs get","description":"Read a document or extracted upload text and get its dashboard download link.","tags":["Memory and documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"offset":{"default":0,"description":"Character offset for the next page of text.","type":"integer","minimum":0,"maximum":9007199254740991},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"memory","x-keystone-needs-approval":false}},"/v1/tools/docs_delete":{"post":{"operationId":"docs_delete","summary":"Docs delete","description":"Delete a workspace document and its file.","tags":["Memory and documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"destructive","x-keystone-module":"memory","x-keystone-needs-approval":false}},"/v1/tools/notebook_search":{"post":{"operationId":"notebook_search","summary":"Notebook search","description":"Search the notebook by keyword and meaning. Returns notes with path, title, tags, a snippet and a score. Leave out query to list recent notes. Searches the workspace and the account notebook by default.","tags":["Notebook and AI rules"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","maxLength":300},"folder":{"description":"Only this folder and its subfolders, e.g. \"Clients\".","type":"string","maxLength":300},"tag":{"type":"string","maxLength":60},"level":{"default":"both","type":"string","enum":["workspace","account","both"]},"limit":{"default":10,"type":"integer","minimum":1,"maximum":50},"offset":{"default":0,"type":"integer","minimum":0,"maximum":10000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"notebook","x-keystone-needs-approval":false}},"/v1/tools/notebook_read":{"post":{"operationId":"notebook_read","summary":"Notebook read","description":"Read one note by path, file name or title, with its frontmatter, tags, links, backlinks and app link. Pass history to list versions, or version to read an old one. Long notes come in pages of 16,000 characters.","tags":["Notebook and AI rules"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","minLength":1,"maxLength":400},"level":{"default":"workspace","description":"workspace: this business. account: the notebook shared by every workspace in the account.","type":"string","enum":["workspace","account"]},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"history":{"default":false,"type":"boolean"},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["note"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"notebook","x-keystone-needs-approval":false}},"/v1/tools/notebook_write":{"post":{"operationId":"notebook_write","summary":"Notebook write","description":"Write a note in markdown (frontmatter, [[wikilinks]] and #tags work as in Obsidian). mode replace, append or prepend. Pass daily to add to today's daily note, decision to record a decision in Decisions, or restore_version to put an old version back. Every save keeps a version.","tags":["Notebook and AI rules"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"description":"Folder path and name, e.g. \"Clients/Acme Dental\" or \"Campaigns/Spring offer\". .md is added.","type":"string","maxLength":400},"content":{"type":"string","maxLength":200000},"mode":{"default":"replace","type":"string","enum":["replace","append","prepend"]},"daily":{"default":false,"description":"Add content to today's daily note (Daily/YYYY-MM-DD).","type":"boolean"},"decision":{"description":"One decision and the reason, added as a dated line in Decisions.","type":"string","maxLength":600},"expected_version":{"description":"The version you read. The write fails if the note changed since.","type":"integer","minimum":1,"maximum":9007199254740991},"restore_version":{"type":"integer","minimum":1,"maximum":9007199254740991},"level":{"default":"workspace","description":"workspace: this business. account: the notebook shared by every workspace in the account.","type":"string","enum":["workspace","account"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"notebook","x-keystone-needs-approval":false}},"/v1/tools/notebook_link":{"post":{"operationId":"notebook_link","summary":"Notebook link","description":"Link one note to another by adding a [[wikilink]] under a Related heading of the first note, with an optional relation such as \"client of\" or \"replaces\". The target may not exist yet; the link starts working when it does.","tags":["Notebook and AI rules"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","minLength":1,"maxLength":400},"to":{"type":"string","minLength":1,"maxLength":400},"relation":{"type":"string","maxLength":80},"level":{"default":"workspace","description":"workspace: this business. account: the notebook shared by every workspace in the account.","type":"string","enum":["workspace","account"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["from","to"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"notebook","x-keystone-needs-approval":false}},"/v1/tools/notebook_graph":{"post":{"operationId":"notebook_graph","summary":"Notebook graph","description":"The notebook as a link graph. mode overview: counts, best connected notes, orphans and links to missing notes. node: one note with its links, backlinks and notes sharing its tags. path: the shortest chain of links between two notes (up to 8). topic: notes about a subject grouped by folder or tag.","tags":["Notebook and AI rules"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"default":"overview","type":"string","enum":["overview","node","path","topic"]},"note":{"description":"For node.","type":"string","maxLength":400},"from":{"description":"For path.","type":"string","maxLength":400},"to":{"description":"For path.","type":"string","maxLength":400},"query":{"description":"For topic.","type":"string","maxLength":300},"by":{"default":"folder","type":"string","enum":["folder","tag"]},"limit":{"default":15,"type":"integer","minimum":1,"maximum":50},"level":{"default":"workspace","description":"workspace: this business. account: the notebook shared by every workspace in the account.","type":"string","enum":["workspace","account"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"notebook","x-keystone-needs-approval":false}},"/v1/tools/notebook_rules_get":{"post":{"operationId":"notebook_rules_get","summary":"Notebook rules get","description":"The rules this business set for its AI (AGENTS.md): the account rules and the current workspace rules. Read them at the start of every job and after switching workspace, and follow them.","tags":["Notebook and AI rules"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"notebook","x-keystone-needs-approval":false}},"/v1/tools/notebook_rules_set":{"post":{"operationId":"notebook_rules_set","summary":"Notebook rules set","description":"Replace the AGENTS.md rules for this workspace or, with level account, for every workspace. Owners and admins only. Show the person the full new text and get their yes first. Old versions stay in history.","tags":["Notebook and AI rules"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"level":{"default":"workspace","description":"workspace: this business. account: the notebook shared by every workspace in the account.","type":"string","enum":["workspace","account"]},"text":{"type":"string","minLength":1,"maxLength":20000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["text"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"notebook","x-keystone-needs-approval":false}},"/v1/tools/notebook_writer_setup":{"post":{"operationId":"notebook_writer_setup","summary":"Notebook writer setup","description":"Set up the notebook that writes itself. preview true returns the sources it would read and the weekly cost before anything changes. on true turns it on (owners and admins approve the weekly allowance); on false turns it off and keeps every page. Sources: call, text, email, booking, voice (calls Keystone made), job, review, deal (deal rooms), memory (saved client facts), action (work Keystone did). Keystone AI reads calls, texts, emails, bookings and reviews; the rest file at no charge. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Notebook and AI rules"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"preview":{"default":false,"type":"boolean"},"on":{"type":"boolean"},"sources":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","enum":["call","text","email","booking","voice","job","review","deal","memory","action"]}},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"notebook","x-keystone-needs-approval":true}},"/v1/tools/notebook_writer_run":{"post":{"operationId":"notebook_writer_run","summary":"Notebook writer run","description":"File what is new now: calls, texts, emails, bookings, jobs, reviews, deal rooms, saved client facts and work Keystone did, into one page per customer, client and topic, each line citing its source. Covered by the weekly allowance when the writer is on; otherwise it asks first. Returns what was filed, what the privacy filter held back and what it cost. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Notebook and AI rules"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"notebook","x-keystone-needs-approval":true}},"/v1/tools/notebook_writer_status":{"post":{"operationId":"notebook_writer_status","summary":"Notebook writer status","description":"Whether the notebook writer is on for this workspace, its sources, weekly allowance and spend, page and line counts, open promises and the last run. Spends nothing.","tags":["Notebook and AI rules"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"notebook","x-keystone-needs-approval":false}},"/v1/tools/notebook_changes":{"post":{"operationId":"notebook_changes","summary":"Notebook changes","description":"What the notebook writer added or changed in the last seven days, page by page: new lines with their citations, lines that gained a source, promises made and kept, and what the privacy filter held back.","tags":["Notebook and AI rules"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"default":15,"type":"integer","minimum":1,"maximum":50},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"notebook","x-keystone-needs-approval":false}},"/v1/tools/notebook_about":{"post":{"operationId":"notebook_about","summary":"Notebook about","description":"Everything on file about one customer or client, by name, phone or email (\"the Millers\", \"813-555-0142\"): open promises with due days, what we know (prices quoted, preferences, problems), the timeline and promises kept. Every line carries its citation. Use it before calling, texting or quoting anyone.","tags":["Notebook and AI rules"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"who":{"type":"string","minLength":2,"maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["who"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"notebook","x-keystone-needs-approval":false}},"/v1/tools/notebook_fact":{"post":{"operationId":"notebook_fact","summary":"Notebook fact","description":"One notebook line and every source behind it: which call, text, email, job, review or deal room, when, and the passage it came from. Pass the line id from a citation link (/notebook/fact/<id>).","tags":["Notebook and AI rules"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fact":{"type":"string","minLength":4,"maxLength":80},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["fact"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"notebook","x-keystone-needs-approval":false}},"/v1/tools/notebook_fact_edit":{"post":{"operationId":"notebook_fact_edit","summary":"Notebook fact edit","description":"Change one line the writer wrote. text replaces its words and locks it, so the writer never changes it again. lock true or false locks or frees it. hide true takes it off the page for good (the writer will not add it back); hide false brings it back. done marks a promise kept or open. revert puts the writer's words back.","tags":["Notebook and AI rules"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fact":{"type":"string","minLength":4,"maxLength":80},"text":{"type":"string","minLength":1,"maxLength":300},"lock":{"type":"boolean"},"hide":{"type":"boolean"},"done":{"type":"boolean"},"revert":{"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["fact"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"notebook","x-keystone-needs-approval":false}},"/v1/tools/notebook_page_restrict":{"post":{"operationId":"notebook_page_restrict","summary":"Notebook page restrict","description":"Restrict a customer or client page (owners and admins). A restricted page is taken out of the notebook, out of search and out of every AI answer, and the writer stops writing it. restricted false brings it back.","tags":["Notebook and AI rules"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"who":{"type":"string","minLength":2,"maxLength":200},"restricted":{"default":true,"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["who"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"notebook","x-keystone-needs-approval":false}},"/v1/tools/skills_search":{"post":{"operationId":"skills_search","summary":"Skills search","description":"Find saved skills (reusable jobs) by what they do. Returns each skill's name, description, where it is and whether it needs review. Leave out query to list them. Call it before a multi-step job, then skill_run the best match.","tags":["Notebook and AI rules"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","maxLength":300},"level":{"default":"both","type":"string","enum":["workspace","account","both"]},"limit":{"default":10,"type":"integer","minimum":1,"maximum":50},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"notebook","x-keystone-needs-approval":false}},"/v1/tools/skill_get":{"post":{"operationId":"skill_get","summary":"Skill get","description":"Read one skill: when to use it, inputs, steps, the Keystone tools it calls with their risk, examples, version, where it came from and whether it needs review. Older versions are in notebook_read with history.","tags":["Notebook and AI rules"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"description":"The skill name, e.g. \"map-pack-check\"."},"level":{"default":"both","type":"string","enum":["workspace","account","both"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["name"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"notebook","x-keystone-needs-approval":false}},"/v1/tools/skill_save":{"post":{"operationId":"skill_save","summary":"Skill save","description":"Save a job that worked as a reusable skill (a SKILL.md note under Skills/ in the notebook; every save keeps a version). Use after a multi-step job the person was happy with, once they agree. Give when to use it, the inputs you had to ask for, the steps in order with the Keystone tools each used, and an example request. Pass expected_version to update one you read. Never include keys, passwords or personal data.","tags":["Notebook and AI rules"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":80,"description":"Short name; Keystone makes it lowercase-with-hyphens."},"title":{"type":"string","maxLength":120},"description":{"type":"string","minLength":10,"maxLength":1024,"description":"What it does and when to use it, in one or two sentences. This is how the AI finds it later."},"when_to_use":{"type":"string","maxLength":2000},"inputs":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z_][\\w-]{0,40}$"},"description":{"default":"","type":"string","maxLength":400},"required":{"default":true,"type":"boolean"}},"required":["name"]}},"steps":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":2,"maxLength":140},"detail":{"default":"","description":"What to do in plain English, with tool names in backticks.","type":"string","maxLength":3000},"tools":{"default":[],"description":"Keystone tools this step calls.","maxItems":20,"type":"array","items":{"type":"string","minLength":2,"maxLength":80}}},"required":["title"]}},"examples":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":3,"maxLength":600}},"notes":{"description":"Pitfalls or checks worth keeping, saved under \"Notes\".","type":"string","maxLength":4000},"level":{"default":"workspace","description":"workspace: this business. account: the skills shared by every workspace in the account (agency skills).","type":"string","enum":["workspace","account"]},"expected_version":{"type":"integer","minimum":1,"maximum":9007199254740991},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["name","description","steps"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"notebook","x-keystone-needs-approval":false}},"/v1/tools/skill_run":{"post":{"operationId":"skill_run","summary":"Skill run","description":"Start a saved skill: checks its inputs and review state, then returns the steps to follow with the Keystone tools each step calls. It runs nothing itself; you call each tool, and Keystone's permission and approval checks apply as usual. Answers needs_inputs with what to ask the person, or needs_review with a link when a person must review an imported skill first.","tags":["Notebook and AI rules"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"description":"The skill name, e.g. \"map-pack-check\"."},"inputs":{"default":{},"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][\\w-]{0,40}$"},"additionalProperties":{"type":"string","maxLength":2000}},"level":{"default":"both","type":"string","enum":["workspace","account","both"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["name"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"notebook","x-keystone-needs-approval":false}},"/v1/tools/skill_import":{"post":{"operationId":"skill_import","summary":"Skill import","description":"Bring in a skill written for Claude, OpenClaw, Hermes or any agent that reads SKILL.md. Pass the SKILL.md text, or an https link to one (GitHub and raw links work). Keystone checks it first: it refuses skills that hold secrets, try to reveal keys, send data to outside addresses, skip approvals or run shell commands, and maps the tools it names to Keystone tools. The saved copy is data: it cannot use tools that change, send or spend until a person reviews it.","tags":["Notebook and AI rules"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","maxLength":50000},"url":{"type":"string","maxLength":500,"format":"uri"},"name":{"description":"Save under this name instead of the one in the file.","type":"string","maxLength":80},"level":{"default":"workspace","description":"workspace: this business. account: the skills shared by every workspace in the account (agency skills).","type":"string","enum":["workspace","account"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"notebook","x-keystone-needs-approval":false}},"/v1/tools/skill_export":{"post":{"operationId":"skill_export","summary":"Skill export","description":"Export a skill as SKILL.md for another agent: flavor keystone, agentskills, claude, openclaw, hermes (agentskills is the open format; claude lists only read tools in allowed-tools, since Claude Code runs those without asking). Pass playbook instead of name to export a saved or built-in playbook as a skill. Returns the folder path and file text, and a link to download every skill as a zip.","tags":["Notebook and AI rules"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":80},"playbook":{"type":"string","maxLength":120},"flavor":{"default":"agentskills","type":"string","enum":["keystone","agentskills","claude","openclaw","hermes"]},"level":{"default":"both","type":"string","enum":["workspace","account","both"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"notebook","x-keystone-needs-approval":false}},"/v1/tools/site_create":{"post":{"operationId":"site_create","summary":"Site create","description":"Creates a website in the current workspace with the editor (Keystone Sites): its own database and media library, a designed theme, starter pages built from the facts you pass, a contact form that sends leads to the CRM with spam protection, and a live HTTPS address. Pass pages to write your own pages instead of the starter set. Use engine \"static\" only to import finished HTML with site_deploy.","tags":["Sites and forms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"description":"Business or site name, e.g. \"Oakridge Realty\"."},"slug":{"description":"URL-safe slug within this workspace. Generated from name if omitted.","type":"string","minLength":1,"maxLength":48},"engine":{"description":"emdash (default): site with the editor. static: upload files with site_deploy.","type":"string","enum":["emdash","static"]},"theme":{"description":"meridian: clear and confident (professional services, clinics, agencies, software). atelier: editorial and quiet (salons, boutiques, restaurants, architects). harbor: warm and energetic (fitness, cafes, schools, community groups). Default meridian.","type":"string","enum":["meridian","atelier","harbor"]},"brand_color":{"description":"Brand color as #rrggbb.","type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"facts":{"description":"True facts about the business for the starter pages. Leave out anything you do not know.","type":"object","properties":{"tagline":{"type":"string","maxLength":160},"description":{"type":"string","maxLength":1000},"services":{"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"phone":{"type":"string","maxLength":40},"email":{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"address":{"type":"string","maxLength":200},"hours":{"type":"string","maxLength":120},"city":{"type":"string","maxLength":80}}},"pages":{"description":"Your own pages as theme sections (slug \"home\" is the home page). Published on creation.","maxItems":12,"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,79}$"},"title":{"type":"string","minLength":1,"maxLength":120},"sections":{"minItems":1,"maxItems":20,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"hero"},"headline":{"type":"string","minLength":1,"maxLength":120},"subheadline":{"type":"string","maxLength":400},"eyebrow":{"type":"string","maxLength":80},"primary_cta_label":{"type":"string","maxLength":40},"primary_cta_url":{"type":"string","maxLength":500,"pattern":"^(\\/|#|https:\\/\\/|http:\\/\\/|mailto:|tel:)"},"secondary_cta_label":{"type":"string","maxLength":40},"secondary_cta_url":{"type":"string","maxLength":500,"pattern":"^(\\/|#|https:\\/\\/|http:\\/\\/|mailto:|tel:)"},"image":{"type":"object","properties":{"url":{"description":"Public https image URL. Keystone copies it into the site media library.","type":"string","maxLength":1000,"format":"uri"},"media_id":{"description":"Id of an image already in the site media library (site_media_upload returns it).","type":"string","minLength":1,"maxLength":64},"alt":{"type":"string","minLength":1,"maxLength":200,"description":"What the image shows, for screen readers and search."}},"required":["alt"]},"image_caption":{"type":"string","maxLength":120},"centered":{"type":"boolean"},"anchor_id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,40}$"}},"required":["type","headline"]},{"type":"object","properties":{"type":{"type":"string","const":"features"},"headline":{"type":"string","minLength":1,"maxLength":120},"subheadline":{"type":"string","maxLength":400},"eyebrow":{"type":"string","maxLength":80},"features":{"minItems":1,"maxItems":9,"type":"array","items":{"type":"object","properties":{"icon":{"type":"string","enum":["zap","shield","users","chart","code","globe","heart","star","check","lock","clock","cloud","building","leaf","gauge","thermometer","plug","bell","file","sun","trend"]},"title":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","maxLength":400}},"required":["icon","title"]}},"anchor_id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,40}$"}},"required":["type","headline","features"]},{"type":"object","properties":{"type":{"type":"string","const":"split"},"headline":{"type":"string","minLength":1,"maxLength":120},"eyebrow":{"type":"string","maxLength":80},"body":{"type":"string","maxLength":2000},"points":{"description":"Short checklist lines shown beside the image.","maxItems":8,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"cta_label":{"type":"string","maxLength":40},"cta_url":{"type":"string","maxLength":500,"pattern":"^(\\/|#|https:\\/\\/|http:\\/\\/|mailto:|tel:)"},"image":{"type":"object","properties":{"url":{"description":"Public https image URL. Keystone copies it into the site media library.","type":"string","maxLength":1000,"format":"uri"},"media_id":{"description":"Id of an image already in the site media library (site_media_upload returns it).","type":"string","minLength":1,"maxLength":64},"alt":{"type":"string","minLength":1,"maxLength":200,"description":"What the image shows, for screen readers and search."}},"required":["alt"]},"image_caption":{"type":"string","maxLength":120},"image_first":{"type":"boolean"},"anchor_id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,40}$"}},"required":["type","headline"]},{"type":"object","properties":{"type":{"type":"string","const":"stats"},"headline":{"type":"string","maxLength":120},"subheadline":{"type":"string","maxLength":400},"stats":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":24},"label":{"type":"string","minLength":1,"maxLength":80}},"required":["value","label"]}},"anchor_id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,40}$"}},"required":["type","stats"]},{"type":"object","properties":{"type":{"type":"string","const":"testimonials"},"headline":{"type":"string","maxLength":120},"testimonials":{"minItems":1,"maxItems":9,"type":"array","items":{"type":"object","properties":{"quote":{"type":"string","minLength":1,"maxLength":800},"author":{"type":"string","minLength":1,"maxLength":80},"role":{"type":"string","maxLength":80},"company":{"type":"string","maxLength":80}},"required":["quote","author"]}},"anchor_id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,40}$"}},"required":["type","testimonials"]},{"type":"object","properties":{"type":{"type":"string","const":"pricing"},"headline":{"type":"string","maxLength":120},"plans":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"price":{"type":"string","minLength":1,"maxLength":30},"period":{"type":"string","maxLength":30},"description":{"type":"string","maxLength":300},"features":{"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"cta_label":{"type":"string","minLength":1,"maxLength":40},"cta_url":{"type":"string","maxLength":500,"pattern":"^(\\/|#|https:\\/\\/|http:\\/\\/|mailto:|tel:)"},"highlighted":{"type":"boolean"},"badge":{"type":"string","maxLength":30}},"required":["name","price","cta_label","cta_url"]}},"anchor_id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,40}$"}},"required":["type","plans"]},{"type":"object","properties":{"type":{"type":"string","const":"faq"},"headline":{"type":"string","maxLength":120},"subheadline":{"type":"string","maxLength":400},"items":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"object","properties":{"question":{"type":"string","minLength":1,"maxLength":200},"answer":{"type":"string","minLength":1,"maxLength":1500}},"required":["question","answer"]}},"anchor_id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,40}$"}},"required":["type","items"]},{"type":"object","properties":{"type":{"type":"string","const":"logos"},"headline":{"type":"string","maxLength":120},"logos":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60}},"required":["name"]}},"anchor_id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,40}$"}},"required":["type","logos"]},{"type":"object","properties":{"type":{"type":"string","const":"cta"},"headline":{"type":"string","minLength":1,"maxLength":120},"body":{"type":"string","maxLength":600},"primary_cta_label":{"type":"string","maxLength":40},"primary_cta_url":{"type":"string","maxLength":500,"pattern":"^(\\/|#|https:\\/\\/|http:\\/\\/|mailto:|tel:)"},"secondary_cta_label":{"type":"string","maxLength":40},"secondary_cta_url":{"type":"string","maxLength":500,"pattern":"^(\\/|#|https:\\/\\/|http:\\/\\/|mailto:|tel:)"},"image":{"type":"object","properties":{"url":{"description":"Public https image URL. Keystone copies it into the site media library.","type":"string","maxLength":1000,"format":"uri"},"media_id":{"description":"Id of an image already in the site media library (site_media_upload returns it).","type":"string","minLength":1,"maxLength":64},"alt":{"type":"string","minLength":1,"maxLength":200,"description":"What the image shows, for screen readers and search."}},"required":["alt"]},"anchor_id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,40}$"}},"required":["type","headline"]},{"type":"object","properties":{"type":{"type":"string","const":"text"},"headline":{"type":"string","maxLength":120},"body":{"type":"string","minLength":1,"maxLength":12000,"description":"Paragraphs separated by a blank line. Lines starting \"## \" or \"### \" become headings, \"- \" bullet points."},"anchor_id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,40}$"}},"required":["type","body"]},{"type":"object","properties":{"type":{"type":"string","const":"contact_form"},"headline":{"type":"string","maxLength":120},"subheadline":{"type":"string","maxLength":600},"phone":{"type":"string","maxLength":40},"email":{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"address":{"type":"string","maxLength":200},"hours":{"type":"string","maxLength":120},"note":{"description":"One short line under the form, such as \"We reply within one business day.\"","type":"string","maxLength":160},"anchor_id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,40}$"}},"required":["type"]}]}}},"required":["slug","title","sections"]}},"lead_emails":{"description":"Who gets an email for each lead. Default: you.","maxItems":5,"type":"array","items":{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"framework":{"description":"Static sites only: static HTML or built Astro output.","type":"string","enum":["static","astro"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["name"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/site_deploy":{"post":{"operationId":"site_deploy","summary":"Site deploy","description":"Deploys static HTML or built Astro output to a site in the current workspace from either a files map (path to text or base64 content) or the key of a ZIP archive uploaded to this workspace.","tags":["Sites and forms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"string","minLength":1,"maxLength":120,"description":"Site id or slug from site_create or site_list."},"files":{"description":"Map of POSIX path (e.g. \"index.html\", \"_astro/app.css\") to UTF-8 text or { content, encoding: \"base64\" }.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"content":{"type":"string"},"encoding":{"type":"string","enum":["utf8","base64"]}},"required":["content"]}]}},"archiveKey":{"description":"Key of a ZIP archive uploaded to this workspace.","type":"string","minLength":1,"maxLength":512},"stripPrefix":{"description":"Top-level folder prefix to strip from file paths, e.g. \"dist\".","type":"string","minLength":1,"maxLength":120},"framework":{"description":"Framework label update.","type":"string","enum":["static","astro"]},"notFoundHandling":{"description":"How unmatched routes are handled (default 404-page, serving /404.html when present).","type":"string","enum":["404-page","single-page-application","none"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["site"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/site_list":{"post":{"operationId":"site_list","summary":"Site list","description":"Lists every hosted site in the current workspace with its live URL, deployment state, and attached custom domains.","tags":["Sites and forms"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/site_get":{"post":{"operationId":"site_get","summary":"Site get","description":"Returns one site in the current workspace, including attached custom domains with SSL status and recent deployments.","tags":["Sites and forms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"string","minLength":1,"maxLength":120,"description":"Site id or slug."},"refreshSsl":{"description":"Set true to fetch live SSL and hostname verification status for attached custom domains.","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["site"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/site_delete":{"post":{"operationId":"site_delete","summary":"Site delete","description":"Permanently deletes a site in the current workspace along with its live deployment and attached custom hostname routes.","tags":["Sites and forms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"string","minLength":1,"maxLength":120,"description":"Site id or slug to delete."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["site"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"destructive","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/site_domain_attach":{"post":{"operationId":"site_domain_attach","summary":"Site domain attach","description":"Attaches a custom domain (with automated SSL) to a site in the current workspace and returns DNS setup records and current SSL status. Calling again refreshes SSL status.","tags":["Sites and forms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"string","minLength":1,"maxLength":120,"description":"Site id or slug in the current workspace."},"hostname":{"type":"string","minLength":3,"maxLength":253,"description":"Custom hostname to attach, e.g. \"www.example.com\" or \"example.com\"."},"validationMethod":{"description":"SSL validation method (default txt).","type":"string","enum":["txt","http"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["site","hostname"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/domain_search":{"post":{"operationId":"domain_search","summary":"Domain search","description":"Checks live domain availability and registration prices. Pass a keyword or domain in query, or up to 20 explicit domains.","tags":["Sites and forms"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"description":"Business name or domain to check, e.g. \"oakridge realty\" or \"oakridgerealty.com\".","type":"string","minLength":1,"maxLength":120},"domains":{"description":"Up to 20 explicit domains to check authoritatively.","maxItems":20,"type":"array","items":{"type":"string","minLength":3,"maxLength":253}},"tlds":{"description":"TLD extensions to check, e.g. [\"com\", \"net\", \"co\"].","maxItems":10,"type":"array","items":{"type":"string","minLength":2,"maxLength":24}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/domain_buy":{"post":{"operationId":"domain_buy","summary":"Domain buy","description":"Charges the card on file for the quoted registration price, then registers the domain in the current workspace. Refunds automatically if registration fails. Pass maxPriceUsd from domain_search to cap the charge. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Sites and forms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"registrant":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","pattern":"^\\+[1-9]\\d{0,2}\\.\\d{4,14}$","description":"International number with a dot after the country code."},"postal_info":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":160},"organization":{"type":"string","minLength":1,"maxLength":160},"address":{"type":"object","properties":{"street":{"type":"string","minLength":1,"maxLength":160},"city":{"type":"string","minLength":1,"maxLength":160},"state":{"type":"string","minLength":1,"maxLength":160},"postal_code":{"type":"string","minLength":1,"maxLength":160},"country_code":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["street","city","state","postal_code","country_code"]}},"required":["name","address"]}},"required":["email","phone","postal_info"],"description":"Registrant contact details for this domain."},"domain":{"type":"string","minLength":3,"maxLength":253,"description":"Exact available domain to buy, e.g. \"oakridgerealty.com\"."},"years":{"description":"Registration length in years (1 to 10, default 1).","type":"integer","minimum":1,"maximum":10},"autoRenew":{"description":"Enable registrar auto-renewal (default false).","type":"boolean"},"maxPriceUsd":{"description":"Maximum customer price in USD; aborts before charging if exceeded.","type":"number","exclusiveMinimum":0,"maximum":10000},"idempotencyKey":{"description":"Stable retry key to prevent duplicate charges if a request is retried.","type":"string","minLength":1,"maxLength":80},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["registrant","domain"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"sites","x-keystone-needs-approval":true}},"/v1/tools/domain_list":{"post":{"operationId":"domain_list","summary":"Domain list","description":"Lists every domain registered in the current workspace with status, price paid, and expiration.","tags":["Sites and forms"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"includeFailed":{"description":"Include failed or refunded registration attempts (default false).","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/dns_records":{"post":{"operationId":"dns_records","summary":"DNS records","description":"Lists, creates, updates, or deletes DNS records for a domain registered in the current workspace.","tags":["Sites and forms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","minLength":3,"maxLength":253,"description":"Domain registered in the current workspace."},"action":{"description":"DNS operation to perform (default list).","type":"string","enum":["list","create","update","delete"]},"recordId":{"description":"Record id (required for update and delete).","type":"string","minLength":1,"maxLength":80},"type":{"description":"DNS record type (required for create and update).","type":"string","enum":["A","AAAA","CNAME","TXT","MX","CAA","SRV"]},"name":{"description":"Record name, \"@\" for apex, or subdomain relative to the domain.","type":"string","minLength":1,"maxLength":253},"content":{"description":"Record target or value.","type":"string","minLength":1,"maxLength":4096},"ttl":{"description":"TTL in seconds, or 1 for automatic (default 1).","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"priority":{"description":"Priority for MX or SRV records.","type":"integer","minimum":0,"maximum":65535},"proxied":{"description":"Proxy traffic for A, AAAA, or CNAME records (default false).","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["domain"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/site_analytics":{"post":{"operationId":"site_analytics","summary":"Site analytics","description":"Reports built-in privacy-safe analytics for one hosted site over 7, 30 or 90 days: visitors, page views, named sources, top pages, devices, countries, conversions (forms and taps on call and booking links) and conversion rate by source, and calls to tracking numbers counted apart by number. Works without Google Analytics.","tags":["Sites and forms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"string","minLength":1,"maxLength":120,"description":"Site id or slug."},"days":{"default":30,"description":"Reporting period in days: 7, 30 or 90.","anyOf":[{"type":"number","const":7},{"type":"number","const":30},{"type":"number","const":90}]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["site"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/site_analytics_detailed":{"post":{"operationId":"site_analytics_detailed","summary":"Site analytics detailed","description":"Turns detailed first-party analytics on or off for a hosted site. When on, the edge serves a sub-1KB no-cookie script from the site domain that measures sessions, visit duration, tap-to-call clicks and booking-link clicks. Basic page views are counted either way.","tags":["Sites and forms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"string","minLength":1,"maxLength":120,"description":"Site id or slug."},"enabled":{"type":"boolean","description":"True to enable detailed measurement, false to disable it."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["site","enabled"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/site_add_search_console":{"post":{"operationId":"site_add_search_console","summary":"Site add search console","description":"Adds Google Search Console to a hosted site as one agent job. Keystone verifies ownership through the site tag, delegates access to the workspace identity, submits the sitemap and checks indexing. If Google sign-in is required, the result is a sign-in link; after the person approves, Keystone finishes the job without asking for a property or verification code.","tags":["Sites and forms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"string","minLength":1,"maxLength":120,"description":"Site id or slug."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["site"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/site_add_google_analytics":{"post":{"operationId":"site_add_google_analytics","summary":"Site add google analytics","description":"Adds Google Analytics to a hosted site as one agent job. Keystone creates or reuses a GA4 property and web stream, injects the tag at the edge with consent mode denied by default, and checks the live page. If Google sign-in is required, the result is a sign-in link; after the person approves, Keystone finishes the job without asking for a property or measurement ID. Pass remove true to remove it in one step.","tags":["Sites and forms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"string","minLength":1,"maxLength":120,"description":"Site id or slug."},"displayName":{"description":"Optional Analytics property display name when creating one. Omit it to use the site name.","type":"string","minLength":1,"maxLength":120},"timeZone":{"description":"Analytics reporting time zone when creating a property (default America/New_York).","type":"string","minLength":1,"maxLength":80},"remove":{"description":"Set true to remove Google Analytics injection from the site.","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["site"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/site_pages_list":{"post":{"operationId":"site_pages_list","summary":"Site pages list","description":"Lists the pages of a site that has the editor, with status, live URL and whether each has unpublished changes.","tags":["Sites and forms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"string","minLength":1,"maxLength":120,"description":"Site id or slug from site_list."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["site"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/site_page_get":{"post":{"operationId":"site_page_get","summary":"Site page get","description":"Returns one page as editable sections (the same shape site_page_upsert takes), including unpublished draft changes.","tags":["Sites and forms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"string","minLength":1,"maxLength":120,"description":"Site id or slug from site_list."},"page":{"type":"string","minLength":1,"maxLength":120,"description":"Page slug (home for the home page) or id."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["site","page"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/site_page_upsert":{"post":{"operationId":"site_page_upsert","summary":"Site page upsert","description":"Creates or changes a page as a draft. Pass the whole page as sections (hero, features, split, stats, testimonials, pricing, faq, logos, cta, text, contact_form); each renders with the site theme. Read the page with site_page_get first to edit it. Nothing goes live until site_publish.","tags":["Sites and forms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"string","minLength":1,"maxLength":120,"description":"Site id or slug from site_list."},"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,79}$"},"title":{"type":"string","minLength":1,"maxLength":120},"sections":{"minItems":1,"maxItems":20,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"hero"},"headline":{"type":"string","minLength":1,"maxLength":120},"subheadline":{"type":"string","maxLength":400},"eyebrow":{"type":"string","maxLength":80},"primary_cta_label":{"type":"string","maxLength":40},"primary_cta_url":{"type":"string","maxLength":500,"pattern":"^(\\/|#|https:\\/\\/|http:\\/\\/|mailto:|tel:)"},"secondary_cta_label":{"type":"string","maxLength":40},"secondary_cta_url":{"type":"string","maxLength":500,"pattern":"^(\\/|#|https:\\/\\/|http:\\/\\/|mailto:|tel:)"},"image":{"type":"object","properties":{"url":{"description":"Public https image URL. Keystone copies it into the site media library.","type":"string","maxLength":1000,"format":"uri"},"media_id":{"description":"Id of an image already in the site media library (site_media_upload returns it).","type":"string","minLength":1,"maxLength":64},"alt":{"type":"string","minLength":1,"maxLength":200,"description":"What the image shows, for screen readers and search."}},"required":["alt"]},"image_caption":{"type":"string","maxLength":120},"centered":{"type":"boolean"},"anchor_id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,40}$"}},"required":["type","headline"]},{"type":"object","properties":{"type":{"type":"string","const":"features"},"headline":{"type":"string","minLength":1,"maxLength":120},"subheadline":{"type":"string","maxLength":400},"eyebrow":{"type":"string","maxLength":80},"features":{"minItems":1,"maxItems":9,"type":"array","items":{"type":"object","properties":{"icon":{"type":"string","enum":["zap","shield","users","chart","code","globe","heart","star","check","lock","clock","cloud","building","leaf","gauge","thermometer","plug","bell","file","sun","trend"]},"title":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","maxLength":400}},"required":["icon","title"]}},"anchor_id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,40}$"}},"required":["type","headline","features"]},{"type":"object","properties":{"type":{"type":"string","const":"split"},"headline":{"type":"string","minLength":1,"maxLength":120},"eyebrow":{"type":"string","maxLength":80},"body":{"type":"string","maxLength":2000},"points":{"description":"Short checklist lines shown beside the image.","maxItems":8,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"cta_label":{"type":"string","maxLength":40},"cta_url":{"type":"string","maxLength":500,"pattern":"^(\\/|#|https:\\/\\/|http:\\/\\/|mailto:|tel:)"},"image":{"type":"object","properties":{"url":{"description":"Public https image URL. Keystone copies it into the site media library.","type":"string","maxLength":1000,"format":"uri"},"media_id":{"description":"Id of an image already in the site media library (site_media_upload returns it).","type":"string","minLength":1,"maxLength":64},"alt":{"type":"string","minLength":1,"maxLength":200,"description":"What the image shows, for screen readers and search."}},"required":["alt"]},"image_caption":{"type":"string","maxLength":120},"image_first":{"type":"boolean"},"anchor_id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,40}$"}},"required":["type","headline"]},{"type":"object","properties":{"type":{"type":"string","const":"stats"},"headline":{"type":"string","maxLength":120},"subheadline":{"type":"string","maxLength":400},"stats":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":24},"label":{"type":"string","minLength":1,"maxLength":80}},"required":["value","label"]}},"anchor_id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,40}$"}},"required":["type","stats"]},{"type":"object","properties":{"type":{"type":"string","const":"testimonials"},"headline":{"type":"string","maxLength":120},"testimonials":{"minItems":1,"maxItems":9,"type":"array","items":{"type":"object","properties":{"quote":{"type":"string","minLength":1,"maxLength":800},"author":{"type":"string","minLength":1,"maxLength":80},"role":{"type":"string","maxLength":80},"company":{"type":"string","maxLength":80}},"required":["quote","author"]}},"anchor_id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,40}$"}},"required":["type","testimonials"]},{"type":"object","properties":{"type":{"type":"string","const":"pricing"},"headline":{"type":"string","maxLength":120},"plans":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"price":{"type":"string","minLength":1,"maxLength":30},"period":{"type":"string","maxLength":30},"description":{"type":"string","maxLength":300},"features":{"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"cta_label":{"type":"string","minLength":1,"maxLength":40},"cta_url":{"type":"string","maxLength":500,"pattern":"^(\\/|#|https:\\/\\/|http:\\/\\/|mailto:|tel:)"},"highlighted":{"type":"boolean"},"badge":{"type":"string","maxLength":30}},"required":["name","price","cta_label","cta_url"]}},"anchor_id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,40}$"}},"required":["type","plans"]},{"type":"object","properties":{"type":{"type":"string","const":"faq"},"headline":{"type":"string","maxLength":120},"subheadline":{"type":"string","maxLength":400},"items":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"object","properties":{"question":{"type":"string","minLength":1,"maxLength":200},"answer":{"type":"string","minLength":1,"maxLength":1500}},"required":["question","answer"]}},"anchor_id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,40}$"}},"required":["type","items"]},{"type":"object","properties":{"type":{"type":"string","const":"logos"},"headline":{"type":"string","maxLength":120},"logos":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60}},"required":["name"]}},"anchor_id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,40}$"}},"required":["type","logos"]},{"type":"object","properties":{"type":{"type":"string","const":"cta"},"headline":{"type":"string","minLength":1,"maxLength":120},"body":{"type":"string","maxLength":600},"primary_cta_label":{"type":"string","maxLength":40},"primary_cta_url":{"type":"string","maxLength":500,"pattern":"^(\\/|#|https:\\/\\/|http:\\/\\/|mailto:|tel:)"},"secondary_cta_label":{"type":"string","maxLength":40},"secondary_cta_url":{"type":"string","maxLength":500,"pattern":"^(\\/|#|https:\\/\\/|http:\\/\\/|mailto:|tel:)"},"image":{"type":"object","properties":{"url":{"description":"Public https image URL. Keystone copies it into the site media library.","type":"string","maxLength":1000,"format":"uri"},"media_id":{"description":"Id of an image already in the site media library (site_media_upload returns it).","type":"string","minLength":1,"maxLength":64},"alt":{"type":"string","minLength":1,"maxLength":200,"description":"What the image shows, for screen readers and search."}},"required":["alt"]},"anchor_id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,40}$"}},"required":["type","headline"]},{"type":"object","properties":{"type":{"type":"string","const":"text"},"headline":{"type":"string","maxLength":120},"body":{"type":"string","minLength":1,"maxLength":12000,"description":"Paragraphs separated by a blank line. Lines starting \"## \" or \"### \" become headings, \"- \" bullet points."},"anchor_id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,40}$"}},"required":["type","body"]},{"type":"object","properties":{"type":{"type":"string","const":"contact_form"},"headline":{"type":"string","maxLength":120},"subheadline":{"type":"string","maxLength":600},"phone":{"type":"string","maxLength":40},"email":{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"address":{"type":"string","maxLength":200},"hours":{"type":"string","maxLength":120},"note":{"description":"One short line under the form, such as \"We reply within one business day.\"","type":"string","maxLength":160},"anchor_id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,40}$"}},"required":["type"]}]},"description":"Page sections in order. Each renders with the site theme; never send HTML."},"seo_description":{"description":"Search result description, up to 160 characters.","type":"string","maxLength":160},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["site","slug","title","sections"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/site_media_upload":{"post":{"operationId":"site_media_upload","summary":"Site media upload","description":"Adds an image to a site media library from a public https URL or base64 content. Returns media_id for image fields in site_page_upsert.","tags":["Sites and forms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"string","minLength":1,"maxLength":120,"description":"Site id or slug from site_list."},"url":{"type":"string","maxLength":1000,"format":"uri"},"content_base64":{"description":"Image bytes as base64, up to 10 MB.","type":"string","maxLength":14000000},"filename":{"type":"string","pattern":"^[\\w.-]{1,80}\\.(jpe?g|png|webp|gif|avif)$"},"alt":{"type":"string","minLength":1,"maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["site","alt"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/site_menu_set":{"post":{"operationId":"site_menu_set","summary":"Site menu set","description":"Replaces the items of a site menu. primary is the header (mark one item button: true for the header button, such as a phone number); footer_product, footer_company and footer_support are the footer columns. Menus change on the live site right away.","tags":["Sites and forms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"string","minLength":1,"maxLength":120,"description":"Site id or slug from site_list."},"menu":{"type":"string","enum":["primary","footer_product","footer_company","footer_support"]},"label":{"description":"Column heading for footer menus.","type":"string","minLength":1,"maxLength":60},"items":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60},"url":{"type":"string","maxLength":500,"pattern":"^(\\/|#|https:\\/\\/|mailto:|tel:)"},"button":{"type":"boolean"},"new_tab":{"type":"boolean"}},"required":["label","url"]}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["site","menu","items"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/site_publish":{"post":{"operationId":"site_publish","summary":"Site publish","description":"Publishes draft changes so they go live. Pass the page slugs, or omit pages to publish every page that has unpublished changes. Asks the person to approve first. (Ends access or deletes data, so a person must approve it first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. approved: true in the input never counts as approval.)","tags":["Sites and forms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"string","minLength":1,"maxLength":120,"description":"Site id or slug from site_list."},"pages":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["site"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"destructive","x-keystone-module":"sites","x-keystone-needs-approval":true}},"/v1/tools/site_convert_to_cms":{"post":{"operationId":"site_convert_to_cms","summary":"Site convert to cms","description":"Adds the editor to a site: its own database, media library, contact form with spam protection, and a designed theme. A static site keeps its URL and domains; its live pages are copied in as editable pages. Also finishes an editor setup that stopped partway.","tags":["Sites and forms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"string","minLength":1,"maxLength":120,"description":"Site id or slug from site_list."},"theme":{"description":"Starter theme. meridian: clear and confident (professional services, clinics, agencies). atelier: editorial and quiet (salons, boutiques, restaurants, studios). harbor: warm and energetic (fitness, cafes, schools, community groups).","type":"string","enum":["meridian","atelier","harbor"]},"brand_color":{"description":"Brand color as #rrggbb for buttons and accents.","type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"facts":{"description":"Facts for the starter pages. Only pass what is true for this business.","type":"object","properties":{"tagline":{"type":"string","maxLength":160},"description":{"description":"Two or three sentences about the business, in its own words.","type":"string","maxLength":1000},"services":{"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"phone":{"type":"string","maxLength":40},"email":{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"address":{"type":"string","maxLength":200},"hours":{"type":"string","maxLength":120},"city":{"type":"string","maxLength":80}}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["site"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/site_settings_set":{"post":{"operationId":"site_settings_set","summary":"Site settings set","description":"Changes a site theme, brand color, or who gets an email for each lead from its contact form. Theme and color changes go live in about a minute.","tags":["Sites and forms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"string","minLength":1,"maxLength":120,"description":"Site id or slug from site_list."},"theme":{"description":"Starter theme. meridian: clear and confident (professional services, clinics, agencies). atelier: editorial and quiet (salons, boutiques, restaurants, studios). harbor: warm and energetic (fitness, cafes, schools, community groups).","type":"string","enum":["meridian","atelier","harbor"]},"brand_color":{"description":"#rrggbb, or \"\" to use the theme color.","anyOf":[{"description":"Brand color as #rrggbb for buttons and accents.","type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"string","const":""}]},"lead_emails":{"description":"Addresses that get each lead. Empty list: the site creator.","maxItems":5,"type":"array","items":{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["site"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/form_create":{"post":{"operationId":"form_create","summary":"Form create","description":"Create a lead capture form for this workspace with fields, validation, thank-you message or redirect URL, and CRM or webhook routing. Returns the public endpoint and embed snippets. Webhook signing secrets are managed on the workspace forms page.","tags":["Sites and forms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Form name, such as \"Consultation Request\"."},"fields":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":100},"type":{"default":"text","type":"string","enum":["text","email","tel","textarea","select","checkbox","number","hidden"]},"required":{"default":false,"type":"boolean"},"placeholder":{"type":"string","maxLength":150},"options":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"max_length":{"type":"integer","minimum":1,"maximum":5000}},"required":["name","label"]},"description":"Ordered list of form fields (name, label, type, required, placeholder, options)."},"thank_you_message":{"description":"Message shown after a successful submission.","type":"string","minLength":1,"maxLength":500},"redirect_url":{"description":"https:// URL to redirect visitors after submission.","type":"string","maxLength":1000},"crm":{"default":"auto","description":"Destination CRM: auto (included ServiceLine CRM when on, else connected CRM or dashboard fallback), serviceline_crm, highlevel_location, hubspot, jobber, housecall_pro, webhook, or dashboard.","type":"string","enum":["auto","serviceline_crm","highlevel_location","hubspot","jobber","housecall_pro","webhook","dashboard"]},"pipeline_id":{"description":"CRM pipeline ID for opportunities or deals.","type":"string","maxLength":120},"stage_id":{"description":"CRM pipeline stage ID or dealstage ID.","type":"string","maxLength":120},"tags":{"description":"Tags to apply to the created contact or lead.","maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"source":{"description":"Lead source label sent to the CRM.","type":"string","maxLength":100},"create_deal":{"description":"Create a deal or opportunity in addition to the contact.","type":"boolean"},"monetary_value":{"description":"Default lead value for deals and conversion tracking.","type":"number","minimum":0,"maximum":1000000000},"currency":{"default":"USD","description":"3-letter ISO currency code, such as USD.","type":"string","minLength":3,"maxLength":3},"webhook_url":{"description":"https:// webhook URL signed with X-Keystone-Signature.","type":"string","maxLength":1000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["name","fields"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/form_embed":{"post":{"operationId":"form_embed","summary":"Form embed","description":"Get the drop-in script tag and plain HTML form snippet for a form in this workspace. Both post to Keystone, capture UTM and click-ID attribution, and fire configured GA4 and Google Ads conversions.","tags":["Sites and forms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"form":{"type":"string","minLength":1,"maxLength":120,"description":"Form ID (frm_...) or form slug in this workspace."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["form"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/form_list":{"post":{"operationId":"form_list","summary":"Form list","description":"List forms in this workspace with routing, submission counts, failed delivery counts, and tracking setup.","tags":["Sites and forms"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"include_archived":{"default":false,"description":"Include archived forms.","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/form_submissions":{"post":{"operationId":"form_submissions","summary":"Form submissions","description":"List recent form submissions in this workspace with submitted fields, UTM and click-ID attribution, and full CRM, webhook, and server-side conversion delivery logs.","tags":["Sites and forms"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"form":{"description":"Form ID or slug to filter by.","type":"string","minLength":1,"maxLength":120},"status":{"description":"Delivery status filter.","type":"string","enum":["pending","delivered","retrying","failed","dashboard_only"]},"limit":{"default":25,"description":"Maximum submissions to return (1 to 100).","type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/form_update":{"post":{"operationId":"form_update","summary":"Form update","description":"Update a form in this workspace: change status (active, paused, archived), fields, thank-you message, redirect URL, or CRM routing.","tags":["Sites and forms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"form":{"type":"string","minLength":1,"maxLength":120,"description":"Form ID or slug in this workspace."},"name":{"type":"string","minLength":1,"maxLength":100},"status":{"type":"string","enum":["active","paused","archived"]},"fields":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z][a-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":100},"type":{"default":"text","type":"string","enum":["text","email","tel","textarea","select","checkbox","number","hidden"]},"required":{"default":false,"type":"boolean"},"placeholder":{"type":"string","maxLength":150},"options":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"max_length":{"type":"integer","minimum":1,"maximum":5000}},"required":["name","label"]}},"thank_you_message":{"type":"string","minLength":1,"maxLength":500},"redirect_url":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"crm":{"type":"string","enum":["auto","serviceline_crm","highlevel_location","hubspot","jobber","housecall_pro","webhook","dashboard"]},"pipeline_id":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"stage_id":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"tags":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"source":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"create_deal":{"type":"boolean"},"monetary_value":{"anyOf":[{"type":"number","minimum":0,"maximum":1000000000},{"type":"null"}]},"currency":{"type":"string","minLength":3,"maxLength":3},"webhook_url":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["form"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/form_tracking_configure":{"post":{"operationId":"form_tracking_configure","summary":"Form tracking configure","description":"Configure GA4 and Google Ads conversion tracking for forms in this workspace. Sets client-side gtag IDs and server-side Google Ads offline click conversion settings. To add the GA4 Measurement Protocol API secret without pasting it in chat, open the returned tracking settings URL.","tags":["Sites and forms"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"ga4_measurement_id":{"description":"GA4 web stream Measurement ID, such as G-XXXXXXXXXX.","anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"ga4_event_name":{"description":"GA4 event name fired on submission (default generate_lead).","type":"string","maxLength":40},"google_ads_conversion_id":{"description":"Google Ads tag ID, such as AW-1234567890.","anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"google_ads_conversion_label":{"description":"Google Ads conversion label for client-side gtag.","anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"google_ads_customer_id":{"description":"Bound Google Ads 10-digit customer ID for server-side offline click conversions.","anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"google_ads_conversion_action_id":{"description":"Google Ads conversion action ID for offline click conversions.","anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"default_value":{"description":"Default conversion value per lead.","anyOf":[{"type":"number","minimum":0,"maximum":1000000000},{"type":"null"}]},"currency":{"description":"3-letter ISO currency code (default USD).","type":"string","minLength":3,"maxLength":3},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/form_submission_resend":{"post":{"operationId":"form_submission_resend","summary":"Form submission resend","description":"Re-deliver one captured form submission in this workspace to its CRM, webhook, or server-side conversion target. (Sends an external message; confirm with the user first. If the workspace requires approval for sends, the result has status needs_approval: share the approve_url, then call again with the same arguments plus approval_id.)","tags":["Sites and forms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"submission_id":{"type":"string","minLength":1,"maxLength":80,"description":"Submission ID (sub_...) in this workspace."},"delivery_id":{"description":"Single delivery ID (del_...) to retry.","type":"string","minLength":1,"maxLength":80},"include_conversions":{"default":false,"description":"Also re-send server-side conversion events.","type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["submission_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"send","x-keystone-module":"sites","x-keystone-needs-approval":true}},"/v1/tools/portal_link":{"post":{"operationId":"portal_link","summary":"Portal link","description":"Create (or return the status of) the shareable live client portal link for this workspace. Anyone with the link sees a read-only, agency-branded page of calls, leads, booked jobs, ad spend, rankings, map grids, and reviews. No Keystone login needed. Revoke with portal_revoke. The raw URL is only returned once, when it is created.","tags":["Sites and forms"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/portal_links":{"post":{"operationId":"portal_links","summary":"Portal links","description":"List share links for this workspace: live portal links and shared audit report links, with created and last-viewed times. Raw tokens are never stored, so existing URLs cannot be shown again.","tags":["Sites and forms"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/portal_revoke":{"post":{"operationId":"portal_revoke","summary":"Portal revoke","description":"Revoke a share link for this workspace by link id so its URL stops working immediately.","tags":["Sites and forms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":6,"maxLength":80},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"destructive","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/branding_set":{"post":{"operationId":"branding_set","summary":"Branding set","description":"Set the agency brand shown on client portals and reports: display name and hex color. The logo is uploaded on the portal settings page in the dashboard.","tags":["Sites and forms"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Agency display name.","type":"string","minLength":1,"maxLength":80},"color":{"description":"Brand accent as a hex color like #2563eb.","type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"sites","x-keystone-needs-approval":false}},"/v1/tools/playbook_run_all":{"post":{"operationId":"playbook_run_all","summary":"Playbook run all","description":"Agency only. Runs one playbook across many client workspaces in the account: all of them, or only clients with a tag, a connected app or a plan label. It runs read and audit steps and returns one report per client. Any step that writes, sends, spends or deletes is never run in bulk; it waits per client in the approval queue. The run is worked through the background queue, a few clients at a time, so pass workspaces, then call playbook_run_status with the run id.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"playbook":{"type":"string","minLength":2,"maxLength":120,"description":"A built-in playbook id or an agency playbook id or name."},"workspaces":{"type":"object","properties":{"all":{"default":false,"description":"Use every active client workspace.","type":"boolean"},"ids":{"default":[],"description":"Only these workspace ids or slugs.","maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"tags":{"default":[],"description":"Only clients with at least one of these labels.","maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"app":{"description":"Only clients where this app is connected, such as hubspot.","type":"string","minLength":1,"maxLength":80},"plan":{"description":"Only clients whose plan label matches, such as retainer.","type":"string","minLength":1,"maxLength":40}}},"max_workspaces":{"default":50,"description":"Stop the run after this many clients.","type":"integer","minimum":1,"maximum":100},"max_calls_per_workspace":{"default":10,"description":"Cap on read tool calls per client for this run.","type":"integer","minimum":1,"maximum":20},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["playbook","workspaces"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/playbook_run_status":{"post":{"operationId":"playbook_run_status","summary":"Playbook run status","description":"Agency only. Shows one fleet run: its status, clients done, clients failed, proposals waiting, and each client report. Pass workspace_id to read one client in detail. Call it after playbook_run_all until the run finishes.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"run_id":{"type":"string","minLength":3,"maxLength":80,"description":"Run id returned by playbook_run_all."},"workspace_id":{"description":"Read one client in detail.","type":"string","minLength":1,"maxLength":120},"include_findings":{"default":true,"description":"Include the step findings for every client.","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["run_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/playbook_proposals":{"post":{"operationId":"playbook_proposals","summary":"Playbook proposals","description":"Agency only. Lists the per-client approval queue for a fleet run or the whole account. Every write, send, money or destructive step lands here instead of running in bulk, and so does a read step that still needs a client value.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"run_id":{"type":"string","minLength":3,"maxLength":80},"workspace_id":{"type":"string","minLength":1,"maxLength":120},"status":{"default":"pending","type":"string","enum":["pending","approved","rejected","executed","failed"]},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/playbook_proposal_decide":{"post":{"operationId":"playbook_proposal_decide","summary":"Playbook proposal decide","description":"Agency only. Approves or rejects one proposal for one client. Approving runs the real step in that workspace, so it can send a message, spend money or change data. Ask the person first and pass confirm true. Pass args only to fill values the run could not work out.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":3,"maxLength":80,"description":"Proposal id from playbook_proposals."},"action":{"type":"string","enum":["approve","reject"]},"confirm":{"default":false,"description":"Must be true to approve.","type":"boolean"},"args":{"description":"Values to merge into the proposed tool call.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id","action"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/playbook_save":{"post":{"operationId":"playbook_save","summary":"Playbook save","description":"Agency only. Saves a playbook the agency owns: a name, steps in plain English, the tools each step may use and whether it runs automatically or waits for approval. Pass id to update an existing playbook. Saved playbooks run with playbook_run_all and can be read with playbook_get.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"Update this saved playbook.","type":"string","minLength":3,"maxLength":80},"name":{"type":"string","minLength":2,"maxLength":100},"summary":{"description":"One line on when to use it.","type":"string","maxLength":300},"steps":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":2,"maxLength":120},"instructions":{"type":"string","minLength":1,"maxLength":2000,"description":"What to do, in plain English."},"tools":{"default":[],"description":"Tools this step may use.","maxItems":20,"type":"array","items":{"type":"string","minLength":2,"maxLength":80}},"approval":{"default":"auto","description":"auto runs read tools; propose always waits for a person.","type":"string","enum":["auto","propose"]}},"required":["title","instructions"]}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["name","steps"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/playbook_delete":{"post":{"operationId":"playbook_delete","summary":"Playbook delete","description":"Agency only. Deletes one playbook saved by this agency. Built-in playbooks cannot be deleted. Runs already started keep their own copy of the steps.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":2,"maxLength":120,"description":"Saved playbook id, slug or name."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/workspace_labels":{"post":{"operationId":"workspace_labels","summary":"Workspace labels","description":"Agency only. Lists the labels on every client workspace: its tags, plan label and the location, keywords, time zone and connection ids used when a fleet step needs them. Use these labels to choose clients in playbook_run_all.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/workspace_label_set":{"post":{"operationId":"workspace_label_set","summary":"Workspace label set","description":"Agency only. Sets the tags and plan label on one client workspace, plus the city, money keywords, time zone and connection ids a fleet run should use when a step needs them. Pass the workspace argument to choose the client.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"tags":{"description":"Replace the tags. Pass an empty list to clear them. Omit to keep them.","maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"plan":{"description":"Your service plan label, such as retainer or project.","type":"string","minLength":1,"maxLength":40},"location":{"description":"City and country, such as Tampa,Florida,United States.","type":"string","minLength":2,"maxLength":200},"keywords":{"description":"Replace the money terms. Pass an empty list to clear them. Omit to keep them.","maxItems":10,"type":"array","items":{"type":"string","minLength":2,"maxLength":200}},"timezone":{"type":"string","minLength":2,"maxLength":60},"crm":{"description":"Booking system slug, such as fieldpulse or jobber.","type":"string","minLength":2,"maxLength":40},"gsc_site":{"description":"Search Console property, when it differs from the website.","type":"string","minLength":3,"maxLength":300},"gbp_account":{"description":"Business Profile account id for this client.","type":"string","minLength":1,"maxLength":80},"gbp_location":{"description":"Business Profile location id for this client.","type":"string","minLength":1,"maxLength":80},"gads_customer_id":{"description":"Google Ads customer id for this client, digits only.","type":"string","minLength":3,"maxLength":40},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/agency_benchmarks":{"post":{"operationId":"agency_benchmarks","summary":"Agency benchmarks","description":"Agency only. Compares this agency's own clients on cost per lead, cost per booked job, call answer rate, review rating, new reviews per 30 days and map rank average. Returns each client's rank among the agency's clients and, for the best client on each metric, the playbook run or approved step that came before it. Never mixes clients from another account.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"days":{"default":30,"description":"Period to compare, in days.","type":"integer","minimum":7,"maximum":90},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/marketplace_search":{"post":{"operationId":"marketplace_search","summary":"Marketplace search","description":"Find approved playbooks and preview their steps and USD prices.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"default":"","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/marketplace_publish":{"post":{"operationId":"marketplace_publish","summary":"Marketplace publish","description":"Submit a saved agency playbook or an updated edition for review. The sample output is public.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"playbook":{"type":"string","minLength":1,"maxLength":120},"title":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","minLength":1,"maxLength":1000},"sample":{"type":"string","minLength":1,"maxLength":3000},"price_usd_cents":{"type":"integer","minimum":0,"maximum":99999999},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["playbook","title","description","sample","price_usd_cents"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/marketplace_install":{"post":{"operationId":"marketplace_install","summary":"Marketplace install","description":"Install a playbook at its exact listed USD price. Keystone asks the owner to approve that price before charging. Pull an approved update for free with pull_update. Pulling replaces the installed steps. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"listing":{"type":"string","minLength":1,"maxLength":120},"approved_usd_cents":{"type":"integer","minimum":0,"maximum":99999999},"pull_update":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["listing","approved_usd_cents"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"agency","x-keystone-needs-approval":true}},"/v1/tools/marketplace_sales":{"post":{"operationId":"marketplace_sales","summary":"Marketplace sales","description":"List sales of your agency playbooks, seller earnings in USD cents and manual payout status.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/marketplace_report":{"post":{"operationId":"marketplace_report","summary":"Marketplace report","description":"Send a listing or purchase complaint to Keystone for review.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"listing":{"type":"string","minLength":1,"maxLength":120},"reason":{"type":"string","minLength":1,"maxLength":1500},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["listing","reason"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/skill_publish":{"post":{"operationId":"skill_publish","summary":"Skill publish","description":"Agency only, certified publishers only. Submit a reviewed skill from the account skills to the playbook marketplace. Keystone reviews every listing before it shows. The sample output is public.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"description":"The skill name, e.g. \"map-pack-check\"."},"title":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","minLength":1,"maxLength":1000},"sample":{"type":"string","minLength":1,"maxLength":3000},"price_usd_cents":{"type":"integer","minimum":0,"maximum":99999999},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["name","title","description","sample","price_usd_cents"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/onboarding_link_create":{"post":{"operationId":"onboarding_link_create","summary":"Onboarding link create","description":"Create a private client onboarding link for the selected workspace. Choose app slugs from the connection catalog. Include api_anything to let the client invite the workspace Keystone user to any web app, even one with no API.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"businessType":{"default":"general","type":"string","enum":["general","home_services","towing","construction","professional_services"]},"apps":{"minItems":1,"maxItems":24,"type":"array","items":{"type":"string","maxLength":100}},"days":{"default":7,"type":"integer","minimum":1,"maximum":30},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/onboarding_status":{"post":{"operationId":"onboarding_status","summary":"Onboarding status","description":"Check client onboarding progress and custom API tool drafts for the selected workspace.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/onboarding_link_revoke":{"post":{"operationId":"onboarding_link_revoke","summary":"Onboarding link revoke","description":"Disable a client onboarding link for the selected workspace.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"destructive","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/client_seat_invite":{"post":{"operationId":"client_seat_invite","summary":"Client seat invite","description":"Give a client their own Keystone access to the current workspace, so they can connect their own AI (Claude, ChatGPT, Cursor) to this workspace only. Returns a one-time invite link for the agency to send. Each workspace includes 3 users; each additional user is $10 a month on the agency's bill. client_price_usd is what the agency charges its client for this person, recorded for margin tracking only. The client's AI can use every app connected in this workspace. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":160,"description":"The client's email address. Only someone who signs in with it can accept."},"client_price_usd":{"description":"What the agency charges this client per month for the seat.","type":"number","minimum":0,"maximum":100000},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["email"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"agency","x-keystone-needs-approval":true}},"/v1/tools/client_seats":{"post":{"operationId":"client_seats","summary":"Client seats","description":"List client seats (invited and active) for the current workspace, or for every workspace with all_workspaces, and per workspace: users against the included number, what Keystone charges for extra users, what the agency charges its client, and the agency margin per month.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"all_workspaces":{"default":false,"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/client_seat_revoke":{"post":{"operationId":"client_seat_revoke","summary":"Client seat revoke","description":"Revoke a client seat or withdraw an invite at once. The client's AI loses access on its next call, and if the workspace was over its included users, the bill drops by one user.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"seat_id":{"type":"string","pattern":"^seat_[a-f0-9]{24}$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["seat_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"destructive","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/partner_status":{"post":{"operationId":"partner_status","summary":"Partner status","description":"Partner program earnings for the signed-in person: clicks, signups, trials, paying accounts, monthly recurring commission, and pending, payable and paid amounts in USD, plus recent payouts. Use it when someone asks how much they have earned from referrals. Partners earn 20% of every payment from accounts they refer.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/partner_link":{"post":{"operationId":"partner_link","summary":"Partner link","description":"The signed-in person's partner referral link, pointing at any page on the Keystone site such as /pricing. Joins the partner program on first use (joining accepts the partner terms at /partner-terms). Visits through the link are tracked for 60 days.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"description":"A page on the Keystone site, like / or /pricing. Defaults to the home page.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/payouts_setup":{"post":{"operationId":"payouts_setup","summary":"Payouts setup","description":"Start or continue Stripe Express payout onboarding. For agency client-wallet margin payouts, only an account owner or admin can use it. For partner program payouts, it acts on the signed-in person's own partner record. Returns Stripe's hosted onboarding link; the person completes identity, bank and tax details there.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"for":{"description":"Which payout to set up or inspect. Omit it to see both in payouts_status.","type":"string","enum":["agency","partner"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/payouts_status":{"post":{"operationId":"payouts_status","summary":"Payouts status","description":"Payout readiness for the signed-in person: not started, pending verification, or ready. Covers agency client-wallet margin payouts and their own partner-program payouts, with payable amounts and the next action. Refreshes pending Stripe Express account state before answering.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"for":{"description":"Which payout to set up or inspect. Omit it to see both in payouts_status.","type":"string","enum":["agency","partner"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/client_offboard_plan":{"post":{"operationId":"client_offboard_plan","summary":"Client offboard plan","description":"Agency client offboarding, step 1. For \"offboard <client>\", select that client's workspace and call this. Returns a checklist of everything Keystone will end: scheduled jobs, a data export ZIP for the client, the Google Ads manager link, Business Profile access, the workspace Google account in Search Console and GA4, the Keystone user in other web apps, every app connection and API key, Keystone numbers and domains, and the workspace archive. Changes nothing. Numbers and domains need the client's choice: release (let it go) or transfer (the client keeps it). Show the whole checklist to the person before client_offboard_run.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"numbers":{"description":"Default for every Keystone number: release or transfer to the client.","type":"string","enum":["release","transfer"]},"domains":{"description":"Default for every domain registered through Keystone: release (no renewal) or transfer to the client.","type":"string","enum":["release","transfer"]},"choices":{"description":"Per number (E.164) or domain choices that override the defaults.","type":"object","propertyNames":{"type":"string","maxLength":253},"additionalProperties":{"type":"string","enum":["release","transfer"]}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/client_offboard_run":{"post":{"operationId":"client_offboard_run","summary":"Client offboard run","description":"Agency client offboarding, step 2. Runs an approved plan from client_offboard_plan: revokes Google access, disconnects every app and key, removes the Keystone user from other web apps, releases or transfers numbers and domains, exports the data and archives the workspace. Only after the agency approved the checklist. Each step reports done, or a manual step with exact instructions for the client. Safe to call again with the same id: finished steps are kept and failed steps retry. The account owner or an admin approves the run through Keystone. (Ends access or deletes data, so a person must approve it first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. approved: true in the input never counts as approval.)","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"code":{"type":"string","maxLength":20,"description":"The code returned with the plan."},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id","code"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"destructive","x-keystone-module":"agency","x-keystone-needs-approval":true}},"/v1/tools/client_offboard_status":{"post":{"operationId":"client_offboard_status","summary":"Client offboard status","description":"Agency client offboarding: the latest plan or run for this workspace, or one by id (also after the workspace is archived). Lists each step as planned, done, manual (with the exact instructions), skipped or failed, plus the client's data export link.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/agency_agents_now":{"post":{"operationId":"agency_agents_now","summary":"Agency agents now","description":"Agency owners and admins only. Every client at once: which AI sessions are checked in right now (AI app, client, lane, task, what each claimed), live API Anything computers, recent agent mail and handoffs, open blockers, and stuck or failing work (abandoned claims, unread handoffs, apps that need a sign-in, failing tools and calls), plus approvals waiting per client. Filter by client or agent. Each item links into that client.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"clients":{"description":"Only these clients: workspace ids or slugs from workspaces_list. Omit for every client.","maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"agent":{"description":"One agent: \"lane:<lane>\" (like lane:ads), \"app:<AI app>\" (like app:Claude Code), or either name.","type":"string","maxLength":80},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/agency_notebook_search":{"post":{"operationId":"agency_notebook_search","summary":"Agency notebook search","description":"Agency owners and admins only. Searches the agency notebook and every client notebook at once, by keyword and meaning. Each hit says which client it belongs to (or the agency) and links to the note. Use it to find how a past job was done for another client, or which clients share a vendor, person or campaign.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":300,"description":"Words or a question."},"clients":{"description":"Only these clients: workspace ids or slugs from workspaces_list. Omit for every client.","maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"include_agency":{"description":"Also search the agency notebook. Default true.","type":"boolean"},"limit":{"description":"Most hits to return. Default 20.","type":"integer","minimum":1,"maximum":50},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["query"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/agency_rules_get":{"post":{"operationId":"agency_rules_get","summary":"Agency rules get","description":"Agency owners and admins only. The agency AGENTS.md (the rules every client's AI follows) and, for each client, whether it adds its own rules on top, which sections it adds to, the lines it adds, and lines that may contradict an agency rule. Pass one client to also get that client's full rules text.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"client":{"description":"One client (workspace id or slug) for its full rules text.","type":"string","minLength":1,"maxLength":80},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/agency_digest":{"post":{"operationId":"agency_digest","summary":"Agency digest","description":"Agency owners and admins only. The daily agency digest: what the AIs did across every client that day (from each client's automatic write-ups), what needs a person (approvals, blockers, stuck work), and decisions logged. Returns the saved digest note for a past day, or builds today's so far.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"description":"A UTC day, YYYY-MM-DD. Default today.","type":"string","maxLength":10},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/opportunities_scan":{"post":{"operationId":"opportunities_scan","summary":"Opportunities scan","description":"Agency owners and admins only. Scan every client (or the named ones) for work they need that the agency sells: not in the map pack, reviews behind competitors, not named by ChatGPT, ads spending with no leads, a slow or broken site, missed calls with no text back, no win-back campaign. Each finding carries its evidence and a monthly value from the agency rate card. mode stored (default) uses only what Keystone already measured and costs nothing. mode full adds one live map check and one ChatGPT check per client: call it first without confirm to get the price, show the person, then call again with confirm true. Full scans are paid from the agency wallet. Nothing is sent to any client. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"default":"stored","type":"string","enum":["stored","full"]},"clients":{"description":"Only these clients: workspace ids or slugs from workspaces_list. Omit for every client.","maxItems":60,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"only_this_client":{"description":"Scan only the current workspace. Redshift Loops use this.","type":"boolean"},"confirm":{"default":false,"description":"Full scan only: true runs it after the person saw the price.","type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"agency","x-keystone-needs-approval":true}},"/v1/tools/opportunities_list":{"post":{"operationId":"opportunities_list","summary":"Opportunities list","description":"Agency owners and admins only. The open opportunities from the last scans, highest value first: client, service, what is wrong, the evidence with its source and date, the rate card offer and its monthly and one-time price, and any proposal already built. Totals by client and by service. Filter by client, service or status.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"clients":{"description":"Only these clients: workspace ids or slugs from workspaces_list. Omit for every client.","maxItems":60,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"only_this_client":{"type":"boolean"},"service":{"description":"One of: local_seo, reviews, ai_search, ads, website, calls, reactivation.","type":"string","enum":["local_seo","reviews","ai_search","ads","website","calls","reactivation"]},"status":{"default":"open","description":"open includes the ones with a proposal out.","type":"string","enum":["open","proposed","dismissed","resolved","all"]},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/opportunity_propose":{"post":{"operationId":"opportunity_propose","summary":"Opportunity propose","description":"Agency owners and admins only. Build a proposal (deal room) for one client from its opportunities: the findings become the audit section, and the prices come from the rate card, with everything together as the recommended package and each service on its own. Returns the deal room link, shown once. Nothing is sent; share the link with the client yourself when the person says so.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"opportunity_ids":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"string","minLength":3,"maxLength":40},"description":"Ids from opportunities_list, all for the same client."},"client_email":{"description":"Pre-fills the signer email on the deal room.","type":"string","maxLength":160,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"intro":{"type":"string","maxLength":1200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["opportunity_ids"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/review_deck":{"post":{"operationId":"review_deck","summary":"Review deck","description":"Agency owners and admins only. Build the quarterly business review deck for one client, several, or every client: the quarter's booked jobs, revenue, calls, leads, reviews, map and Google rankings and AI answer share against the quarter before, the work the agency finished, and the top 3 next things to buy from the opportunity finder with rate card prices. Every number comes from data Keystone stored; Redshift Warp writes the few sentences around them (a fraction of a cent each from the wallet when Redshift is on), and any sentence with a number not in the data is replaced. Behind the deck's Accept button it makes a deal room for those next steps. Building again refreshes the deck in place. Nothing is sent; call review_deck_share for a link when the person wants to send it.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"clients":{"description":"Clients to build for: workspace ids or slugs from workspaces_list. Omit for every client.","maxItems":60,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"only_this_client":{"description":"Build only for the current workspace.","type":"boolean"},"quarter":{"description":"2026-Q3, current or last. Omit for the running quarter once it is 30 days old, otherwise the last full one.","type":"string","maxLength":20},"accept_button":{"default":true,"description":"false builds the deck without a deal room behind Accept.","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/review_decks_list":{"post":{"operationId":"review_decks_list","summary":"Review decks list","description":"Agency owners and admins only. The quarterly review decks already built, newest first, per client: quarter, headline, numbers, next steps, whether a share link is live and how many times the client opened it.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"clients":{"description":"Clients to build for: workspace ids or slugs from workspaces_list. Omit for every client.","maxItems":60,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"limit":{"default":30,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/review_deck_share":{"post":{"operationId":"review_deck_share","summary":"Review deck share","description":"Agency owners and admins only. Make the share link and PDF link for a review deck so the agency can send it to its client, or turn the link off. Making a new link turns the old one off. The link is shown once. Nothing is sent: the person sends it.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"deck_id":{"type":"string","minLength":4,"maxLength":40},"action":{"default":"share","type":"string","enum":["share","turn_off"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["deck_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/client_video_setup":{"post":{"operationId":"client_video_setup","summary":"Client video setup","description":"Agency owners and admins only. Monday client videos: every Monday Keystone drafts a 45 to 75 second narrated video for a client about last week, from stored numbers only (calls answered, leads, reviews and replies, Google Maps and search rankings, AI search answers, work done in the client's apps), in the agency's colors. preview true shows the cost and the voices before anything changes. on true turns the Monday draft on for this client (or every client with all_clients true); an owner or admin approves the cost, and the Account Manager's Monday Loop drafts the video. on false turns it off. voice picks the narration voice; send_to saves the client's email for one-click sending. Nothing is ever sent without the agency. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"preview":{"default":false,"type":"boolean"},"on":{"type":"boolean"},"all_clients":{"default":false,"type":"boolean"},"voice":{"description":"thalia: Clear, warm, confident (female); apollo: Relaxed and friendly (male); helena: Calm and caring (female); arcas: Natural and smooth (male)","type":"string","enum":["thalia","apollo","helena","arcas"]},"send_to":{"description":"The client contact who gets the video by email when the agency sends it. null clears it.","anyOf":[{"type":"string","maxLength":160,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"agency","x-keystone-needs-approval":true}},"/v1/tools/client_video_draft":{"post":{"operationId":"client_video_draft","summary":"Client video draft","description":"Agency owners and admins only. Draft the Monday video for one client, several, or every client: reads last week from stored numbers, writes the script in plain words, reads it aloud and queues the video to be made (about a minute, in the agency's colors with music under the voice). Costs about $0.04 a video from the wallet. Drafting again before it is sent rewrites it with the latest numbers. A week with nothing stored makes no video. Nothing is sent: call client_video_send when the person says so.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"clients":{"description":"Clients: workspace ids or slugs from workspaces_list. Omit for every client.","maxItems":60,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"only_this_client":{"description":"Draft only for the current workspace.","type":"boolean"},"week":{"description":"last (default), this (the week so far), or a week like 2026-W46.","type":"string","maxLength":20},"voice":{"type":"string","enum":["thalia","apollo","helena","arcas"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/client_videos_list":{"post":{"operationId":"client_videos_list","summary":"Client videos list","description":"Agency owners and admins only. The Monday videos already drafted, newest first: client, week, whether it is being made, ready for review, sent or on the portal, its script, cost and how many times the client opened it.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"clients":{"description":"Clients: workspace ids or slugs from workspaces_list. Omit for every client.","maxItems":60,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"limit":{"default":20,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/client_video_script":{"post":{"operationId":"client_video_script","summary":"Client video script","description":"Agency owners and admins only. Change one scene of an unsent Monday video: its on-screen title, the words the voice says, or both. The voice may only say numbers Keystone measured for that week; words with any other number are refused. The scene is read aloud again (a fraction of a cent) and the video is made again.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"video_id":{"type":"string","minLength":4,"maxLength":40},"scene":{"type":"integer","minimum":1,"maximum":12,"description":"Scene number from client_videos_list, starting at 1."},"title":{"type":"string","minLength":1,"maxLength":80},"says":{"type":"string","minLength":1,"maxLength":500},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["video_id","scene"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/client_video_send":{"post":{"operationId":"client_video_send","summary":"Client video send","description":"Agency owners and admins only. Send a finished Monday video to the client. email sends a watch link to the client's saved email (or to), from the agency's name with replies going to the person sending. portal shows it on the client portal. take_down removes it from the portal and turns the emailed link off. Only call this when the person asked to send it. (Sends an external message; confirm with the user first. If the workspace requires approval for sends, the result has status needs_approval: share the approve_url, then call again with the same arguments plus approval_id.)","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"video_id":{"type":"string","minLength":4,"maxLength":40},"channel":{"type":"string","enum":["email","portal","take_down"]},"to":{"type":"string","maxLength":160,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["video_id","channel"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"send","x-keystone-module":"agency","x-keystone-needs-approval":true}},"/v1/tools/rate_card_get":{"post":{"operationId":"rate_card_get","summary":"Rate card get","description":"Read the account's rate card: packages and add-ons with one-time and monthly prices, the deposit rule and how long proposals stay open. Every pitch and proposal uses it.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/rate_card_set":{"post":{"operationId":"rate_card_set","summary":"Rate card set","description":"Add or update one rate card item. Pass id to update. kind package: the client picks one. kind addon: the client can add it. Prices in dollars. Open proposals keep the prices they were sent with.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","maxLength":40},"kind":{"type":"string","enum":["package","addon"]},"item":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","maxLength":400},"includes":{"maxItems":12,"type":"array","items":{"type":"string","maxLength":140}},"one_time_usd":{"default":0,"description":"Setup fee or project price, paid once.","type":"number","minimum":0,"maximum":999999.99},"monthly_usd":{"default":0,"description":"Monthly retainer.","type":"number","minimum":0,"maximum":999999.99}},"required":["name"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["kind","item"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/rate_card_remove":{"post":{"operationId":"rate_card_remove","summary":"Rate card remove","description":"Remove a rate card item by id. Proposals already sent keep it.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","maxLength":40},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/rate_card_terms_set":{"post":{"operationId":"rate_card_terms_set","summary":"Rate card terms set","description":"Set the deposit rule, how many days proposals stay open, and the agreement terms text (lines starting \"# \" are headings, \"- \" list items). Pass terms as an empty string to go back to the default terms.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"deposit_mode":{"description":"first_payment: setup plus the first month due at signing. percent: that share of the one-time price plus the first month. fixed: a fixed deposit.","type":"string","enum":["first_payment","percent","fixed"]},"deposit_percent":{"type":"integer","minimum":1,"maximum":100},"deposit_usd":{"description":"Fixed deposit in dollars, for deposit_mode fixed.","type":"number","minimum":0,"maximum":999999.99},"valid_days":{"type":"integer","minimum":1,"maximum":90},"terms":{"type":"string","maxLength":20000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/deal_pitch":{"post":{"operationId":"deal_pitch","summary":"Deal pitch","description":"Pitch a prospect from their website: reads the site for the business's real facts, runs the growth audit (billed from the Keystone wallet, about $1 to $2), publishes a preview of an improved site on ksites.app, and builds a branded deal room with the rate card packages that the prospect can sign and pay on the call. Returns the room link. Pass audit false to skip the paid audit. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":3,"maxLength":300,"description":"Prospect website, e.g. brightsmiledental.com"},"business_name":{"description":"Name to use when the site states it differently than the Google profile.","type":"string","maxLength":100},"city":{"description":"Audit market as \"City,State,United States\". Read from the site when it states an address.","type":"string","maxLength":200},"keywords":{"maxItems":3,"type":"array","items":{"type":"string","minLength":2,"maxLength":200}},"audit":{"default":true,"type":"boolean"},"preview":{"default":true,"type":"boolean"},"client_email":{"type":"string","maxLength":160,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"package_ids":{"description":"Rate card packages to offer. Default: every package.","maxItems":6,"type":"array","items":{"type":"string","maxLength":40}},"addon_ids":{"maxItems":12,"type":"array","items":{"type":"string","maxLength":40}},"recommended":{"description":"Rate card package id to mark Recommended.","type":"string","maxLength":40},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["url"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"agency","x-keystone-needs-approval":true}},"/v1/tools/deal_create":{"post":{"operationId":"deal_create","summary":"Deal create","description":"Make a deal room for a client: a page where they pick a package, sign the agreement and pay the deposit by card. Use rate card ids, custom packages, or both. Prices in dollars. For an agency, payment creates the client workspace and sends the onboarding link; on Personal it records the sale.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"client_name":{"type":"string","minLength":1,"maxLength":120},"client_email":{"type":"string","maxLength":160,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"title":{"type":"string","maxLength":140},"intro":{"description":"Short message at the top of the room.","type":"string","maxLength":1200},"package_ids":{"maxItems":6,"type":"array","items":{"type":"string","maxLength":40}},"addon_ids":{"maxItems":12,"type":"array","items":{"type":"string","maxLength":40}},"packages":{"description":"Custom packages, keyed p1, p2 and so on.","maxItems":6,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","maxLength":400},"includes":{"maxItems":12,"type":"array","items":{"type":"string","maxLength":140}},"one_time_usd":{"default":0,"description":"Setup fee or project price, paid once.","type":"number","minimum":0,"maximum":999999.99},"monthly_usd":{"default":0,"description":"Monthly retainer.","type":"number","minimum":0,"maximum":999999.99}},"required":["name"]}},"addons":{"description":"Custom add-ons, keyed a1, a2 and so on.","maxItems":12,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","maxLength":400},"includes":{"maxItems":12,"type":"array","items":{"type":"string","maxLength":140}},"one_time_usd":{"default":0,"description":"Setup fee or project price, paid once.","type":"number","minimum":0,"maximum":999999.99},"monthly_usd":{"default":0,"description":"Monthly retainer.","type":"number","minimum":0,"maximum":999999.99}},"required":["name"]}},"recommended":{"type":"string","maxLength":40},"deposit_mode":{"description":"first_payment: setup plus the first month due at signing. percent: that share of the one-time price plus the first month. fixed: a fixed deposit.","type":"string","enum":["first_payment","percent","fixed"]},"deposit_percent":{"type":"integer","minimum":1,"maximum":100},"deposit_usd":{"description":"Fixed deposit in dollars, for deposit_mode fixed.","type":"number","minimum":0,"maximum":999999.99},"valid_days":{"type":"integer","minimum":1,"maximum":90},"on_payment":{"description":"workspace: make the client workspace and onboarding link when paid. none: record the sale only.","type":"string","enum":["workspace","none"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["client_name"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/deals_list":{"post":{"operationId":"deals_list","summary":"Deals list","description":"List deals in this workspace with status (open, signed, paid, void, expired), how often the client opened the room, and the chosen totals. Also returns the account payable balance (deal payments and client-wallet margins, less card fees and payouts).","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/deal_get":{"post":{"operationId":"deal_get","summary":"Deal get","description":"One deal: status, views, the signature record (name, email, time, network address, agreement hash), payments and the client workspace made on payment.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","maxLength":40},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/deal_void":{"post":{"operationId":"deal_void","summary":"Deal void","description":"Withdraw an open deal so its room link stops accepting signatures.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","maxLength":40},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"destructive","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/redshift_fleet_set":{"post":{"operationId":"redshift_fleet_set","summary":"Redshift fleet set","description":"Agency fleet mode: run one Redshift agent Loop across chosen client workspaces on one schedule (each in its own time zone). Clients get the agent turned on; clients left out of the list get the fleet Loop switched off. Each client runs in its own workspace and never sees another client. Agency owners and admins only.","tags":["Playbooks, marketplace and client setup"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"string","enum":["account_manager","reviews","ads","front_desk","bookkeeper"],"description":"One of: account_manager (Agency Account Manager), reviews (Reviews and Reputation), ads (Ads Optimizer), front_desk (Front Desk), bookkeeper (Bookkeeper's Assistant)."},"loop":{"type":"string","minLength":1,"maxLength":40,"description":"The Loop key, like weekly_update, morning_sweep, nightly_check, missed_calls or weekly_receipts."},"clients":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"description":"Client workspace ids or slugs."},"schedule":{"description":"Leave out to keep the Loop's default schedule. tz is ignored: each client uses its own.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"daily"},"time":{"type":"string","pattern":"^([01]\\d|2[0-3]):([0-5]\\d)$"},"tz":{"type":"string","minLength":1,"maxLength":64},"weekdays_only":{"type":"boolean"}},"required":["kind","time","tz"]},{"type":"object","properties":{"kind":{"type":"string","const":"weekly"},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"time":{"type":"string","pattern":"^([01]\\d|2[0-3]):([0-5]\\d)$"},"tz":{"type":"string","minLength":1,"maxLength":64}},"required":["kind","days","time","tz"]},{"type":"object","properties":{"kind":{"type":"string","const":"monthly"},"day":{"type":"integer","minimum":1,"maximum":28},"time":{"type":"string","pattern":"^([01]\\d|2[0-3]):([0-5]\\d)$"},"tz":{"type":"string","minLength":1,"maxLength":64}},"required":["kind","day","time","tz"]},{"type":"object","properties":{"kind":{"type":"string","const":"every"},"minutes":{"type":"integer","minimum":15,"maximum":1440},"tz":{"type":"string","minLength":1,"maxLength":64},"hours":{"minItems":2,"maxItems":2,"type":"array","items":{"type":"integer","minimum":0,"maximum":24}},"weekdays_only":{"type":"boolean"}},"required":["kind","minutes","tz"]}]},"model":{"description":"One of the Redshift model ids that redshift_agents lists.","type":"string","maxLength":40},"on":{"default":true,"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["agent","loop","clients"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"agency","x-keystone-needs-approval":false}},"/v1/tools/reviews_configure":{"post":{"operationId":"reviews_configure","summary":"Reviews configure","description":"Configure Reviews on Autopilot for this workspace: Google review link, SMS/email channel, auto-posting for 4 and 5 star replies, and owner approval alerts for 1 to 3 star reviews. Blocks Yelp review links, review gating, and review incentives.","tags":["Reviews and referrals"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"requests_enabled":{"type":"boolean"},"request_channel":{"type":"string","enum":["sms","email","sms_or_email"]},"review_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"business_name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"owner_name":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"owner_alert_email":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}]},"reply_phone":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"postal_address":{"anyOf":[{"type":"string","minLength":5,"maxLength":300},{"type":"null"}]},"sender_email":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}]},"request_template":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"reminder_enabled":{"type":"boolean"},"reminder_delay_days":{"type":"integer","minimum":1,"maximum":14},"cooldown_days":{"type":"integer","minimum":1,"maximum":365},"auto_reply_positive":{"description":"Auto-post replies to 4 and 5 star Google reviews. 1 to 3 star reviews always wait for owner approval.","type":"boolean"},"gbp_account":{"anyOf":[{"type":"string","pattern":"^accounts\\/\\d{1,30}$"},{"type":"null"}]},"gbp_location":{"anyOf":[{"type":"string","pattern":"^locations\\/\\d{1,30}$"},{"type":"null"}]},"field_service_app":{"type":"string","minLength":1,"maxLength":60},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"reviews","x-keystone-needs-approval":false}},"/v1/tools/reviews_status":{"post":{"operationId":"reviews_status","summary":"Reviews status","description":"Read Reviews on Autopilot settings, A2P SMS approval status, connected field-service apps, and summary counts for this workspace.","tags":["Reviews and referrals"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reviews","x-keystone-needs-approval":false}},"/v1/tools/reviews_sync_closed_jobs":{"post":{"operationId":"reviews_sync_closed_jobs","summary":"Reviews sync closed jobs","description":"Pull closed jobs from the connected field-service app and send compliant review requests by A2P-gated text or email. Requires requests_enabled unless dry_run is true. (Sends an external message; confirm with the user first. If the workspace requires approval for sends, the result has status needs_approval: share the approve_url, then call again with the same arguments plus approval_id.)","tags":["Reviews and referrals"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"send","x-keystone-module":"reviews","x-keystone-needs-approval":true}},"/v1/tools/reviews_send_request":{"post":{"operationId":"reviews_send_request","summary":"Reviews send request","description":"Send a single compliant Google review request for a closed job by A2P-gated SMS or email. Respects opt-outs, cooldown, and platform rules (blocks Yelp, gating, and incentives). (Sends an external message; confirm with the user first. If the workspace requires approval for sends, the result has status needs_approval: share the approve_url, then call again with the same arguments plus approval_id.)","tags":["Reviews and referrals"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source_app":{"default":"manual","type":"string","minLength":1,"maxLength":60},"external_job_id":{"type":"string","minLength":1,"maxLength":120},"customer_name":{"type":"string","maxLength":120},"customer_phone":{"type":"string","maxLength":30},"customer_email":{"type":"string","maxLength":254},"technician_name":{"type":"string","maxLength":80},"service_type":{"type":"string","maxLength":120},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["external_job_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"send","x-keystone-module":"reviews","x-keystone-needs-approval":true}},"/v1/tools/reviews_sync_google":{"post":{"operationId":"reviews_sync_google","summary":"Reviews sync google","description":"Sync Google Business Profile reviews for bound locations, draft replies in the workspace voice from memory, auto-post 4 and 5 star replies when enabled, and hold 1 to 3 star reviews for review.","tags":["Reviews and referrals"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"account":{"type":"string","pattern":"^accounts\\/\\d{1,30}$"},"location":{"type":"string","pattern":"^locations\\/\\d{1,30}$"},"dry_run":{"default":false,"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"reviews","x-keystone-needs-approval":false}},"/v1/tools/reviews_list":{"post":{"operationId":"reviews_list","summary":"Reviews list","description":"List synced Google reviews, drafted replies, pending owner approvals, and recent closed-job review requests for this workspace.","tags":["Reviews and referrals"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["new","drafted","pending_owner_approval","posted","dismissed","failed"]},"min_stars":{"type":"integer","minimum":1,"maximum":5},"max_stars":{"type":"integer","minimum":1,"maximum":5},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reviews","x-keystone-needs-approval":false}},"/v1/tools/reviews_redraft_reply":{"post":{"operationId":"reviews_redraft_reply","summary":"Reviews redraft reply","description":"Generate a fresh reply draft in the workspace voice for one synced Google review.","tags":["Reviews and referrals"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"review_id":{"type":"string","minLength":1,"maxLength":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["review_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"reviews","x-keystone-needs-approval":false}},"/v1/tools/reviews_approve_reply":{"post":{"operationId":"reviews_approve_reply","summary":"Reviews approve reply","description":"Approve and publish a drafted Google review reply (required for 1 to 3 star reviews, and for 4 to 5 star reviews when auto-post is off). (Sends an external message; confirm with the user first. If the workspace requires approval for sends, the result has status needs_approval: share the approve_url, then call again with the same arguments plus approval_id.)","tags":["Reviews and referrals"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"review_id":{"type":"string","minLength":1,"maxLength":100},"reply_text":{"description":"Edited reply text to post instead of the saved draft.","type":"string","minLength":1,"maxLength":4096},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["review_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"send","x-keystone-module":"reviews","x-keystone-needs-approval":true}},"/v1/tools/reviews_dismiss_reply":{"post":{"operationId":"reviews_dismiss_reply","summary":"Reviews dismiss reply","description":"Dismiss a drafted Google review reply without publishing it.","tags":["Reviews and referrals"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"review_id":{"type":"string","minLength":1,"maxLength":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["review_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"reviews","x-keystone-needs-approval":false}},"/v1/tools/reviews_opt_out":{"post":{"operationId":"reviews_opt_out","summary":"Reviews opt out","description":"Add a phone number or email address to this workspace review opt-out list, or list current opt-outs.","tags":["Reviews and referrals"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"default":"list","type":"string","enum":["add","list"]},"channel":{"default":"all","type":"string","enum":["sms","email","all"]},"contact":{"type":"string","maxLength":254},"reason":{"type":"string","maxLength":300},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"reviews","x-keystone-needs-approval":false}},"/v1/tools/referral_settings":{"post":{"operationId":"referral_settings","summary":"Referral settings","description":"Read or configure the customer referral program, its approved separate invitation copy, reward amount, annual cap, and short friend form. Enabling it does not offer anything for a review and sends nothing until a closed job and a good review both exist.","tags":["Reviews and referrals"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"landing_page":{"description":"Page on a published workspace site containing the referral form embed.","anyOf":[{"type":"string","maxLength":1200,"format":"uri"},{"type":"null"}]},"approve_template":{"description":"Approve the current text and email invitation templates for delivery.","type":"boolean"},"enabled":{"type":"boolean"},"reward_type":{"type":"string","enum":["gift_card","account_credit"]},"reward_cents":{"type":"integer","minimum":100,"maximum":100000},"annual_cap":{"type":"integer","minimum":1,"maximum":1000},"invite_channel":{"type":"string","enum":["sms","email","sms_or_email"]},"business_name":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"owner_alert_email":{"anyOf":[{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"sender_email":{"anyOf":[{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"postal_address":{"anyOf":[{"type":"string","minLength":5,"maxLength":300},{"type":"null"}]},"sms_template":{"anyOf":[{"type":"string","minLength":1,"maxLength":1600},{"type":"null"}]},"email_subject":{"anyOf":[{"type":"string","minLength":1,"maxLength":140},{"type":"null"}]},"email_body":{"anyOf":[{"type":"string","minLength":1,"maxLength":10000},{"type":"null"}]},"field_service_app":{"type":"string","enum":["auto","workiz","fieldpulse","gorilladesk","housecall_pro","jobber"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"reviews","x-keystone-needs-approval":false}},"/v1/tools/referral_invite_queue":{"post":{"operationId":"referral_invite_queue","summary":"Referral invite queue","description":"List referral invitations waiting after a positive review, or send ready invitations. Sends still obey opt-outs, sender approval, and the quiet-hours window. Use dry_run to preview without sending. (Sends an external message; confirm with the user first. If the workspace requires approval for sends, the result has status needs_approval: share the approve_url, then call again with the same arguments plus approval_id.)","tags":["Reviews and referrals"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"default":"list","type":"string","enum":["list","send"]},"referral_id":{"type":"string","pattern":"^ref_[a-f0-9]{24}$"},"dry_run":{"default":false,"type":"boolean"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"send","x-keystone-module":"reviews","x-keystone-needs-approval":true}},"/v1/tools/referrals_list":{"post":{"operationId":"referrals_list","summary":"Referrals list","description":"List referrals and friend milestones for this workspace, including self-referral blocks, paid invoices, rewards due, approvals, and recorded manual payments.","tags":["Reviews and referrals"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["awaiting_review","invite_queued","invite_blocked","invited","lead","rejected_self","rejected_duplicate","rejected_existing_customer","rejected_cap","booked","invoiced","reward_due","reward_approved","reward_paid"]},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"reviews","x-keystone-needs-approval":false}},"/v1/tools/referral_reward_approve":{"post":{"operationId":"referral_reward_approve","summary":"Referral reward approve","description":"Approve a reward due from an actually paid friend invoice for manual payment, or record that the approved gift card or account credit was paid by hand. This tool never sends money or buys a gift card. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Reviews and referrals"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"referral_id":{"type":"string","pattern":"^ref_[a-f0-9]{24}$"},"action":{"default":"approve","type":"string","enum":["approve","mark_paid"]},"payout_reference":{"type":"string","minLength":1,"maxLength":200},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["referral_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"reviews","x-keystone-needs-approval":true}},"/v1/tools/lsa_configure":{"post":{"operationId":"lsa_configure","summary":"Local Services Ads configure","description":"Configure Local Services Ads settings for this workspace: bound Google Ads customer ID, offered and excluded services, service area ZIPs and cities, duplicate window, and automation flags.","tags":["Ad budgets and Local Services leads"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customer_id":{"anyOf":[{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},{"type":"null"}]},"offered_services":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"excluded_services":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"service_zips":{"maxItems":200,"type":"array","items":{"type":"string","pattern":"^\\d{5}$"}},"service_cities":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"duplicate_window_days":{"type":"integer","minimum":1,"maximum":90},"auto_submit_feedback":{"type":"boolean"},"auto_reply_messages":{"type":"boolean"},"business_phone":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"ads","x-keystone-needs-approval":false}},"/v1/tools/lsa_sync_leads":{"post":{"operationId":"lsa_sync_leads","summary":"Local Services Ads sync leads","description":"Sync Local Services Ads leads and conversations, flag credit-eligible leads (wrong service, outside area, spam, solicitation, duplicate), and draft replies for open message leads.","tags":["Ad budgets and Local Services leads"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"limit":{"default":200,"type":"integer","minimum":1,"maximum":500},"dry_run":{"default":false,"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"ads","x-keystone-needs-approval":false}},"/v1/tools/lsa_list_leads":{"post":{"operationId":"lsa_list_leads","summary":"Local Services Ads list leads","description":"List synced Local Services Ads leads with credit status, credit-eligibility flags, prepared dispute evidence packets, one-click Google LSA Inbox links, and drafted message replies.","tags":["Ad budgets and Local Services leads"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"flag_status":{"type":"string","enum":["none","flagged","submitted","prepared_manual","credited","dismissed"]},"lead_type":{"type":"string","enum":["MESSAGE","PHONE_CALL","BOOKING","COUPON"]},"charged_only":{"default":false,"type":"boolean"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"ads","x-keystone-needs-approval":false}},"/v1/tools/lsa_prepare_dispute":{"post":{"operationId":"lsa_prepare_dispute","summary":"Local Services Ads prepare dispute","description":"Prepare a structured LSA lead dispute and feedback evidence packet with Google policy notes and a one-click Google Local Services Inbox link.","tags":["Ad budgets and Local Services leads"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lead_id":{"type":"string","minLength":1,"maxLength":200,"description":"Internal lead ID, Google lead ID, or full resource name."},"reason":{"type":"string","enum":["GEO_MISMATCH","JOB_TYPE_MISMATCH","NOT_READY_TO_BOOK","SPAM","DUPLICATE","SOLICITATION","OTHER_DISSATISFIED_REASON"]},"comment":{"type":"string","maxLength":1000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["lead_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"ads","x-keystone-needs-approval":false}},"/v1/tools/lsa_submit_feedback":{"post":{"operationId":"lsa_submit_feedback","summary":"Local Services Ads submit feedback","description":"Submit lead credit feedback to Google Local Services Ads for a flagged or completed lead. When the API cannot submit or Google declines a credit, returns a prepared dispute packet with evidence and a link to the LSA Inbox.","tags":["Ad budgets and Local Services leads"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lead_id":{"type":"string","minLength":1,"maxLength":200},"survey_answer":{"default":"VERY_DISSATISFIED","type":"string","enum":["DISSATISFIED","VERY_DISSATISFIED","SATISFIED","VERY_SATISFIED"]},"dissatisfied_reason":{"type":"string","enum":["GEO_MISMATCH","JOB_TYPE_MISMATCH","NOT_READY_TO_BOOK","SPAM","DUPLICATE","SOLICITATION","OTHER_DISSATISFIED_REASON"]},"satisfied_reason":{"type":"string","enum":["BOOKED_CUSTOMER","LIKELY_BOOKED_CUSTOMER","SERVICE_RELATED","HIGH_VALUE_SERVICE","OTHER_SATISFIED_REASON"]},"other_reason_comment":{"type":"string","maxLength":1000},"dry_run":{"default":false,"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["lead_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"ads","x-keystone-needs-approval":false}},"/v1/tools/lsa_draft_reply":{"post":{"operationId":"lsa_draft_reply","summary":"Local Services Ads draft reply","description":"Draft or regenerate a reply in the workspace voice for a Local Services Ads message lead.","tags":["Ad budgets and Local Services leads"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lead_id":{"type":"string","minLength":1,"maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["lead_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"ads","x-keystone-needs-approval":false}},"/v1/tools/lsa_reply_lead":{"post":{"operationId":"lsa_reply_lead","summary":"Local Services Ads reply lead","description":"Send a reply to an active Local Services Ads message lead. (Sends an external message; confirm with the user first. If the workspace requires approval for sends, the result has status needs_approval: share the approve_url, then call again with the same arguments plus approval_id.)","tags":["Ad budgets and Local Services leads"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lead_id":{"type":"string","minLength":1,"maxLength":200},"message_text":{"description":"Reply text to send. Defaults to the saved draft.","type":"string","minLength":1,"maxLength":1500},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["lead_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"send","x-keystone-module":"ads","x-keystone-needs-approval":true}},"/v1/tools/lsa_dismiss_flag":{"post":{"operationId":"lsa_dismiss_flag","summary":"Local Services Ads dismiss flag","description":"Dismiss a credit flag on an LSA lead without submitting feedback.","tags":["Ad budgets and Local Services leads"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lead_id":{"type":"string","minLength":1,"maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["lead_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"ads","x-keystone-needs-approval":false}},"/v1/tools/budget_autopilot_settings":{"post":{"operationId":"budget_autopilot_settings","summary":"Budget autopilot settings","description":"Read or change the ad budget autopilot for this workspace. It reads booked jobs and open slots from the connected field-service or CRM app and the weather for the service area, then proposes Google Ads and Meta Ads daily budget changes: cut non-brand budgets (or pause them) when the next few days are booked out, raise them when slots are open, and raise matching service campaigns on heat, freeze or storm forecasts. Every change waits in an approval queue unless auto mode is on, and auto mode only moves budgets inside a percent band and a daily dollar cap you set. Call with no arguments to read the settings and what still needs setup. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Ad budgets and Local Services leads"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"description":"Turn the autopilot on or off. Keystone checks the workspace every few hours while it is on.","type":"boolean"},"mode":{"description":"approve (the default): every change waits in the queue for your approval. auto: changes inside the band and daily cap apply by themselves. Pauses and restarts always wait.","type":"string","enum":["approve","auto"]},"customer_id":{"description":"Which connected Google Ads account to manage. Not needed when only one is connected.","type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"crew_hours_per_day":{"description":"Total crew hours available on a working day, for example 3 trucks x 8 hours = 24.","anyOf":[{"type":"number","minimum":1,"maximum":1000},{"type":"null"}]},"working_days":{"description":"Days the crews work. Default Monday to Friday.","minItems":1,"maxItems":7,"type":"array","items":{"type":"string","enum":["sunday","monday","tuesday","wednesday","thursday","friday","saturday"]}},"timezone":{"description":"IANA time zone of the business, such as America/Chicago. Default America/New_York.","type":"string","maxLength":64},"window_days":{"description":"How many days ahead to measure the booked percent over. Default 3.","type":"integer","minimum":1,"maximum":10},"job_hours":{"description":"Hours to assume for a booked job with no end time. Default 2.","type":"number","minimum":0.25,"maximum":24},"high_percent":{"description":"Booked at or above this percent counts as booked out. Default 90.","type":"number","minimum":50,"maximum":100},"high_action":{"description":"When booked out: cut non-brand daily budgets, or pause non-brand campaigns. Default cut.","type":"string","enum":["cut","pause"]},"cut_percent":{"description":"How much to cut budgets when booked out. Default 25.","type":"number","minimum":1,"maximum":90},"low_percent":{"description":"Booked at or under this percent counts as open slots. Default 50.","type":"number","minimum":0,"maximum":95},"raise_percent":{"description":"How much to raise non-brand budgets when slots are open. Default 20.","type":"number","minimum":1,"maximum":300},"cap_percent":{"description":"A budget never goes more than this percent above its normal amount. Default 50.","type":"number","minimum":0,"maximum":500},"min_daily_dollars":{"description":"A cut never takes a budget below this many dollars a day. Default 5.","type":"number","minimum":0,"maximum":100000},"max_daily_dollars":{"description":"A raise never takes a budget above this many dollars a day. Leave unset for no dollar ceiling.","anyOf":[{"type":"number","minimum":1,"maximum":1000000},{"type":"null"}]},"weather":{"description":"Raise matching service campaigns on heat, freeze or storm forecasts. Default on.","type":"boolean"},"weather_raise_percent":{"description":"How much a weather trigger raises a matching campaign. Default 20.","type":"number","minimum":1,"maximum":300},"heat_high_f":{"description":"Forecast high in F that counts as a heat trigger. Default 95.","type":"number","minimum":70,"maximum":130},"freeze_low_f":{"description":"Forecast low in F that counts as a cold or freeze trigger. Default 28.","type":"number","minimum":-40,"maximum":50},"areas":{"description":"Service areas for the weather: \"lat,lon\", \"City, ST\" or a US ZIP. Defaults to the storm watch areas.","maxItems":5,"type":"array","items":{"type":"string","minLength":2,"maxLength":120}},"weather_campaigns":{"description":"Which campaigns each trigger raises. Words must appear in the campaign name; a number is a campaign id. Defaults cover AC and HVAC for heat, heating and plumbing for cold, roofing and tree work for storms.","type":"object","properties":{"heat":{"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"cold":{"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"storm":{"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}}}},"brand_keywords":{"description":"Words that mark a campaign as brand. Brand campaigns are not cut or paused for being booked out. Names containing \"brand\" or the business name count already.","maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"exclude_campaign_ids":{"description":"Campaign ids the autopilot must never touch.","maxItems":100,"type":"array","items":{"type":"string","pattern":"^(?:\\d{1,19}|meta:\\d{1,25}:\\d{1,25})$"}},"auto_band_percent":{"description":"Auto mode only: the most a budget may sit from its normal amount, in percent.","anyOf":[{"type":"number","minimum":1,"maximum":100},{"type":"null"}]},"auto_daily_cap_dollars":{"description":"Auto mode only: the most daily budget, in dollars, that auto mode may move in one day in total.","anyOf":[{"type":"number","minimum":1,"maximum":1000000},{"type":"null"}]},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"ads","x-keystone-needs-approval":true}},"/v1/tools/budget_autopilot_preview":{"post":{"operationId":"budget_autopilot_preview","summary":"Budget autopilot preview","description":"Show what the budget autopilot would change right now and why, without changing anything: the booked percent for each of the next ten days, the weather triggers found for the service area, and each proposed ad budget change with its reason (for example \"Tuesday to Thursday 96% booked\") and whether it would wait for approval or apply automatically. When slots are open it also says how many past customers are due, for a reactivation offer.","tags":["Ad budgets and Local Services leads"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"ads","x-keystone-needs-approval":false}},"/v1/tools/budget_changes_list":{"post":{"operationId":"budget_changes_list","summary":"Budget changes list","description":"Read pending daily budget, pause and resume proposals for this workspace. Use budget_autopilot_queue only to decide or refresh proposals.","tags":["Ad budgets and Local Services leads"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"ads","x-keystone-needs-approval":false}},"/v1/tools/budget_autopilot_queue":{"post":{"operationId":"budget_autopilot_queue","summary":"Budget autopilot queue","description":"The approval queue for budget autopilot changes. action list (default) shows what waits for approval, with the reason for each. approve applies pending changes to the connected ad account (pass change_ids, or all: true); reject discards them; refresh checks the schedule and weather now and queues what it finds. Approving a change that is more than two days old, or whose live budget no longer matches, is refused so a stale proposal never overwrites a newer budget. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Ad budgets and Local Services leads"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"default":"list","type":"string","enum":["list","approve","reject","refresh"]},"change_ids":{"description":"Changes to approve or reject.","minItems":1,"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"all":{"default":false,"description":"Approve or reject every pending change.","type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"ads","x-keystone-needs-approval":true}},"/v1/tools/budget_autopilot_history":{"post":{"operationId":"budget_autopilot_history","summary":"Budget autopilot history","description":"Every budget autopilot change: proposed, applied, rejected, failed, expired and undone, newest first, with the reason, the old and new daily budget, who decided and whether auto mode applied it.","tags":["Ad budgets and Local Services leads"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"days":{"default":30,"type":"integer","minimum":1,"maximum":365},"status":{"type":"string","enum":["pending","applied","rejected","failed","stale","undone"]},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"ads","x-keystone-needs-approval":false}},"/v1/tools/budget_autopilot_undo":{"post":{"operationId":"budget_autopilot_undo","summary":"Budget autopilot undo","description":"Undo one applied budget autopilot change in one call: the daily budget goes back to what it was, or a paused campaign restarts. Leave change_id empty to undo the latest applied change. It refuses when the live budget no longer matches what Keystone set, because someone changed it since; pass force to set it back anyway. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Ad budgets and Local Services leads"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"change_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"force":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"ads","x-keystone-needs-approval":true}},"/v1/tools/ctv_audience_sync":{"post":{"operationId":"ctv_audience_sync","summary":"Ctv audience sync","description":"Sync a US workspace audience (hashed emails with UID2 normalization and hashed phones) to Keystone CTV for household-level streaming TV targeting.","tags":["Ad budgets and Local Services leads"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"audience_id":{"type":"string","minLength":4,"maxLength":80},"website_url":{"type":"string","maxLength":500,"format":"uri"},"industry":{"default":"PROFESSIONAL_SERVICES","type":"string","maxLength":60},"exclude_converted":{"default":true,"type":"boolean"},"limit":{"default":1000,"type":"integer","minimum":1,"maximum":1000},"dry_run":{"default":false,"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["audience_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"ads","x-keystone-needs-approval":false}},"/v1/tools/ctv_campaign_create":{"post":{"operationId":"ctv_campaign_create","summary":"Ctv campaign create","description":"Create a paused draft Keystone CTV streaming campaign targeting a synced household audience (minimum $50/day). Does not spend until approved and activated with ctv_campaign_activate.","tags":["Ad budgets and Local Services leads"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":4,"maxLength":100},"audience_id":{"type":"string","minLength":4,"maxLength":80},"ctv_audience_id":{"type":"string","minLength":4,"maxLength":100},"goal":{"default":"AWARENESS","type":"string","enum":["AWARENESS","TRAFFIC","RETARGETING","LEADS","SALES"]},"daily_budget_usd":{"type":"integer","minimum":50,"maximum":10000},"flight_days":{"default":14,"type":"integer","minimum":1,"maximum":90},"target_cpm_usd":{"default":25,"type":"number","minimum":5,"maximum":100},"starts_at":{"type":"string"},"website_url":{"type":"string","maxLength":500,"format":"uri"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["name","daily_budget_usd"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"ads","x-keystone-needs-approval":false}},"/v1/tools/ctv_campaign_activate":{"post":{"operationId":"ctv_campaign_activate","summary":"Ctv campaign activate","description":"Pay the quoted Keystone CTV flight budget from the Keystone wallet and publish the drafted campaign. Needs approval and wallet funds. If launch fails, run it again with the same campaign: the budget is paid once per campaign. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Ad budgets and Local Services leads"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","minLength":4,"maxLength":80},"idempotency_key":{"type":"string","minLength":8,"maxLength":80},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["campaign_id","idempotency_key"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"ads","x-keystone-needs-approval":true}},"/v1/tools/ctv_campaign_pause":{"post":{"operationId":"ctv_campaign_pause","summary":"Ctv campaign pause","description":"Pause an active Keystone CTV campaign immediately.","tags":["Ad budgets and Local Services leads"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","minLength":4,"maxLength":80},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["campaign_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"ads","x-keystone-needs-approval":false}},"/v1/tools/ctv_report":{"post":{"operationId":"ctv_report","summary":"Ctv report","description":"List Keystone CTV campaigns or request/check an async CTV performance report (impressions, reach, spend, CPM).","tags":["Ad budgets and Local Services leads"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","minLength":4,"maxLength":80},"report_id":{"type":"string","minLength":4,"maxLength":80},"start_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"end_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"ads","x-keystone-needs-approval":false}},"/v1/tools/ad_creatives_sources":{"post":{"operationId":"ad_creatives_sources","summary":"Ad creatives sources","description":"Show the client material available for ad creative drafts in this workspace: job photos (never restricted ones), 4- and 5-star reviews, site pages, buyer phrases, saved facts and past Google Ads winners, with what a batch would cost from the wallet. Spends nothing.","tags":["Ad budgets and Local Services leads"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"default":20,"description":"Batch size to price.","type":"integer","minimum":1,"maximum":20},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"ads","x-keystone-needs-approval":false}},"/v1/tools/ad_creatives_generate":{"post":{"operationId":"ad_creatives_generate","summary":"Ad creatives generate","description":"Draft ad creatives for this client from its own job photos, reviews, site pages, buyer phrases and past Google Ads winners. Each draft has headlines, descriptions, image crops sized for its placement (Google Search, Performance Max, Meta Feed, Meta Reels, YouTube Shorts), a 15-second storyboard for video placements, and a one-line reason naming the material it came from. Lines with a claim the material does not back are dropped. Uses a Redshift model paid from the wallet (Warp by default, the cheaper model for bulk and weekly runs). Every result is a draft; nothing is published.","tags":["Ad budgets and Local Services leads"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"description":"How many drafts, 1 to 20. Defaults to 6, or the saved weekly count for weekly runs.","type":"integer","minimum":1,"maximum":20},"placements":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["google_search","google_pmax","meta_feed","meta_reels","youtube_shorts"]}},"model":{"description":"warp, or the id of the cheaper Redshift model that redshift_agents lists.","type":"string","maxLength":40},"bulk":{"default":false,"description":"Use the cheaper Redshift model.","type":"boolean"},"trigger":{"default":"manual","description":"The weekly Loop passes weekly.","type":"string","enum":["manual","weekly"]},"focus":{"description":"A service, offer or season to lean on.","type":"string","minLength":2,"maxLength":140},"landing_url":{"type":"string","maxLength":2048,"format":"uri"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"ads","x-keystone-needs-approval":false}},"/v1/tools/ad_creatives_list":{"post":{"operationId":"ad_creatives_list","summary":"Ad creatives list","description":"List this client's ad creative drafts and batches: copy, image crops, storyboards, the reason for each, and whether it is a draft, queued, rejected or archived. Spends nothing.","tags":["Ad budgets and Local Services leads"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["draft","queued","rejected","archived"]},"placement":{"type":"string","enum":["google_search","google_pmax","meta_feed","meta_reels","youtube_shorts"]},"batch_id":{"type":"string","maxLength":40},"limit":{"default":30,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"ads","x-keystone-needs-approval":false}},"/v1/tools/ad_creatives_decide":{"post":{"operationId":"ad_creatives_decide","summary":"Ad creatives decide","description":"Approve, reject, edit or archive ad creative drafts. Approving moves a draft to the queue and does nothing else: it is not published and no ad account changes. Edit takes one draft id and changes its copy. Approving needs approval permission.","tags":["Ad budgets and Local Services leads"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["approve","reject","edit","archive"]},"ids":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"note":{"type":"string","maxLength":300},"edits":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":80},"headlines":{"minItems":1,"maxItems":15,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"long_headline":{"anyOf":[{"type":"string","minLength":1,"maxLength":90},{"type":"null"}]},"descriptions":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":90}},"primary_text":{"anyOf":[{"type":"string","minLength":1,"maxLength":125},{"type":"null"}]},"call_to_action":{"type":"string","minLength":1,"maxLength":24},"landing_url":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]}}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["action","ids"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"ads","x-keystone-needs-approval":false}},"/v1/tools/ad_creatives_setup":{"post":{"operationId":"ad_creatives_setup","summary":"Ad creatives setup","description":"Settings for the weekly ad creative drafts in this workspace, and turning the weekly Loop on or off. The Loop is off until an owner or admin turns it on; it then drafts each Monday on the Ads agent with the cheaper Redshift model unless set otherwise, paid from the wallet. preview true shows the settings and the weekly cost without changing anything. on false turns it off and keeps every draft. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Ad budgets and Local Services leads"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"preview":{"default":false,"type":"boolean"},"on":{"type":"boolean"},"weekly_count":{"type":"integer","minimum":1,"maximum":20},"placements":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["google_search","google_pmax","meta_feed","meta_reels","youtube_shorts"]}},"weekly_model":{"description":"warp, or the id of the cheaper Redshift model that redshift_agents lists.","type":"string","maxLength":40},"landing_url":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"ads","x-keystone-needs-approval":true}},"/v1/tools/reactivation_find_due_customers":{"post":{"operationId":"reactivation_find_due_customers","summary":"Reactivation find due customers","description":"Pull past customers from the connected CRM or field-service app, clean opt-outs, duplicates, and recent visits, and pick customers due for service by service type and last visit.","tags":["Follow-ups and campaigns"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"source_app":{"default":"auto","type":"string","minLength":1,"maxLength":60},"service_types":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"min_days_since_visit":{"type":"integer","minimum":30,"maximum":3650},"max_days_since_visit":{"type":"integer","minimum":30,"maximum":7300},"exclude_recent_days":{"default":60,"type":"integer","minimum":0,"maximum":365},"channel":{"default":"both","type":"string","enum":["sms","email","both"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/reactivation_create_campaign":{"post":{"operationId":"reactivation_create_campaign","summary":"Reactivation create campaign","description":"Create a draft past-customer reactivation campaign with target service types, due-for-service window, offer, and copy. Stays in draft until started.","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"channel":{"default":"both","type":"string","enum":["sms","email","both"]},"source_app":{"default":"auto","type":"string","minLength":1,"maxLength":60},"service_types":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"min_days_since_visit":{"default":180,"type":"integer","minimum":30,"maximum":3650},"max_days_since_visit":{"anyOf":[{"type":"integer","minimum":30,"maximum":7300},{"type":"null"}]},"exclude_recent_days":{"default":60,"type":"integer","minimum":0,"maximum":365},"offer_text":{"type":"string","minLength":1,"maxLength":300},"offer_deadline":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"business_name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"postal_address":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"reply_to_email":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}]},"sms_template":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]},"email_subject":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"email_body":{"anyOf":[{"type":"string","maxLength":2500},{"type":"null"}]},"batch_size":{"default":50,"type":"integer","minimum":1,"maximum":300},"populate_audience":{"default":true,"type":"boolean"},"draft_copy":{"default":true,"type":"boolean"},"customers":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"source_app":{"default":"manual","type":"string","minLength":1,"maxLength":60},"external_customer_id":{"type":"string","minLength":1,"maxLength":120},"customer_name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"customer_phone":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"customer_email":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}]},"last_service_type":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"last_visit_date":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"lifetime_value_dollars":{"type":"number","minimum":0},"has_open_job":{"default":false,"type":"boolean"},"do_not_contact":{"default":false,"type":"boolean"}},"required":["external_customer_id"]}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["name","offer_text"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/reactivation_draft_copy":{"post":{"operationId":"reactivation_draft_copy","summary":"Reactivation draft copy","description":"Draft or regenerate the SMS and email copy for a reactivation campaign using workspace voice memory.","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","minLength":1,"maxLength":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["campaign_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/reactivation_sync_audience":{"post":{"operationId":"reactivation_sync_audience","summary":"Reactivation sync audience","description":"Pull due-for-service past customers from the connected CRM/field-service app into an existing campaign without sending messages.","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","minLength":1,"maxLength":100},"customers":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"source_app":{"default":"manual","type":"string","minLength":1,"maxLength":60},"external_customer_id":{"type":"string","minLength":1,"maxLength":120},"customer_name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"customer_phone":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"customer_email":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}]},"last_service_type":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"last_visit_date":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"lifetime_value_dollars":{"type":"number","minimum":0},"has_open_job":{"default":false,"type":"boolean"},"do_not_contact":{"default":false,"type":"boolean"}},"required":["external_customer_id"]}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["campaign_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/reactivation_list_campaigns":{"post":{"operationId":"reactivation_list_campaigns","summary":"Reactivation list campaigns","description":"List past-customer reactivation campaigns, recipient counts, recent replies, and A2P SMS approval status for this workspace.","tags":["Follow-ups and campaigns"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","maxLength":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/reactivation_start_campaign":{"post":{"operationId":"reactivation_start_campaign","summary":"Reactivation start campaign","description":"Start a draft or paused reactivation campaign. Texting requires A2P approval; pass send_first_batch to send the first batch immediately. (Sends an external message; confirm with the user first. If the workspace requires approval for sends, the result has status needs_approval: share the approve_url, then call again with the same arguments plus approval_id.)","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","minLength":1,"maxLength":100},"send_first_batch":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["campaign_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"send","x-keystone-module":"outreach","x-keystone-needs-approval":true}},"/v1/tools/reactivation_pause_campaign":{"post":{"operationId":"reactivation_pause_campaign","summary":"Reactivation pause campaign","description":"Pause an active reactivation campaign so no further batches are sent.","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","minLength":1,"maxLength":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["campaign_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/reactivation_send_batch":{"post":{"operationId":"reactivation_send_batch","summary":"Reactivation send batch","description":"Send the next batch of reactivation texts and emails for an ACTIVE campaign. Refuses draft or paused campaigns, enforces A2P approval for SMS, and skips opted-out contacts. (Sends an external message; confirm with the user first. If the workspace requires approval for sends, the result has status needs_approval: share the approve_url, then call again with the same arguments plus approval_id.)","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","minLength":1,"maxLength":100},"limit":{"type":"integer","minimum":1,"maximum":300},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["campaign_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"send","x-keystone-module":"outreach","x-keystone-needs-approval":true}},"/v1/tools/reactivation_handle_reply":{"post":{"operationId":"reactivation_handle_reply","summary":"Reactivation handle reply","description":"Process an inbound customer reply to a reactivation text or email. Immediately opts out STOP/unsubscribe replies and books interested replies into the connected CRM.","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"type":"string","enum":["sms","email"]},"from_contact":{"type":"string","minLength":3,"maxLength":254},"body":{"type":"string","minLength":1,"maxLength":2000},"campaign_id":{"type":"string","maxLength":100},"recipient_id":{"type":"string","maxLength":100},"auto_book":{"default":true,"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["channel","from_contact","body"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/reactivation_book_reply":{"post":{"operationId":"reactivation_book_reply","summary":"Reactivation book reply","description":"Book a replied reactivation customer into the connected CRM or field-service app with reactivation source attribution. Refuses opted-out contacts.","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"recipient_id":{"type":"string","minLength":1,"maxLength":100},"service_type":{"type":"string","maxLength":120},"notes":{"type":"string","maxLength":1000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["recipient_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/reactivation_opt_out":{"post":{"operationId":"reactivation_opt_out","summary":"Reactivation opt out","description":"Add a phone number or email address to this workspace opt-out list (immediately canceling pending campaign sends to that contact), or list opt-outs.","tags":["Follow-ups and campaigns"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"default":"list","type":"string","enum":["add","list"]},"channel":{"default":"all","type":"string","enum":["sms","email","all"]},"contact":{"type":"string","maxLength":254},"reason":{"type":"string","maxLength":300},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/estimate_closer_configure":{"post":{"operationId":"estimate_closer_configure","summary":"Estimate closer configure","description":"Draft a four-step estimate closer sequence in the business voice, set its sending hours and contact details, and save it as a draft. Nothing sends until a person approves it.","tags":["Follow-ups and campaigns"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"default":"both","type":"string","enum":["sms","email","both"]},"source_app":{"default":"auto","type":"string","minLength":1,"maxLength":60},"timezone":{"default":"America/New_York","type":"string","minLength":1,"maxLength":80},"quiet_start_minutes":{"default":480,"description":"Earliest sending time, in minutes after midnight in the workspace time zone.","type":"integer","minimum":0,"maximum":1439},"quiet_end_minutes":{"default":1200,"description":"Latest sending time, in minutes after midnight in the workspace time zone.","type":"integer","minimum":0,"maximum":1439},"business_name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"postal_address":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"reply_to_email":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}]},"owner_alert_email":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}]},"templates":{"description":"Edited templates. Missing drafts are generated and normalized.","minItems":4,"maxItems":4,"type":"array","items":{"type":"object","properties":{"step":{"type":"integer","minimum":0,"maximum":3},"label":{"default":"","type":"string","maxLength":50},"sms":{"default":"","type":"string","maxLength":480},"email_subject":{"default":"","type":"string","maxLength":150},"email_body":{"default":"","type":"string","maxLength":4000}},"required":["step"]}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/invoice_collections_configure":{"post":{"operationId":"invoice_collections_configure","summary":"Invoice collections configure","description":"Draft a four-step invoice collections sequence in the business voice, set its sending hours and contact details, and save it as a draft. Nothing sends until a person approves it.","tags":["Follow-ups and campaigns"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"default":"both","type":"string","enum":["sms","email","both"]},"source_app":{"default":"auto","type":"string","minLength":1,"maxLength":60},"timezone":{"default":"America/New_York","type":"string","minLength":1,"maxLength":80},"quiet_start_minutes":{"default":480,"description":"Earliest sending time, in minutes after midnight in the workspace time zone.","type":"integer","minimum":0,"maximum":1439},"quiet_end_minutes":{"default":1200,"description":"Latest sending time, in minutes after midnight in the workspace time zone.","type":"integer","minimum":0,"maximum":1439},"business_name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"postal_address":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"reply_to_email":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}]},"owner_alert_email":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}]},"templates":{"description":"Edited templates. Missing drafts are generated and normalized.","minItems":4,"maxItems":4,"type":"array","items":{"type":"object","properties":{"step":{"type":"integer","minimum":0,"maximum":3},"label":{"default":"","type":"string","maxLength":50},"sms":{"default":"","type":"string","maxLength":480},"email_subject":{"default":"","type":"string","maxLength":150},"email_body":{"default":"","type":"string","maxLength":4000}},"required":["step"]}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/estimate_closer_approve":{"post":{"operationId":"estimate_closer_approve","summary":"Estimate closer approve","description":"Approve the saved estimate follow-up templates and activate the sequence for this workspace. This allows scheduled customer messages. (Sends an external message; confirm with the user first. If the workspace requires approval for sends, the result has status needs_approval: share the approve_url, then call again with the same arguments plus approval_id.)","tags":["Follow-ups and campaigns"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"send","x-keystone-module":"outreach","x-keystone-needs-approval":true}},"/v1/tools/invoice_collections_approve":{"post":{"operationId":"invoice_collections_approve","summary":"Invoice collections approve","description":"Approve the saved invoice reminder templates and activate the sequence for this workspace. This allows scheduled customer messages. (Sends an external message; confirm with the user first. If the workspace requires approval for sends, the result has status needs_approval: share the approve_url, then call again with the same arguments plus approval_id.)","tags":["Follow-ups and campaigns"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"send","x-keystone-module":"outreach","x-keystone-needs-approval":true}},"/v1/tools/followups_queue":{"post":{"operationId":"followups_queue","summary":"Followups queue","description":"Preview estimate and invoice follow-up queues, rendered messages, due times, stop reasons, and sending-hour blocks without sending anything.","tags":["Follow-ups and campaigns"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["estimate","invoice"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/followups_run":{"post":{"operationId":"followups_run","summary":"Followups run","description":"Sync estimates or invoices from the connected app and process their approved follow-up sequence. Approved or paid documents and customer replies stop automatically. A dry run sends nothing. (Sends an external message; confirm with the user first. If the workspace requires approval for sends, the result has status needs_approval: share the approve_url, then call again with the same arguments plus approval_id.)","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["estimate","invoice"]},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["kind"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"send","x-keystone-module":"outreach","x-keystone-needs-approval":true}},"/v1/tools/followups_pause":{"post":{"operationId":"followups_pause","summary":"Followups pause","description":"Pause estimate follow-ups or invoice reminders immediately. No scheduled messages send while paused.","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["estimate","invoice"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["kind"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/followups_resume":{"post":{"operationId":"followups_resume","summary":"Followups resume","description":"Resume a previously approved and paused estimate or invoice sequence, allowing scheduled messages to send again. (Sends an external message; confirm with the user first. If the workspace requires approval for sends, the result has status needs_approval: share the approve_url, then call again with the same arguments plus approval_id.)","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["estimate","invoice"]},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["kind"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"send","x-keystone-module":"outreach","x-keystone-needs-approval":true}},"/v1/tools/followups_report":{"post":{"operationId":"followups_report","summary":"Followups report","description":"Report messages sent, replies waiting for the owner, stopped sequences, and estimate revenue or invoice cash recovered after the first follow-up.","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["estimate","invoice"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["kind"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/followups_handle_reply":{"post":{"operationId":"followups_handle_reply","summary":"Followups handle reply","description":"Record an inbound customer reply, stop all matching active sequences, honor opt-out words, and flag the reply for the owner.","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"type":"string","enum":["sms","email"]},"from_contact":{"type":"string","minLength":3,"maxLength":254},"body":{"type":"string","minLength":1,"maxLength":2000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["channel","from_contact","body"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/storm_watch":{"post":{"operationId":"storm_watch","summary":"Storm watch","description":"Read or change the storm watch for this workspace: the service areas, the hail and wind thresholds, and whether Keystone drafts a storm campaign (a landing page and a Google Ads plan, both waiting for approval) after hail or high wind hits. Keystone checks each area every three hours. Call with no arguments to read it.","tags":["Follow-ups and campaigns"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"areas":{"description":"Service areas to watch, up to five.","minItems":1,"maxItems":5,"type":"array","items":{"type":"string","minLength":2,"maxLength":120,"description":"A service area: \"lat,lon\", a city and state like \"Tampa, FL\", or a US ZIP like \"33602 US\"."}},"enabled":{"description":"Turn the watch on or off.","type":"boolean"},"campaigns":{"description":"Draft a storm campaign for approval after a new hail or wind event. Never publishes or spends on its own.","type":"boolean"},"services":{"description":"Services the campaign copy names, such as roof repair.","maxItems":6,"type":"array","items":{"type":"string","minLength":2,"maxLength":80}},"hail_probability":{"description":"Hail probability percent that counts as hail. Default 50.","type":"integer","minimum":1,"maximum":100},"hail_inches":{"description":"Smallest forecast hail size that counts, in inches. Default 1.","type":"number","minimum":0.25,"maximum":4},"wind_mph":{"description":"Gust speed that counts as a wind event, in mph. Default 58.","type":"integer","minimum":30,"maximum":120},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/storm_alerts":{"post":{"operationId":"storm_alerts","summary":"Storm alerts","description":"Forecast hail, severe wind and thunderstorms for a service area over the next 1 to 5 days, day by day, with peak gusts and hail probability. Leave area empty to check every watched area.","tags":["Follow-ups and campaigns"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"area":{"type":"string","minLength":2,"maxLength":120,"description":"A service area: \"lat,lon\", a city and state like \"Tampa, FL\", or a US ZIP like \"33602 US\"."},"days":{"default":3,"type":"integer","minimum":1,"maximum":5},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/storm_history":{"post":{"operationId":"storm_history","summary":"Storm history","description":"Hail and wind events recorded for a service area by the storm watch (up to a year back), plus what the last 24 hours of weather show right now. Use it to time a storm campaign or to check a homeowner's storm date.","tags":["Follow-ups and campaigns"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"area":{"type":"string","minLength":2,"maxLength":120,"description":"A service area: \"lat,lon\", a city and state like \"Tampa, FL\", or a US ZIP like \"33602 US\"."},"days":{"default":90,"description":"How many days of recorded events to return.","type":"integer","minimum":1,"maximum":365},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/audience_create":{"post":{"operationId":"audience_create","summary":"Audience create","description":"Create a workspace audience container with an explicit consent lane for direct mail, addressable CTV, first-party ad syncs, or DNC-scrubbed call queues.","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"source_summary":{"default":"manual","type":"string","maxLength":120},"default_consent_lane":{"default":"public_record","type":"string","enum":["express_written","first_party_crm","public_record","visitor_id_us","third_party_intent"]},"filters":{"description":"Optional audience criteria; Fair Housing protected classes and FCRA credit filters are rejected.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["name"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/audience_list":{"post":{"operationId":"audience_list","summary":"Audience list","description":"List saved audiences, consent lanes, and active member counts in this workspace.","tags":["Follow-ups and campaigns"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"default":50,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/audience_add_members":{"post":{"operationId":"audience_add_members","summary":"Audience add members","description":"Add property owners, permit leads, storm addresses, or CRM contacts into a workspace audience with explicit consent lanes. Suppressed people are skipped automatically.","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"audience_id":{"type":"string","minLength":4,"maxLength":80},"members":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"first_name":{"type":"string","maxLength":100},"last_name":{"type":"string","maxLength":100},"email":{"type":"string","maxLength":254},"hem_sha256":{"type":"string","pattern":"^[a-fA-F0-9]{64}$"},"phone":{"type":"string","maxLength":30},"address_line1":{"type":"string","maxLength":200},"address_line2":{"type":"string","maxLength":100},"city":{"type":"string","maxLength":100},"state":{"type":"string","maxLength":40},"postal_code":{"type":"string","maxLength":20},"country":{"default":"US","type":"string","maxLength":40},"source_kind":{"default":"manual","type":"string","minLength":1,"maxLength":60},"source_ref":{"type":"string","maxLength":160},"consent_lane":{"default":"public_record","type":"string","enum":["express_written","first_party_crm","public_record","visitor_id_us","third_party_intent"]},"consent_proof":{"type":"object","properties":{"method":{"type":"string","minLength":1,"maxLength":80},"source_url":{"type":"string","maxLength":500},"captured_at":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"disclosure_version":{"type":"string","maxLength":60}},"required":["method","captured_at"]},"dnc_status":{"default":"unknown","type":"string","enum":["clear","dnc","litigator","unknown"]},"crm_contact_id":{"type":"string","maxLength":80}}}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["audience_id","members"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/audience_get":{"post":{"operationId":"audience_get","summary":"Audience get","description":"Inspect one workspace audience, its consent-lane breakdown, channel eligibility summary, and sample members.","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"audience_id":{"type":"string","minLength":4,"maxLength":80},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["audience_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/audience_check_eligibility":{"post":{"operationId":"audience_check_eligibility","summary":"Audience check eligibility","description":"Check which members of a workspace audience are legally eligible for a chosen channel (direct_mail, ctv, meta_custom_audience, google_customer_match, email, sms, automated_voice, manual_call_task) and why blocked records cannot run on that channel.","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"audience_id":{"type":"string","minLength":4,"maxLength":80},"channel":{"type":"string","enum":["direct_mail","ctv","meta_custom_audience","google_customer_match","email","sms","automated_voice","manual_call_task"]},"verified_sender_email":{"type":"string","maxLength":254},"postal_address":{"type":"string","maxLength":300},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["audience_id","channel"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/audience_suppress":{"post":{"operationId":"audience_suppress","summary":"Audience suppress","description":"Add an email, hashed email, phone number, or US postal address to this workspace suppression list so Keystone blocks future outreach and ad syncs immediately.","tags":["Follow-ups and campaigns"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254},"hem_sha256":{"type":"string","pattern":"^[a-fA-F0-9]{64}$"},"phone":{"type":"string","maxLength":30},"address_line1":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"state":{"type":"string","maxLength":40},"postal_code":{"type":"string","maxLength":20},"channel":{"default":"all","type":"string","enum":["all","mail","email","phone","sms","ads","ctv","visitor_id","sale_share"]},"reason":{"type":"string","maxLength":240},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/audience_import_crm":{"post":{"operationId":"audience_import_crm","summary":"Audience import CRM","description":"Import first-party contacts from this workspace ServiceLine CRM account into an audience labeled first_party_crm for direct mail, Meta Custom Audiences, Google Customer Match, buyer exclusions, or CTV.","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"audience_id":{"type":"string","minLength":4,"maxLength":80},"tag":{"type":"string","maxLength":80},"limit":{"default":100,"type":"integer","minimum":1,"maximum":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["audience_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/audience_import_neighbor_draft":{"post":{"operationId":"audience_import_neighbor_draft","summary":"Audience import neighbor draft","description":"Import the nearby homeowner addresses from a targeted neighbor postcard draft into a workspace audience (consent_lane: public_record) so you can send 1-to-1 postcards directly through Keystone Direct Mail.","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"audience_id":{"type":"string","minLength":4,"maxLength":80},"draft_id":{"type":"string","minLength":4,"maxLength":80},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["audience_id","draft_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/audience_queue_manual_calls":{"post":{"operationId":"audience_queue_manual_calls","summary":"Audience queue manual calls","description":"Queue DNC-clear audience members as manual-dial-only call tasks inside ServiceLine CRM. Never auto-dials or sends AI voice calls; skips any record without dnc_status clear or express written consent.","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"audience_id":{"type":"string","minLength":4,"maxLength":80},"campaign_label":{"type":"string","minLength":1,"maxLength":100},"max_tasks":{"default":20,"type":"integer","minimum":1,"maximum":50},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["audience_id","campaign_label"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/audience_intent_topics":{"post":{"operationId":"audience_intent_topics","summary":"Audience intent topics","description":"Search available US buying-intent topics (such as roof replacement, kitchen remodeling, deck building, solar, or HVAC) before discovering an intent audience. Free to search.","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"search":{"type":"string","minLength":1,"maxLength":100},"category_id":{"type":"string","maxLength":80},"limit":{"default":25,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["search"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/audience_discover_intent":{"post":{"operationId":"audience_discover_intent","summary":"Audience discover intent","description":"Discover US consumers showing active buying intent on one or more topics and load them into a workspace audience labeled third_party_intent (eligible for direct mail and CTV; blocked from cold SMS and Meta/Google uploads). Bills your Keystone wallet only for matched records. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"audience_id":{"type":"string","minLength":4,"maxLength":80},"topic_ids":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"string","minLength":2,"maxLength":80}},"min_score":{"default":"high","type":"string","enum":["high","medium","low"]},"min_perc_score":{"type":"integer","minimum":1,"maximum":99},"limit":{"default":50,"type":"integer","minimum":1,"maximum":250},"resolve_email":{"default":true,"type":"boolean"},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["audience_id","topic_ids"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"outreach","x-keystone-needs-approval":true}},"/v1/tools/audience_enrich":{"post":{"operationId":"audience_enrich","summary":"Audience enrich","description":"Enrich existing audience members with matched US contact profiles (name, postal address, secondary identifiers) or score them on buying-intent topics. Misses cost $0; never downgrades existing first-party consent lanes. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"audience_id":{"type":"string","minLength":4,"maxLength":80},"mode":{"default":"contact","type":"string","enum":["contact","intent"]},"topic_ids":{"maxItems":25,"type":"array","items":{"type":"string","minLength":2,"maxLength":80}},"min_score":{"default":"medium","type":"string","enum":["high","medium","low"]},"limit":{"default":100,"type":"integer","minimum":1,"maximum":250},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["audience_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"outreach","x-keystone-needs-approval":true}},"/v1/tools/visitor_id_configure":{"post":{"operationId":"visitor_id_configure","summary":"Visitor ID configure","description":"Configure optional US-only website visitor identification for a workspace site. Off by default; requires a public privacy notice URL with opt-out instructions and Global Privacy Control (Sec-GPC: 1) support.","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site_id":{"type":"string","minLength":1,"maxLength":80},"enabled":{"type":"boolean"},"privacy_notice_url":{"type":"string","maxLength":500,"format":"uri"},"attest_privacy_notice":{"default":false,"type":"boolean"},"tier":{"default":"resolution_full_profile","type":"string","enum":["resolution_hem","resolution_hem_pte","resolution_full_profile"]},"target_audience_id":{"type":"string","minLength":4,"maxLength":80},"external_project_id":{"type":"string","minLength":1,"maxLength":120},"daily_cap_usd":{"default":50,"type":"number","minimum":1,"maximum":1000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["site_id","enabled"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/visitor_id_sync":{"post":{"operationId":"visitor_id_sync","summary":"Visitor ID sync","description":"Pull net-new US website visitors identified this UTC calendar month for a site with Visitor ID enabled. Deduplicates once per person per month, strips opt-outs and non-US rows, bills only matched visitors to your Keystone wallet, and logs visitor events to the CRM. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site_id":{"type":"string","minLength":1,"maxLength":80},"limit":{"default":100,"type":"integer","minimum":1,"maximum":250},"push_to_crm":{"default":true,"type":"boolean"},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["site_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"outreach","x-keystone-needs-approval":true}},"/v1/tools/audience_sync_meta":{"post":{"operationId":"audience_sync_meta","summary":"Audience sync meta","description":"Sync first-party CRM or express-written-consent audience members to a Meta Custom Audience (for reactivation, lookalikes, or buyer exclusions). Public records, visitor matches, and third-party intent lists are hard-blocked.","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"audience_id":{"type":"string","minLength":4,"maxLength":80},"custom_audience_id":{"type":"string","pattern":"^[1-9]\\d{0,24}$"},"name":{"type":"string","minLength":1,"maxLength":100},"sync_kind":{"default":"include","type":"string","enum":["include","exclude"]},"remove_members":{"default":false,"type":"boolean"},"only_converted":{"default":false,"type":"boolean"},"limit":{"default":1000,"type":"integer","minimum":1,"maximum":1000},"dry_run":{"default":false,"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["audience_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/audience_sync_google":{"post":{"operationId":"audience_sync_google","summary":"Audience sync google","description":"Sync first-party CRM or express-written-consent audience members to Google Ads Customer Match (for remarketing, similar segments, or buyer exclusions). Public records, visitor matches, and third-party intent lists are hard-blocked.","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"audience_id":{"type":"string","minLength":4,"maxLength":80},"customer_id":{"type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"user_list_resource_name":{"type":"string","maxLength":160},"name":{"type":"string","minLength":1,"maxLength":100},"sync_kind":{"default":"include","type":"string","enum":["include","exclude"]},"only_converted":{"default":false,"type":"boolean"},"limit":{"default":1000,"type":"integer","minimum":1,"maximum":1000},"dry_run":{"default":false,"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["audience_id","customer_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/mail_verify_address":{"post":{"operationId":"mail_verify_address","summary":"Mail verify address","description":"Verify and standardize a US mailing address for USPS deliverability before sending direct mail. Bills your Keystone wallet per check. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"primary_line":{"type":"string","minLength":3,"maxLength":200},"secondary_line":{"type":"string","maxLength":100},"city":{"type":"string","maxLength":100},"state":{"type":"string","pattern":"^[A-Za-z]{2}$"},"zip_code":{"type":"string","pattern":"^\\d{5}(?:-\\d{4})?$"},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["primary_line"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"outreach","x-keystone-needs-approval":true}},"/v1/tools/mail_preview_campaign":{"post":{"operationId":"mail_preview_campaign","summary":"Mail preview campaign","description":"Preview a 1-to-1 Keystone Direct Mail postcard campaign against a workspace audience. Checks consent lanes, suppressions, and exact USD pricing without charging or mailing.","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"audience_id":{"type":"string","minLength":4,"maxLength":80},"name":{"type":"string","minLength":1,"maxLength":120},"size":{"default":"4x6","type":"string","enum":["4x6","6x9","6x11"]},"mail_type":{"default":"usps_first_class","type":"string","enum":["usps_first_class","usps_standard"]},"from":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"address_line1":{"type":"string","minLength":3,"maxLength":200},"address_line2":{"type":"string","maxLength":100},"address_city":{"type":"string","minLength":1,"maxLength":100},"address_state":{"type":"string","pattern":"^[A-Za-z]{2}$"},"address_zip":{"type":"string","pattern":"^\\d{5}(?:-\\d{4})?$"}},"required":["name","address_line1","address_city","address_state","address_zip"]},"headline":{"type":"string","minLength":3,"maxLength":120},"body_copy":{"type":"string","minLength":10,"maxLength":480},"offer_text":{"type":"string","minLength":3,"maxLength":180},"destination_url":{"type":"string","maxLength":1000,"format":"uri"},"tracking_phone":{"type":"string","maxLength":30},"photo_url":{"type":"string","maxLength":1000,"format":"uri"},"accent_color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"max_pieces":{"default":100,"type":"integer","minimum":1,"maximum":500},"exclude_converted":{"default":true,"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["audience_id","name","from","headline","body_copy","offer_text","destination_url"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/mail_send_campaign":{"post":{"operationId":"mail_send_campaign","summary":"Mail send campaign","description":"Pay from the Keystone wallet and send a drafted 1-to-1 Keystone Direct Mail postcard campaign. Verifies US addresses, skips opt-outs, assigns unique QR attribution links, and logs every mailed piece to the CRM timeline. Needs approval and wallet funds; only pieces the carrier accepts are charged. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","minLength":4,"maxLength":80},"idempotency_key":{"type":"string","minLength":8,"maxLength":80},"max_pieces":{"default":100,"type":"integer","minimum":1,"maximum":500},"verify_addresses":{"default":true,"type":"boolean"},"exclude_converted":{"default":true,"type":"boolean"},"send_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"dry_run":{"default":false,"type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["campaign_id","idempotency_key"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"outreach","x-keystone-needs-approval":true}},"/v1/tools/mail_cancel_piece":{"post":{"operationId":"mail_cancel_piece","summary":"Mail cancel piece","description":"Cancel a queued 1-to-1 postcard before the print cutoff window closes.","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"piece_id":{"type":"string","minLength":4,"maxLength":80},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["piece_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/mail_campaign_status":{"post":{"operationId":"mail_campaign_status","summary":"Mail campaign status","description":"Check delivery status, USPS tracking events, and QR scan attribution for one or all direct mail campaigns in this workspace.","tags":["Follow-ups and campaigns"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","minLength":4,"maxLength":80},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/email_domain_setup":{"post":{"operationId":"email_domain_setup","summary":"Email domain setup","description":"Set up built-in email sending from a workspace domain. Uses Keystone DNS when the zone is on the platform, the customer connected DNS account when one is connected, and the registrar or browser-delegation route when one is available. Shows every planned email DNS change in the approval before applying it, never touches unrelated records, and keeps undo data. dry_run true only previews. (Ends access or deletes data, so a person must approve it first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. approved: true in the input never counts as approval.)","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","minLength":4,"maxLength":253,"description":"Apex or subdomain to send from, such as sarahsdental.com or mail.sarahsdental.com."},"sender_local_part":{"default":"hello","description":"The part before @, default hello.","type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}$"},"dry_run":{"default":false,"description":"true to preview the exact DNS diff without applying it.","type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["domain"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"destructive","x-keystone-module":"outreach","x-keystone-needs-approval":true}},"/v1/tools/email_dns_undo":{"post":{"operationId":"email_dns_undo","summary":"Email DNS undo","description":"Undo one approved email DNS setup by plan id. Restores updated records and removes only records Keystone created; unrelated DNS records are never touched. (Ends access or deletes data, so a person must approve it first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. approved: true in the input never counts as approval.)","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan_id":{"type":"string","pattern":"^edp_[a-f0-9]{24}$","description":"undo_plan_id returned by email_domain_setup."},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["plan_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"destructive","x-keystone-module":"outreach","x-keystone-needs-approval":true}},"/v1/tools/email_send":{"post":{"operationId":"email_send","summary":"Email send","description":"Send transactional email from the workspace domain once email_domain_setup is ready, or from the Keystone starter sender until then. Use for one-to-one email, customer follow-ups, receipts and service notices. Marketing or promotional campaigns are refused because this sender is transactional only. More than one recipient is bulk mail: it needs the workspace postal address and owner approval, adds one-click unsubscribe, and stays within workspace rate limits. (Sends an external message; confirm with the user first. If the workspace requires approval for sends, the result has status needs_approval: share the approve_url, then call again with the same arguments plus approval_id.)","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"anyOf":[{"type":"string","minLength":3,"maxLength":4000},{"maxItems":50,"type":"array","items":{"type":"string","minLength":3,"maxLength":254}}],"description":"One recipient, a comma-separated list, or an array. Maximum 50. Bulk sends need approval."},"subject":{"type":"string","minLength":1,"maxLength":200},"text":{"type":"string","maxLength":100000},"html":{"type":"string","maxLength":200000},"purpose":{"default":"transactional","type":"string","enum":["transactional","follow_up","receipt","service_notice"],"description":"The transactional purpose. Marketing and promotional campaigns are not supported."},"from":{"description":"Optional sender on a domain already set up in this workspace.","type":"string","maxLength":254},"reply_to":{"type":"string","maxLength":254},"physical_address":{"description":"Required for bulk email: the workspace business postal address.","type":"string","maxLength":300},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["to","subject"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"send","x-keystone-module":"outreach","x-keystone-needs-approval":true}},"/v1/tools/email_status":{"post":{"operationId":"email_status","summary":"Email status","description":"Read built-in email status for this workspace: sender domain, DNS state, recent sends, failures, wallet charges, rate limits and the suppression count. Also mirrors provider bounce and complaint suppressions into Keystone when the management token allows it.","tags":["Follow-ups and campaigns"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/email_marketing_domain_setup":{"post":{"operationId":"email_marketing_domain_setup","summary":"Email marketing domain setup","description":"Set up customer-domain SPF, DKIM and DMARC for marketing email campaigns using automated DNS editing in Keystone (Keystone DNS, a connected customer DNS account, GoDaddy or API Anything). Shows every planned DNS change in the approval before applying it and stores undo data. Never requires manual DNS copy-paste when DNS access is connected. (Ends access or deletes data, so a person must approve it first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. approved: true in the input never counts as approval.)","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","minLength":4,"maxLength":253,"description":"Apex or subdomain to send campaigns from, such as harborpointdental.com."},"sender_local_part":{"default":"hello","description":"The address part before @, default hello.","type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}$"},"sender_name":{"description":"Optional sender display name, such as Harbor Point Dental.","type":"string","minLength":1,"maxLength":80},"dry_run":{"default":false,"description":"true to preview the exact DNS diff without changing records.","type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["domain"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"destructive","x-keystone-module":"outreach","x-keystone-needs-approval":true}},"/v1/tools/email_template_save":{"post":{"operationId":"email_template_save","summary":"Email template save","description":"Create or update a reusable marketing email template in this workspace. Supports merge tags {{first_name}}, {{last_name}}, {{full_name}}, {{email}} and {{business_name}}.","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"template_id":{"description":"Pass an existing template id to update it.","type":"string","pattern":"^emt_[a-f0-9]{24}$"},"name":{"type":"string","minLength":1,"maxLength":120},"category":{"default":"newsletter","type":"string","enum":["newsletter","promotion","announcement","reactivation","other"]},"subject":{"type":"string","minLength":1,"maxLength":200},"preheader":{"type":"string","maxLength":200},"html":{"type":"string","maxLength":200000},"text":{"type":"string","maxLength":100000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["name","subject"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/email_template_list":{"post":{"operationId":"email_template_list","summary":"Email template list","description":"List saved marketing email templates in this workspace.","tags":["Follow-ups and campaigns"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"default":50,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/email_campaign_create":{"post":{"operationId":"email_campaign_create","summary":"Email campaign create","description":"Create a draft marketing email campaign targeting a contact segment (segment_id), a CRM tag (tag) or an explicit recipient list. Optionally starts from a saved template_id. Requires the business physical postal address for CAN-SPAM compliance. Nothing sends until email_campaign_send is approved by the owner.","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":140},"template_id":{"description":"Optional saved template id.","type":"string","pattern":"^emt_[a-f0-9]{24}$"},"subject":{"description":"Required unless template_id provides it.","type":"string","minLength":1,"maxLength":200},"preheader":{"type":"string","maxLength":200},"html":{"type":"string","maxLength":200000},"text":{"type":"string","maxLength":100000},"from":{"description":"Sender email on a marketing domain set up in this workspace.","type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"from_name":{"type":"string","minLength":1,"maxLength":80},"reply_to":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"physical_address":{"type":"string","minLength":10,"maxLength":300,"description":"Required business physical postal address shown in the CAN-SPAM footer."},"segment_id":{"description":"Keystone audience/segment id (aud_...) to target.","type":"string","minLength":1,"maxLength":80},"tag":{"description":"Workspace CRM contact tag to target.","type":"string","minLength":1,"maxLength":80},"recipients":{"description":"Optional explicit recipient list when not targeting a segment_id or tag.","minItems":1,"maxItems":5000,"type":"array","items":{"anyOf":[{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"first_name":{"type":"string","maxLength":100},"last_name":{"type":"string","maxLength":100},"crm_contact_id":{"type":"string","maxLength":80}},"required":["email"]}]}},"exclude_converted":{"default":false,"description":"For segments, skip contacts already marked converted.","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["name","physical_address"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/email_campaign_send":{"post":{"operationId":"email_campaign_send","summary":"Email campaign send","description":"Send a drafted marketing email campaign to its target segment or tag. Always stops for owner approval showing the exact email subject, body, physical address footer, audience count and estimated wallet cost. Filters the shared suppression list, adds RFC 8058 one-click unsubscribe headers and open/click tracking, and bills one wallet line under email_marketing. (Sends an external message; confirm with the user first. If the workspace requires approval for sends, the result has status needs_approval: share the approve_url, then call again with the same arguments plus approval_id.)","tags":["Follow-ups and campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","pattern":"^emc_[a-f0-9]{24}$","description":"Draft campaign id returned by email_campaign_create."},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["campaign_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"send","x-keystone-module":"outreach","x-keystone-needs-approval":true}},"/v1/tools/email_campaign_report":{"post":{"operationId":"email_campaign_report","summary":"Email campaign report","description":"Read marketing email campaign metrics for this workspace: sent, delivered, unique opens, open rate, unique clicks, click rate, top clicked links, bounces, complaints, unsubscribes, shared suppressions and single-line wallet charges.","tags":["Follow-ups and campaigns"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"description":"Pass a campaign_id for one campaign report, or omit for a workspace summary.","type":"string","pattern":"^emc_[a-f0-9]{24}$"},"limit":{"default":20,"type":"integer","minimum":1,"maximum":50},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"outreach","x-keystone-needs-approval":false}},"/v1/tools/neighbor_campaign_settings":{"post":{"operationId":"neighbor_campaign_settings","summary":"Neighbor campaign settings","description":"Read or change the workspace settings for finished-job postcards. Oppizi is the default. Set targeted for a Current Resident mailing list.","tags":["Content and job photos"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"type":"object","properties":{"enabled":{"default":false,"type":"boolean"},"mode":{"default":"eddm","type":"string","enum":["eddm","targeted"]},"route_count":{"default":1,"type":"integer","minimum":1,"maximum":20},"home_count":{"default":20,"type":"integer","minimum":1,"maximum":100},"radius_m":{"default":1000,"type":"integer","minimum":1,"maximum":5000},"budget_usd":{"type":"number","exclusiveMinimum":0,"maximum":100000},"offer":{"type":"string","minLength":1,"maxLength":220},"form":{"description":"The workspace form ID or slug.","type":"string","minLength":1,"maxLength":100},"destination_url":{"description":"The page URL where the workspace form is embedded.","type":"string","format":"uri"},"source_app":{"description":"Poll only this connected field-service app.","type":"string","minLength":1,"maxLength":80}}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"content","x-keystone-needs-approval":false}},"/v1/tools/neighbor_campaign_draft":{"post":{"operationId":"neighbor_campaign_draft","summary":"Neighbor campaign draft","description":"Draft a postcard for a finished job. To prepare an Oppizi mailing, upload the artwork in Oppizi and pass campaign_id, design_id and mail_date. Approve the finished mailing in the content queue.","tags":["Content and job photos"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"string","minLength":1,"maxLength":200},"source_app":{"description":"Poll only this connected field-service app.","type":"string","minLength":1,"maxLength":80},"campaign_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"design_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"mail_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"content","x-keystone-needs-approval":false}},"/v1/tools/neighbor_campaign_queue":{"post":{"operationId":"neighbor_campaign_queue","summary":"Neighbor campaign queue","description":"List the workspace’s neighbor postcard drafts and open the content queue to review and approve exact mailing details.","tags":["Content and job photos"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"default":25,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"content","x-keystone-needs-approval":false}},"/v1/tools/neighbor_campaign_results":{"post":{"operationId":"neighbor_campaign_results","summary":"Neighbor campaign results","description":"Count workspace form submissions attributed to a campaign’s postcard link.","tags":["Content and job photos"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["campaign_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"content","x-keystone-needs-approval":false}},"/v1/tools/buyer_phrases":{"post":{"operationId":"buyer_phrases","summary":"Buyer phrases","description":"Mine the last 90 days of calls, reviews, form messages, Google Ads search terms and Search Console queries in this workspace, then return the stored buyer phrase bank with counts and examples. Set refresh to false to read the existing bank without collecting again.","tags":["Content and job photos"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"refresh":{"default":true,"description":"Collect fresh source text and rebuild the phrase bank before returning it.","type":"boolean"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"content","x-keystone-needs-approval":false}},"/v1/tools/ads_from_phrases":{"post":{"operationId":"ads_from_phrases","summary":"Ads from phrases","description":"Draft Google responsive search ad copy and Meta ad copy from the workspace buyer phrase bank. Every headline, description and primary text shows the buyer phrase it came from. Drafts wait in the content approval queue, apply only through paused ad write tools, and never enable spend.","tags":["Content and job photos"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"platform":{"default":"both","type":"string","enum":["google","meta","both"]},"refresh":{"default":false,"description":"Rebuild the phrase bank before drafting.","type":"boolean"},"service":{"description":"Service name to use when the phrase bank needs a service frame.","type":"string","minLength":1,"maxLength":120},"landing_url":{"description":"Landing URL to carry into the Google ad application payload.","type":"string","maxLength":2048,"format":"uri"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"content","x-keystone-needs-approval":false}},"/v1/tools/ads_phrase_report":{"post":{"operationId":"ads_phrase_report","summary":"Ads phrase report","description":"Compare the buyer phrase bank with copy currently present in Google and Meta ads, then report which customer phrases are missing and which are already covered. Read only.","tags":["Content and job photos"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customer_id":{"description":"Bound Google Ads customer ID. Omit to check every bound customer.","type":"string","pattern":"^(?:\\d{10}|\\d{3}-\\d{3}-\\d{4})$"},"include_meta":{"default":true,"type":"boolean"},"refresh":{"default":false,"description":"Rebuild the phrase bank before comparing.","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"content","x-keystone-needs-approval":false}},"/v1/tools/content_draft_list":{"post":{"operationId":"content_draft_list","summary":"Content draft list","description":"List the content drafts waiting for approval in this workspace, with the kind, the title, the status, any schedule and the changes a person asked for (read the draft, make those changes, then tell the person). Storm campaigns land here too, as a landing page and a Google Ads campaign plan. A draft is never published until a person approves it.","tags":["Content and job photos"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["pending","approved","published","rejected"]},"limit":{"default":25,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"content","x-keystone-needs-approval":false}},"/v1/tools/content_drafts":{"post":{"operationId":"content_drafts","summary":"Content drafts","description":"Compatibility alias for content_draft_list. List the content drafts waiting for approval in this workspace, with the kind, the title, the status, any schedule and the changes a person asked for (read the draft, make those changes, then tell the person). Storm campaigns land here too, as a landing page and a Google Ads campaign plan. A draft is never published until a person approves it.","tags":["Content and job photos"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["pending","approved","published","rejected"]},"limit":{"default":25,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"content","x-keystone-needs-approval":false}},"/v1/tools/content_draft_get":{"post":{"operationId":"content_draft_get","summary":"Content draft get","description":"Read one saved content draft without approving or publishing it, with its title, meta description and body.","tags":["Content and job photos"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"content","x-keystone-needs-approval":false}},"/v1/tools/content_draft":{"post":{"operationId":"content_draft","summary":"Content draft","description":"Compatibility alias for content_draft_get. Read one saved content draft without approving or publishing it, with its title, meta description and body.","tags":["Content and job photos"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"content","x-keystone-needs-approval":false}},"/v1/tools/content_approve":{"post":{"operationId":"content_approve","summary":"Content approve","description":"Approve a content draft so it can be published. Read the draft first and tell the person what it says.","tags":["Content and job photos"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"content","x-keystone-needs-approval":false}},"/v1/tools/content_reject":{"post":{"operationId":"content_reject","summary":"Content reject","description":"Reject a content draft. It stays in the list with the rejected status.","tags":["Content and job photos"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"content","x-keystone-needs-approval":false}},"/v1/tools/content_publish":{"post":{"operationId":"content_publish","summary":"Content publish","description":"Publish an approved content draft. Pages go to the workspace content site and Business Profile posts go to the bound location. An approved Google Ads campaign plan comes back ready for ads_campaign_launch, which builds it paused; it spends nothing until someone enables it. A draft that nobody approved cannot be published. (Sends an external message; confirm with the user first. If the workspace requires approval for sends, the result has status needs_approval: share the approve_url, then call again with the same arguments plus approval_id.)","tags":["Content and job photos"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"send","x-keystone-module":"content","x-keystone-needs-approval":true}},"/v1/tools/content_schedule":{"post":{"operationId":"content_schedule","summary":"Content schedule","description":"Read or change the weekly content plan for this workspace: which kinds of content run, the services and city the copy uses, the topics, and how many drafts each week.","tags":["Content and job photos"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"description":"The kind of content to change. Leave empty to read the whole plan.","type":"string","enum":["service_area_page","blog_post","business_profile_post"]},"enabled":{"description":"Turn a kind of content on or off.","type":"boolean"},"settings":{"type":"object","properties":{"services":{"description":"The services the business sells.","maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"city":{"description":"The main city and area served.","type":"string","maxLength":120},"topics":{"description":"Topics to write about. When empty the engine picks from the tracked keywords.","maxItems":12,"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":200},"keyword":{"type":"string","maxLength":160},"city":{"type":"string","maxLength":120},"notes":{"type":"string","maxLength":600}},"required":["title"]}},"facts":{"description":"Facts the copy may use.","maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":400}},"voice":{"description":"How the business wants to sound.","type":"string","maxLength":600},"per_week":{"description":"How many drafts of this kind to write each week.","type":"integer","minimum":1,"maximum":3}}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"content","x-keystone-needs-approval":false}},"/v1/tools/content_draft_create":{"post":{"operationId":"content_draft_create","summary":"Content draft create","description":"Create and save one unpublished draft now for a kind of content and put it in the approval queue. The weekly schedule does not change.","tags":["Content and job photos"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["service_area_page","blog_post","business_profile_post"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["kind"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"content","x-keystone-needs-approval":false}},"/v1/tools/content_draft_now":{"post":{"operationId":"content_draft_now","summary":"Content draft now","description":"Compatibility alias for content_draft_create. Create and save one unpublished draft now for a kind of content and put it in the approval queue. The weekly schedule does not change.","tags":["Content and job photos"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["service_area_page","blog_post","business_profile_post"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["kind"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"content","x-keystone-needs-approval":false}},"/v1/tools/job_photos_recent":{"post":{"operationId":"job_photos_recent","summary":"Job photos recent","description":"List the finished jobs in this workspace that Keystone has photos for. Each entry shows the before and after photo it picked, what the vision model saw, and how many drafts are waiting for approval.","tags":["Content and job photos"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"default":10,"description":"How many jobs to list.","type":"integer","minimum":1,"maximum":25},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"content","x-keystone-needs-approval":false}},"/v1/tools/job_content_draft":{"post":{"operationId":"job_content_draft","summary":"Job content draft","description":"Write the content for one finished job: a Business Profile post, a project page with the photos, a social caption and a short vertical video plan. Every draft waits in the approval queue. Nothing is published until a person approves it.","tags":["Content and job photos"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"string","minLength":3,"maxLength":160,"description":"The job reference from job_photos_recent, such as companycam:abc123, or a job id."},"channel":{"description":"Write one kind of draft. Leave empty to write every kind the workspace asked for.","type":"string","enum":["business_profile_post","project_page","social_caption","video_plan"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["job"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"content","x-keystone-needs-approval":false}},"/v1/tools/job_content_settings":{"post":{"operationId":"job_content_settings","summary":"Job content settings","description":"Read or change the job photo settings for this workspace: whether Keystone writes drafts on its own for finished jobs, and which kinds of content it writes.","tags":["Content and job photos"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"auto_draft":{"description":"Turn automatic drafting on or off.","type":"boolean"},"channels":{"description":"The kinds of content Keystone writes for each job.","maxItems":4,"type":"array","items":{"type":"string","enum":["business_profile_post","project_page","social_caption","video_plan"]}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"content","x-keystone-needs-approval":false}},"/v1/tools/video_edit":{"post":{"operationId":"video_edit","summary":"Video edit","description":"Edit a short social video for TikTok, Instagram Reels, YouTube Shorts, and LinkedIn from the business's raw clips, photos, cleared job pictures, B-roll, or a prompt. Adds frame-0 hooks, word-timed captions, cleared licensed music, brand colors, workspace logo, platform resizing, and a thumbnail. Routes automatically between the fast cloud renderer and Keystone Computer for heavy multi-clip renders. Call with preview true first to see the edit plan, renderer choice, music license, and wallet cost before spending; call with preview false to start rendering from the wallet. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["Content and job photos"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":4,"maxLength":1200,"description":"What the video should show and say."},"preview":{"default":false,"description":"True shows the edit plan, chosen renderer, music license, and exact wallet estimate without charging or rendering.","type":"boolean"},"title":{"type":"string","minLength":2,"maxLength":90},"hook":{"description":"Opening line on frame 0 so viewers stop scrolling.","type":"string","minLength":2,"maxLength":72},"cta":{"description":"Closing call to action.","type":"string","minLength":2,"maxLength":64},"platforms":{"description":"Target platforms: tiktok, instagram_reels, youtube_shorts, linkedin.","minItems":1,"maxItems":4,"type":"array","items":{"type":"string","enum":["tiktok","instagram_reels","youtube_shorts","linkedin"]}},"aspect_overrides":{"description":"Override default aspect ratio per platform (for example linkedin as 1:1 or 16:9).","type":"object","propertyNames":{"type":"string","enum":["tiktok","instagram_reels","youtube_shorts","linkedin"]},"additionalProperties":{"type":"string","enum":["9:16","4:5","1:1","16:9"]},"required":["tiktok","instagram_reels","youtube_shorts","linkedin"]},"clips":{"description":"Raw video clips stored in this workspace.","maxItems":8,"type":"array","items":{"type":"object","properties":{"asset_key":{"type":"string","minLength":3,"maxLength":300},"label":{"type":"string","maxLength":80},"bytes":{"type":"integer","minimum":1,"maximum":2000000000},"width":{"type":"integer","minimum":120,"maximum":7680},"height":{"type":"integer","minimum":120,"maximum":7680},"duration_seconds":{"type":"number","minimum":1,"maximum":600},"codec":{"type":"string","maxLength":40},"trim_start":{"type":"number","minimum":0,"maximum":600},"trim_end":{"type":"number","minimum":0,"maximum":600},"has_speech":{"type":"boolean"}},"required":["asset_key"]}},"photos":{"description":"Photos stored in this workspace.","maxItems":10,"type":"array","items":{"type":"object","properties":{"asset_key":{"type":"string","minLength":3,"maxLength":300},"label":{"type":"string","maxLength":80}},"required":["asset_key"]}},"broll":{"description":"B-roll photos or clips stored in this workspace.","maxItems":8,"type":"array","items":{"type":"object","properties":{"asset_key":{"type":"string","minLength":3,"maxLength":300},"label":{"type":"string","maxLength":80},"duration_seconds":{"type":"number","minimum":1,"maximum":30}},"required":["asset_key"]}},"job_set_id":{"description":"Include cleared photos from a saved job photo set (restricted photos with faces, plates, or house numbers are held back).","type":"string","minLength":3,"maxLength":80},"music_mood":{"description":"Cleared background music mood: upbeat, warm, modern, calm, acoustic, editorial.","type":"string","enum":["upbeat","warm","modern","calm","acoustic","editorial"]},"music_track_id":{"description":"Specific track id from Keystone cleared music library.","type":"string","maxLength":60},"voice":{"description":"Narration voice name, or null for captions and music only.","anyOf":[{"type":"string","enum":["thalia","apollo","helena","arcas"]},{"type":"null"}]},"brand_color":{"description":"Primary brand hex color such as #1d4ed8.","type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"brand_secondary":{"description":"Background brand hex color such as #1c1917.","type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"caption_style":{"type":"string","enum":["bold_highlight","clean_pill","minimal_bottom"]},"renderer":{"default":"auto","description":"auto routes short edits to the fast cloud renderer and heavy multi-clip edits to Keystone Computer.","type":"string","enum":["auto","browser","computer"]},"target_seconds":{"type":"number","minimum":10,"maximum":180},"beats":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"headline":{"type":"string","minLength":2,"maxLength":72},"spoken":{"type":"string","minLength":2,"maxLength":220},"seconds":{"type":"number","minimum":2,"maximum":15},"asset_index":{"anyOf":[{"type":"integer","minimum":0,"maximum":11},{"type":"null"}]}},"required":["headline","spoken"]}},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["prompt"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"content","x-keystone-needs-approval":true}},"/v1/tools/video_status":{"post":{"operationId":"video_status","summary":"Video status","description":"Check the render status of a social video (or list recent social videos in this workspace): returns platform video links, aspect ratios, thumbnail link, timed captions, licensed music record, wallet cost, and any drafted or scheduled social posts.","tags":["Content and job photos"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"video_id":{"description":"Specific video id from video_edit. Omit to list recent videos for this business.","type":"string","minLength":3,"maxLength":60},"limit":{"default":10,"type":"integer","minimum":1,"maximum":30},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"content","x-keystone-needs-approval":false}},"/v1/tools/social_post_draft":{"post":{"operationId":"social_post_draft","summary":"Social post draft","description":"Draft or edit platform-specific social posts (TikTok, Instagram Reels, YouTube Shorts, LinkedIn) for a social video. Checks whether each social account is connected in this workspace and returns a one-click sign-in link for any missing account (no manual setup). Never publishes on its own.","tags":["Content and job photos"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"video_id":{"type":"string","minLength":3,"maxLength":60,"description":"Video id from video_edit or video_status."},"post_id":{"description":"Pass an existing draft post id to update its caption, title, or hashtags.","type":"string","minLength":3,"maxLength":60},"platforms":{"description":"Platforms to draft for. Defaults to the platforms the video was edited for.","minItems":1,"maxItems":4,"type":"array","items":{"type":"string","enum":["tiktok","instagram_reels","youtube_shorts","linkedin"]}},"caption":{"description":"Custom post caption. Leave out to draft from the video hook and script.","type":"string","minLength":2,"maxLength":3000},"title":{"description":"Title for YouTube Shorts or LinkedIn.","type":"string","minLength":2,"maxLength":120},"hashtags":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"first_comment":{"description":"Link or note to place as the first comment.","type":"string","maxLength":400},"timezone":{"description":"IANA time zone such as America/New_York.","type":"string","minLength":3,"maxLength":60},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["video_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"content","x-keystone-needs-approval":false}},"/v1/tools/social_post_schedule":{"post":{"operationId":"social_post_schedule","summary":"Social post schedule","description":"Owner-approved scheduling and publishing for social video drafts through the business's own connected social accounts, plus recurring weekly scheduling via Loops. action schedule queues a drafted post for publish_at (or posts right away when publish_at is omitted or \"now\"); action cancel cancels a scheduled post; action loop turns the workspace's weekly social video Loop on or off. Never posts without owner approval or an active connected social account. (Sends an external message; confirm with the user first. If the workspace requires approval for sends, the result has status needs_approval: share the approve_url, then call again with the same arguments plus approval_id.)","tags":["Content and job photos"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"default":"schedule","type":"string","enum":["schedule","cancel","loop"]},"post_id":{"description":"Draft post id from social_post_draft (required for schedule and cancel).","type":"string","minLength":3,"maxLength":60},"publish_at":{"description":"ISO date-time such as 2026-12-01T15:00:00Z, or \"now\" to publish immediately.","type":"string","maxLength":40},"timezone":{"type":"string","minLength":3,"maxLength":60},"loop_enabled":{"description":"Required when action is loop: true enables the weekly social video drafting Loop, false turns it off.","type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"send","x-keystone-module":"content","x-keystone-needs-approval":true}},"/v1/tools/redshift_nebula_image":{"post":{"operationId":"redshift_nebula_image","summary":"Redshift nebula image","description":"Generate or edit images for this workspace with Redshift Nebula (logos, flyers, product shots, hero visuals and social graphics). Saves every image in this workspace storage and bills the wallet per image. Requires Redshift to be turned on. Refuses real-person likeness and logo impersonation requests.","tags":["Content and job photos"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":3,"maxLength":4000,"description":"Visual description of the image to generate, or the edit to apply to source_image_id."},"action":{"default":"generate","description":"Use generate for a new image, or edit with source_image_id to modify an existing image in this workspace.","type":"string","enum":["generate","edit"]},"source_image_id":{"description":"Existing Nebula image id from this workspace to edit. Required when action is edit.","type":"string","minLength":4,"maxLength":80},"size":{"default":"1024x1024","description":"Output size: 1024x1024 (square), 1536x1024 (landscape), or 1024x1536 (portrait).","type":"string","enum":["1024x1024","1536x1024","1024x1536"]},"n":{"default":1,"description":"Number of images to create, from 1 to 4.","type":"integer","minimum":1,"maximum":4},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["prompt"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"content","x-keystone-needs-approval":false}},"/v1/tools/team_my_access":{"post":{"operationId":"team_my_access","summary":"Team my access","description":"Shows your role and permissions in the current workspace: which apps and Keystone modules you may read, write, upload to, send from or spend in, and whether you may approve.","tags":["Team and permissions"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"team","x-keystone-needs-approval":false}},"/v1/tools/team_list":{"post":{"operationId":"team_list","summary":"Team list","description":"Lists the people who can use the current workspace, their roles and permissions, pending invites, and the seat count and monthly cost. For owners, admins and client admins who run this workspace team.","tags":["Team and permissions"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"team","x-keystone-needs-approval":false}},"/v1/tools/team_invite":{"post":{"operationId":"team_invite","summary":"Team invite","description":"Invites a person by email to the current workspace (or, with whole_account, to every workspace, for agency staff) with a role and a permission profile. Each workspace includes 3 users; an extra user adds $10 a month, so the call fails until confirm_extra_user is true. Returns the invite link; the email is sent too when email is set up.","tags":["Team and permissions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"description":"Their email address. They sign in with it."},"role":{"default":"member","description":"admin: everything in the workspace, approves, runs the team. member: uses the permission profile.","type":"string","enum":["admin","member"]},"preset":{"description":"manager: Reads, writes, uploads and sends in every app and module. Cannot spend or approve. staff: Reads every app and module. Changes nothing. custom: You choose per app and per module.","type":"string","enum":["manager","staff","custom"]},"permissions":{"type":"object","properties":{"apps":{"description":"Per app slug (or \"*\" for every other app): the capabilities allowed. An empty list means none.","type":"object","propertyNames":{"type":"string","maxLength":80},"additionalProperties":{"maxItems":5,"type":"array","items":{"type":"string","enum":["read","write","upload","send","money"]}}},"modules":{"description":"Per Keystone module (phone, sites, ads, wallet, anything, reviews, outreach, content, reports, memory, notebook, agency, workspace, collab, computer, or \"*\"): the capabilities allowed.","type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"maxItems":5,"type":"array","items":{"type":"string","enum":["read","write","upload","send","money"]}}},"approve":{"description":"May approve queued sends and spending.","type":"boolean"}}},"whole_account":{"default":false,"description":"Give access to every workspace in the account (agency staff). Owners and admins only.","type":"boolean"},"confirm_extra_user":{"default":false,"description":"Set true after the person agrees to the $10 a month for a user beyond the 3 included.","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["email"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"team","x-keystone-needs-approval":false}},"/v1/tools/team_update_member":{"post":{"operationId":"team_update_member","summary":"Team update member","description":"Changes one person's role or permission profile in the current workspace, or account-wide with whole_account. Get user_id from team_list.","tags":["Team and permissions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"string","minLength":1,"maxLength":64},"role":{"type":"string","enum":["admin","member"]},"preset":{"description":"manager: Reads, writes, uploads and sends in every app and module. Cannot spend or approve. staff: Reads every app and module. Changes nothing. custom: You choose per app and per module.","type":"string","enum":["manager","staff","custom"]},"permissions":{"type":"object","properties":{"apps":{"description":"Per app slug (or \"*\" for every other app): the capabilities allowed. An empty list means none.","type":"object","propertyNames":{"type":"string","maxLength":80},"additionalProperties":{"maxItems":5,"type":"array","items":{"type":"string","enum":["read","write","upload","send","money"]}}},"modules":{"description":"Per Keystone module (phone, sites, ads, wallet, anything, reviews, outreach, content, reports, memory, notebook, agency, workspace, collab, computer, or \"*\"): the capabilities allowed.","type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"maxItems":5,"type":"array","items":{"type":"string","enum":["read","write","upload","send","money"]}}},"approve":{"description":"May approve queued sends and spending.","type":"boolean"}}},"whole_account":{"default":false,"description":"Change their account-wide access instead of this workspace's.","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["user_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"team","x-keystone-needs-approval":false}},"/v1/tools/team_remove_member":{"post":{"operationId":"team_remove_member","summary":"Team remove member","description":"Removes one person from the current workspace (or the whole account with whole_account) and stops their tokens when they have no access left. The monthly seat count drops with them.","tags":["Team and permissions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"string","minLength":1,"maxLength":64},"whole_account":{"default":false,"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["user_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"destructive","x-keystone-module":"team","x-keystone-needs-approval":false}},"/v1/tools/team_seats":{"post":{"operationId":"team_seats","summary":"Team seats","description":"Seat count and monthly cost for every workspace in the account: users, pending invites, the 3 included, extra users at $10 a month. Owners and admins only.","tags":["Team and permissions"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"team","x-keystone-needs-approval":false}},"/v1/tools/workspace_checkin":{"post":{"operationId":"workspace_checkin","summary":"Workspace checkin","description":"Check in to the current workspace when you start work, about every 30 minutes on long jobs, and when you finish (task \"done\"). Records your lane and task, then returns what changed since your last check-in: mail waiting for you with wake hints, new feed posts, open questions and blockers, who else is active (AI sessions and people) and open claims. Use it whenever more than one AI or person may be working on this business.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lane":{"type":"string","minLength":1,"maxLength":60,"description":"The job this session is doing, like \"ads\", \"seo\" or \"website\". Keep it the same for the whole job."},"task":{"type":"string","minLength":2,"maxLength":300,"description":"One line: what you are doing now, or \"done\"."},"client":{"description":"Your AI app, like \"Claude Code\" or \"ChatGPT\". Keystone fills it in when your app says.","type":"string","maxLength":60},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["lane","task"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/workspace_who":{"post":{"operationId":"workspace_who","summary":"Workspace who","description":"Who is working in the current workspace right now: AI sessions and people seen in the last 60 minutes (with lane, task and AI app) and every open claim with when it ends. Use the lane_id or lane name to send mail.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"minutes":{"description":"How far back counts as active. Default 60.","type":"integer","minimum":5,"maximum":1440},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/work_claim":{"post":{"operationId":"work_claim","summary":"Work claim","description":"Claim a task or target before you start it so other sessions leave it alone, like \"Google Ads spring offer\", \"website/home page\" or \"Google Business Profile\". Targets nest with \"/\": \"website\" covers \"website/home page\", and \"*\" covers the whole workspace. Returns ok true with the claim id, or ok false with who holds an overlapping claim and when it ends; you then join the wait list and get a handoff message when they release it, so pick other work or ask them with agent_mail_send. Claiming again renews your own claim. Claims end after 60 minutes unless you set minutes (5 to 480).","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"type":"string","minLength":1,"maxLength":200,"description":"What you are taking on."},"note":{"description":"One line on what you will do.","type":"string","maxLength":300},"minutes":{"type":"integer","minimum":5,"maximum":480},"wait":{"default":true,"description":"When someone else holds it, join the wait list for a handoff message. Default true.","type":"boolean"},"lane":{"description":"Your lane: the job this session is doing, the same on every call, like \"ads\", \"seo\" or \"reviews\". Omit to use the lane you last checked in with.","type":"string","minLength":1,"maxLength":60},"client":{"description":"Your AI app, like \"Claude Code\" or \"ChatGPT\". Keystone fills it in when your app says.","type":"string","maxLength":60},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["target"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/work_release":{"post":{"operationId":"work_release","summary":"Work release","description":"Release your claim when you finish or stop (by claim id, or by target). Sessions waiting for it get a handoff message with your note. Say what is done and what is left.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"The claim id from work_claim.","type":"string","maxLength":40},"target":{"description":"Or the target you claimed.","type":"string","maxLength":200},"note":{"description":"What is done, what is left, and where.","type":"string","maxLength":1000},"lane":{"description":"Your lane: the job this session is doing, the same on every call, like \"ads\", \"seo\" or \"reviews\". Omit to use the lane you last checked in with.","type":"string","minLength":1,"maxLength":60},"client":{"description":"Your AI app, like \"Claude Code\" or \"ChatGPT\". Keystone fills it in when your app says.","type":"string","maxLength":60},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/agent_mail_send":{"post":{"operationId":"agent_mail_send","summary":"Agent mail send","description":"Send a direct message to another AI lane or a person in the current workspace: a question, a review request, a handoff, a reply or a note. to: a lane_id or lane name from workspace_who, or a teammate's email. wake_hint is one line telling the recipient's next session what to do first. Reuse request_id when you retry so the message is not sent twice.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","minLength":1,"maxLength":160},"kind":{"default":"note","type":"string","enum":["question","review","handoff","reply","note"]},"subject":{"type":"string","maxLength":140},"body":{"type":"string","minLength":1,"maxLength":4000},"wake_hint":{"type":"string","maxLength":300},"reply_to":{"description":"Message id you are answering.","type":"string","maxLength":40},"request_id":{"type":"string","minLength":1,"maxLength":80},"lane":{"description":"Your lane: the job this session is doing, the same on every call, like \"ads\", \"seo\" or \"reviews\". Omit to use the lane you last checked in with.","type":"string","minLength":1,"maxLength":60},"client":{"description":"Your AI app, like \"Claude Code\" or \"ChatGPT\". Keystone fills it in when your app says.","type":"string","maxLength":60},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["to","body"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/agent_mail_inbox":{"post":{"operationId":"agent_mail_inbox","summary":"Agent mail inbox","description":"Read messages waiting for your lane in the current workspace, oldest first. personal: true adds messages sent to you as a person. Act on each, then call agent_mail_ack with its id.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"personal":{"default":false,"description":"Also show messages addressed to you as a person.","type":"boolean"},"include_read":{"default":false,"description":"Show recent acknowledged messages too.","type":"boolean"},"lane":{"description":"Your lane: the job this session is doing, the same on every call, like \"ads\", \"seo\" or \"reviews\". Omit to use the lane you last checked in with.","type":"string","minLength":1,"maxLength":60},"client":{"description":"Your AI app, like \"Claude Code\" or \"ChatGPT\". Keystone fills it in when your app says.","type":"string","maxLength":60},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/agent_mail_ack":{"post":{"operationId":"agent_mail_ack","summary":"Agent mail ack","description":"Acknowledge messages you have read, by id, so the sender sees they arrived and your next session does not get them again.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message_ids":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["message_ids"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/project_post":{"post":{"operationId":"project_post","summary":"Project post","description":"Post to the current workspace's project feed, which the team sees in the app and every AI sees on check-in. kind: update (progress), question (needs an answer), blocker (you are stuck), handoff (what is done and what is left), decision (what was chosen and why), done (finished). reply_to answers a post; resolve: true with reply_to marks the question or blocker answered. Keep it short and concrete.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"default":"update","type":"string","enum":["update","question","blocker","handoff","decision","done"]},"title":{"type":"string","maxLength":140},"body":{"type":"string","minLength":1,"maxLength":4000},"reply_to":{"type":"string","maxLength":40},"resolve":{"default":false,"type":"boolean"},"lane":{"description":"Your lane: the job this session is doing, the same on every call, like \"ads\", \"seo\" or \"reviews\". Omit to use the lane you last checked in with.","type":"string","minLength":1,"maxLength":60},"client":{"description":"Your AI app, like \"Claude Code\" or \"ChatGPT\". Keystone fills it in when your app says.","type":"string","maxLength":60},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["body"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/project_feed":{"post":{"operationId":"project_feed","summary":"Project feed","description":"Read the current workspace's project feed, newest first. With post_id: that post and its replies. Filter by kind, open questions and blockers only, or since a time.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"post_id":{"type":"string","maxLength":40},"kind":{"type":"string","enum":["update","question","blocker","handoff","decision","done"]},"open_only":{"default":false,"type":"boolean"},"since":{"description":"ISO time; only posts after it.","type":"string","maxLength":40},"limit":{"default":30,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/handoff_create":{"post":{"operationId":"handoff_create","summary":"Handoff create","description":"Create a portable, privacy-filtered handoff packet for work in this workspace. It can go to a local AI, a Redshift agent or team thread, or a Redshift Computer driver switch. Pass run_id, source_thread_id or mission_id to use Keystone run history, or pass the last session messages yourself. Attach claim_target or claim_id when the work is claimed; accepting the handoff moves that claim.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"default":"local_ai","type":"string","enum":["local_ai","redshift_agent","redshift_team","computer_driver"]},"agent":{"description":"For a Redshift target, the built-in or custom agent key. Default account_manager.","type":"string","minLength":2,"maxLength":80},"driver":{"description":"For a computer driver switch: claude_code, codex, grok or redshift.","type":"string","minLength":2,"maxLength":60},"thread_id":{"description":"For redshift_team or computer_driver, the thread to continue. Use source_thread_id to packetize an Agents v2 thread.","type":"string","maxLength":80},"source_thread_id":{"type":"string","maxLength":80},"run_id":{"type":"string","maxLength":80},"mission_id":{"type":"string","maxLength":80},"title":{"type":"string","minLength":2,"maxLength":100},"goal":{"type":"string","minLength":2,"maxLength":1000},"instructions":{"type":"string","maxLength":2000},"claim_id":{"type":"string","maxLength":80},"claim_target":{"type":"string","minLength":1,"maxLength":200},"files":{"default":[],"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"links":{"default":[],"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"records":{"default":[],"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"memory_ids":{"default":[],"maxItems":8,"type":"array","items":{"type":"string","maxLength":80}},"notebook_refs":{"default":[],"maxItems":8,"type":"array","items":{"type":"string","maxLength":300}},"messages":{"default":[],"maxItems":30,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant","tool"]},"content":{"type":"string","minLength":1,"maxLength":4000},"at":{"type":"string","maxLength":40},"tool":{"type":"string","maxLength":80}},"required":["role","content"]}},"message_limit":{"default":8,"type":"integer","minimum":1,"maximum":12},"expires_minutes":{"default":1440,"type":"integer","minimum":5,"maximum":10080},"lane":{"description":"Your lane, the same as workspace_checkin uses. Omit to use your current lane.","type":"string","minLength":1,"maxLength":60},"client":{"type":"string","maxLength":60},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/handoff_receive":{"post":{"operationId":"handoff_receive","summary":"Handoff receive","description":"Receive an active handoff by id or short code in this workspace. Returns the filtered packet and a ready-to-paste prompt. This does not accept it or move the claim; call handoff_accept before starting the work.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"handoff":{"type":"string","minLength":4,"maxLength":100,"description":"The handoff id or short code, like HO-1A2B3C4D."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["handoff"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/handoff_list":{"post":{"operationId":"handoff_list","summary":"Handoff list","description":"List handoff packets in this workspace, newest first. Packets never cross accounts or workspaces. Filter by status active, accepted, revoked or expired.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["active","accepted","revoked","expired"]},"limit":{"default":30,"type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/handoff_accept":{"post":{"operationId":"handoff_accept","summary":"Handoff accept","description":"Accept an active handoff once. This moves any attached collaboration claim to your lane so two agents do not work the same target. Redshift targets are seeded as Agents v2 runs; computer driver targets return the switch payload for the Redshift Computer app.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"handoff":{"type":"string","minLength":4,"maxLength":100},"lane":{"description":"Your lane, the same as workspace_checkin uses. Omit to use your current lane.","type":"string","minLength":1,"maxLength":60},"agent":{"type":"string","minLength":2,"maxLength":80},"driver":{"type":"string","minLength":2,"maxLength":60},"client":{"type":"string","maxLength":60},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["handoff"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/handoff_revoke":{"post":{"operationId":"handoff_revoke","summary":"Handoff revoke","description":"Revoke an active handoff so it can no longer be received or accepted. The creator or an owner or admin can revoke it. Already accepted handoffs stay closed.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"handoff":{"type":"string","minLength":4,"maxLength":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["handoff"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/redshift_agents":{"post":{"operationId":"redshift_agents","summary":"Redshift agents","description":"The five Redshift business agents for this workspace (Account Manager, Reviews, Ads, Front Desk, Bookkeeper): which are on, their model, Loops and next runs, spend this month against the ceiling, actions waiting for approval and recent runs.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/redshift_agent_set":{"post":{"operationId":"redshift_agent_set","summary":"Redshift agent set","description":"Turn a Redshift agent on or off for this workspace, pick its Redshift model (redshift_agents lists them) or give it standing notes. Turning one on creates its default Loops. Owners and admins only.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"string","enum":["account_manager","reviews","ads","front_desk","bookkeeper"],"description":"One of: account_manager (Agency Account Manager), reviews (Reviews and Reputation), ads (Ads Optimizer), front_desk (Front Desk), bookkeeper (Bookkeeper's Assistant)."},"on":{"type":"boolean"},"model":{"description":"One of the Redshift model ids that redshift_agents lists.","type":"string","maxLength":40},"notes":{"description":"Standing notes the agent reads on every run, like tone or what to leave alone.","type":"string","maxLength":4000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["agent"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/redshift_agent_run":{"post":{"operationId":"redshift_agent_run","summary":"Redshift agent run","description":"Run a Redshift agent now on a task in this workspace and return its output. The run spends a few cents from the wallet (shown in the result); sends and spends it wants wait for approval. Owners and admins only.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"string","enum":["account_manager","reviews","ads","front_desk","bookkeeper"],"description":"One of: account_manager (Agency Account Manager), reviews (Reviews and Reputation), ads (Ads Optimizer), front_desk (Front Desk), bookkeeper (Bookkeeper's Assistant)."},"task":{"type":"string","minLength":3,"maxLength":2000,"description":"What to do, in plain words. Leave the business out; the agent knows it."},"model":{"description":"One of the Redshift model ids that redshift_agents lists.","type":"string","maxLength":40},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["agent","task"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/redshift_runs":{"post":{"operationId":"redshift_runs","summary":"Redshift runs","description":"Recent Redshift agent runs in this workspace with status, cost and summary, or one run in full (pass run_id) with its notebook note path and steps.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"run_id":{"type":"string","maxLength":40},"agent":{"type":"string","enum":["account_manager","reviews","ads","front_desk","bookkeeper"],"description":"One of: account_manager (Agency Account Manager), reviews (Reviews and Reputation), ads (Ads Optimizer), front_desk (Front Desk), bookkeeper (Bookkeeper's Assistant)."},"limit":{"type":"integer","minimum":1,"maximum":50},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/redshift_loop_set":{"post":{"operationId":"redshift_loop_set","summary":"Redshift loop set","description":"Change one Redshift Loop in this workspace: turn it on or off, set its schedule (daily, weekly, monthly or every N minutes, in the business time zone), or its model. Owners and admins only.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"loop_id":{"type":"string","minLength":1,"maxLength":40},"on":{"type":"boolean"},"schedule":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"daily"},"time":{"type":"string","pattern":"^([01]\\d|2[0-3]):([0-5]\\d)$"},"tz":{"type":"string","minLength":1,"maxLength":64},"weekdays_only":{"type":"boolean"}},"required":["kind","time","tz"]},{"type":"object","properties":{"kind":{"type":"string","const":"weekly"},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"time":{"type":"string","pattern":"^([01]\\d|2[0-3]):([0-5]\\d)$"},"tz":{"type":"string","minLength":1,"maxLength":64}},"required":["kind","days","time","tz"]},{"type":"object","properties":{"kind":{"type":"string","const":"monthly"},"day":{"type":"integer","minimum":1,"maximum":28},"time":{"type":"string","pattern":"^([01]\\d|2[0-3]):([0-5]\\d)$"},"tz":{"type":"string","minLength":1,"maxLength":64}},"required":["kind","day","time","tz"]},{"type":"object","properties":{"kind":{"type":"string","const":"every"},"minutes":{"type":"integer","minimum":15,"maximum":1440},"tz":{"type":"string","minLength":1,"maxLength":64},"hours":{"minItems":2,"maxItems":2,"type":"array","items":{"type":"integer","minimum":0,"maximum":24}},"weekdays_only":{"type":"boolean"}},"required":["kind","minutes","tz"]}]},"model":{"description":"One of the Redshift model ids that redshift_agents lists.","type":"string","maxLength":40},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["loop_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/redshift_budget_set":{"post":{"operationId":"redshift_budget_set","summary":"Redshift budget set","description":"Set this workspace's monthly Redshift cap, in dollars. It covers the agents and every other Redshift use in the workspace. When it is reached, runs stop and Loops pause until next month. Owners and admins only.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"monthly_dollars":{"type":"number","minimum":0,"maximum":2000},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["monthly_dollars"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/mission_start":{"post":{"operationId":"mission_start","summary":"Mission start","description":"Start a durable Keystone mission: one big goal, a wallet allowance and a deadline. The first call returns an estimate and does not start anything. Show the estimate to the person, wait for a clear yes, then call again with confirm true. Once started, Keystone plans with Redshift Supernova, runs steps as child Redshift agents, uses approvals for money, contracts, recurring charges and protected sends, and keeps events, proof and receipts until done or stopped.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"goal":{"type":"string","minLength":10,"maxLength":2000,"description":"The real-world goal in plain words."},"budget_dollars":{"type":"number","minimum":3,"maximum":100000,"description":"Maximum total mission allowance in US dollars. Minimum $3 because planning uses Redshift Supernova. The engine treats it as a hard allowance."},"deadline":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","minLength":8,"maxLength":60}],"description":"Deadline as unix milliseconds or an ISO date/time."},"per_item_limit_dollars":{"default":25,"description":"Any single step estimated above this amount waits for owner approval.","type":"number","exclusiveMinimum":0,"maximum":10000},"parallel_limit":{"default":3,"description":"Maximum mission tasks running at once.","type":"integer","minimum":1,"maximum":5},"confirm":{"default":false,"description":"true only after the person saw the estimate and clearly said to start.","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["goal","budget_dollars","deadline"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/mission_status":{"post":{"operationId":"mission_status","summary":"Mission status","description":"Read one mission or list recent missions in this workspace: plan tree, live statuses, proof, questions, approvals, events, spend and receipts. Pass after_event_id to receive only newer events.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"mission_id":{"description":"Omit to list recent missions.","type":"string","minLength":6,"maxLength":80},"event_limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"after_event_id":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/mission_steer":{"post":{"operationId":"mission_steer","summary":"Mission steer","description":"Add owner direction to a running mission, or answer its one clear owner question. The answer is durable and the next scheduler tick replans or resumes affected steps.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mission_id":{"type":"string","minLength":6,"maxLength":80,"description":"Mission id from mission_start or mission_status."},"direction":{"type":"string","minLength":2,"maxLength":1000,"description":"New direction, constraint or answer for the mission."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["mission_id","direction"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/mission_pause":{"post":{"operationId":"mission_pause","summary":"Mission pause","description":"Pause a mission so no new steps start, or resume a paused mission. Running child steps finish their current run.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mission_id":{"type":"string","minLength":6,"maxLength":80,"description":"Mission id from mission_start or mission_status."},"paused":{"default":true,"description":"true pauses, false resumes.","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["mission_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/mission_stop":{"post":{"operationId":"mission_stop","summary":"Mission stop","description":"Kill switch for a mission. It stops new work immediately and records the reason. Running child steps finish their current model step but cannot start again.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mission_id":{"type":"string","minLength":6,"maxLength":80,"description":"Mission id from mission_start or mission_status."},"reason":{"default":"Stopped by the owner.","type":"string","minLength":2,"maxLength":300},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["mission_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/mission_approve":{"post":{"operationId":"mission_approve","summary":"Mission approve","description":"Approve or deny a mission step waiting on the owner. mission_status gives approval_token for the waiting node. Use this only after the person clearly says yes or no to that exact step.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mission_id":{"type":"string","minLength":6,"maxLength":80,"description":"Mission id from mission_start or mission_status."},"approval_token":{"type":"string","pattern":"^apr_[a-f0-9]{24}\\.[a-f0-9]{64}$","description":"The signed token from mission_status for the waiting node."},"decision":{"type":"string","enum":["approve","deny"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["mission_id","approval_token","decision"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/agent_create":{"post":{"operationId":"agent_create","summary":"Agent create","description":"Create a custom specialist agent in this workspace with instructions, allowed tools, a default model and an optional per-run budget. The agent can then be sent work with agent_thread_send or delegated to by other agents.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":80},"instructions":{"type":"string","minLength":10,"maxLength":12000},"tools":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","maxLength":80}},"model":{"default":"hyperdrive","type":"string","maxLength":20},"budget_usd":{"default":0,"type":"number","minimum":0,"maximum":20},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["name","instructions"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/agent_update":{"post":{"operationId":"agent_update","summary":"Agent update","description":"Update, enable or disable a custom specialist agent in this workspace. Pass only the fields to change.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"string","minLength":2,"maxLength":80},"name":{"type":"string","minLength":2,"maxLength":80},"instructions":{"type":"string","minLength":10,"maxLength":12000},"tools":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":80}},"model":{"type":"string","maxLength":20},"budget_usd":{"type":"number","minimum":0,"maximum":20},"enabled":{"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["agent"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/agent_thread_send":{"post":{"operationId":"agent_thread_send","summary":"Agent thread send","description":"Send a goal to a custom or built-in agent and run it now. Pass thread_id to continue a thread. The run is budgeted, resumable, and pauses when approval is needed.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"string","minLength":2,"maxLength":80},"message":{"type":"string","minLength":2,"maxLength":8000},"thread_id":{"type":"string","maxLength":80},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["agent","message"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/agent_thread_read":{"post":{"operationId":"agent_thread_read","summary":"Agent thread read","description":"Read a custom agent thread: its recent runs, status, summaries, held count, cost and notebook links.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"thread_id":{"type":"string","maxLength":80},"limit":{"default":10,"type":"integer","minimum":1,"maximum":50},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["thread_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/agent_run_cancel":{"post":{"operationId":"agent_run_cancel","summary":"Agent run cancel","description":"Cancel a waiting or running agent run in this workspace. Running model steps stop at the next durable checkpoint; waiting approval resumes are closed.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"run_id":{"type":"string","minLength":6,"maxLength":80},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["run_id"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/agent_fleet_deploy":{"post":{"operationId":"agent_fleet_deploy","summary":"Agent fleet deploy","description":"Deploy a custom agent definition to other workspaces in this account. It copies instructions, tools, model and budget without copying threads, runs or workspace data.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"string","minLength":2,"maxLength":80},"workspace_ids":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","minLength":6,"maxLength":80}},"enabled":{"default":true,"type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["agent","workspace_ids"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/agent_list":{"post":{"operationId":"agent_list","summary":"Agent list","description":"List custom specialist agents in this workspace.","tags":["AI check-ins, claims, agent mail and project feed"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"default":100,"type":"integer","minimum":1,"maximum":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"collab","x-keystone-needs-approval":false}},"/v1/tools/redshift_computer_status":{"post":{"operationId":"redshift_computer_status","summary":"Redshift computer status","description":"Shows this workspace's Redshift Computer: awake, asleep, paused or off, this month's awake hours and spend against its limit, and recent snapshots. The computer is a persistent Linux machine for this one business, with files in /workspace. Does not wake it.","tags":["Redshift Computer (terminal, files, commands)"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"computer","x-keystone-needs-approval":false}},"/v1/tools/redshift_computer_run":{"post":{"operationId":"redshift_computer_run","summary":"Redshift computer run","description":"Runs a shell command on this workspace's Redshift Computer (Linux, bash, git, Node, Python) and returns its exit code and output. Wakes the computer when it is asleep; awake time is billed to the wallet. Runs as the AI user in /workspace. Output is capped at 64 KB per stream; the command is stopped at its timeout. Your app tools are reachable from inside at $KEYSTONE_MCP_URL with $KEYSTONE_MCP_TOKEN.","tags":["Redshift Computer (terminal, files, commands)"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"command":{"type":"string","minLength":1,"maxLength":8000,"description":"The command line, run with bash -lc."},"cwd":{"description":"Directory under /workspace. Default /workspace.","type":"string","maxLength":400},"timeout_seconds":{"default":60,"description":"Stop the command after this many seconds (at most 600).","type":"integer","minimum":1,"maximum":600},"stdin":{"description":"Text for standard input.","type":"string","maxLength":65536},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["command"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"computer","x-keystone-needs-approval":false}},"/v1/tools/redshift_computer_files_read":{"post":{"operationId":"redshift_computer_files_read","summary":"Redshift computer files read","description":"Reads a file, or lists a folder, on this workspace's Redshift Computer. Paths are under /workspace. Text comes back as text; binary files as base64. Files over 1 MB are cut at 1 MB.","tags":["Redshift Computer (terminal, files, commands)"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":1024,"description":"Absolute path under /workspace, such as /workspace/report.md or /workspace."},"max_bytes":{"type":"integer","minimum":1,"maximum":1048576},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["path"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"computer","x-keystone-needs-approval":false}},"/v1/tools/redshift_computer_files_write":{"post":{"operationId":"redshift_computer_files_write","summary":"Redshift computer files write","description":"Writes a file on this workspace's Redshift Computer, creating folders as needed. Paths are under /workspace. Replaces an existing file. Up to 5 MB; send binary content as base64.","tags":["Redshift Computer (terminal, files, commands)"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":1024,"description":"Absolute path under /workspace."},"content":{"type":"string","maxLength":7340032},"encoding":{"default":"utf8","type":"string","enum":["utf8","base64"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["path","content"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"computer","x-keystone-needs-approval":false}},"/v1/tools/redshift_computer_snapshot":{"post":{"operationId":"redshift_computer_snapshot","summary":"Redshift computer snapshot","description":"Saves a named copy of /workspace on this workspace's Redshift Computer, encrypted in Redshift storage. An owner or admin can restore it from the computer page. Use before a risky change.","tags":["Redshift Computer (terminal, files, commands)"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"A short label, such as \"before site rebuild\".","type":"string","maxLength":80},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"computer","x-keystone-needs-approval":false}},"/v1/tools/redshift_computer_history":{"post":{"operationId":"redshift_computer_history","summary":"Redshift computer history","description":"Lists this workspace computer's /workspace history snapshots, newest first. Each entry has a snapshot id, time and a one-line summary of files added, changed or removed. Read-only; it does not wake the computer.","tags":["Redshift Computer (terminal, files, commands)"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"default":25,"description":"How many snapshots to return (at most 100).","type":"integer","minimum":1,"maximum":100},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"computer","x-keystone-needs-approval":false}},"/v1/tools/redshift_computer_diff":{"post":{"operationId":"redshift_computer_diff","summary":"Redshift computer diff","description":"Compares two /workspace history snapshots and returns changed files with a bounded text diff. Use snapshot ids from redshift_computer_history. Binary files are marked without dumping bytes. Read-only; it does not wake the computer.","tags":["Redshift Computer (terminal, files, commands)"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from_snapshot":{"type":"string","minLength":7,"maxLength":120,"description":"The older snapshot id, branch or tag."},"to_snapshot":{"type":"string","minLength":7,"maxLength":120,"description":"The newer snapshot id, branch or tag."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["from_snapshot","to_snapshot"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"computer","x-keystone-needs-approval":false}},"/v1/tools/redshift_computer_restore":{"post":{"operationId":"redshift_computer_restore","summary":"Redshift computer restore","description":"Restores this workspace computer's /workspace to a snapshot from redshift_computer_history. This replaces files in /workspace, so a person must approve the exact snapshot first. Current uncommitted work is checkpointed first when possible, and the restore is saved as a new forward history entry. (Ends access or deletes data, so a person must approve it first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. approved: true in the input never counts as approval.)","tags":["Redshift Computer (terminal, files, commands)"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"snapshot":{"type":"string","pattern":"^[a-f0-9]{7,40}$","description":"The snapshot id (commit) from redshift_computer_history."},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["snapshot"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"destructive","x-keystone-module":"computer","x-keystone-needs-approval":true}},"/v1/tools/plan_preview":{"post":{"operationId":"plan_preview","summary":"Plan preview","description":"Preview intended Keystone tool calls before acting. Returns a plain-English summary, risk level, approval need, argument validation, workspace and wallet cost estimate where one is exposed. It never runs the listed tools.","tags":["Core"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"calls":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"The Keystone tool name that would be called."},"arguments":{"description":"The arguments that would be passed to the tool.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["name"]},"description":"The intended tool calls, in the order they would run."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["calls"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"core","x-keystone-needs-approval":false}},"/v1/tools/anything_app_add":{"post":{"operationId":"anything_app_add","summary":"Anything app add","description":"API Anything: add any web app, even one with no API. Keystone gets its own login for the app, handles two-factor codes, learns the app and turns jobs into tools. access \"invite\" (best): Keystone creates the app entry and returns exact steps for the person to add a user for the Keystone email (and Keystone phone number for codes) in that app; Keystone accepts the invite, sets a strong password and signs in by itself. access \"login\": returns a secure page link where the person types an existing login. Never ask for passwords in chat.","tags":["API Anything apps and saved logins"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app":{"type":"string","minLength":1,"maxLength":60,"description":"App name, for example the field-service or back-office app the business uses."},"loginUrl":{"type":"string","minLength":4,"maxLength":500,"description":"The web address of the app's sign-in page."},"access":{"default":"invite","description":"invite: the person adds Keystone as a user. login: the person shares a login on a secure page.","type":"string","enum":["invite","login"]},"extraSites":{"description":"Other web addresses the app itself uses, if its pages live on more than one site.","maxItems":5,"type":"array","items":{"type":"string","maxLength":120}},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["app","loginUrl"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"anything","x-keystone-needs-approval":false}},"/v1/tools/anything_apps":{"post":{"operationId":"anything_apps","summary":"Anything apps","description":"API Anything: lists this workspace's Keystone identity (email and phone for app invites), the apps Keystone signs in to with their status, and the tools learned for each app with their inputs, risk and review status. Never returns passwords, codes or cookies.","tags":["API Anything apps and saved logins"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"anything","x-keystone-needs-approval":false}},"/v1/tools/anything_learn":{"post":{"operationId":"anything_learn","summary":"Anything learn","description":"API Anything: teaches Keystone one or more jobs in an added app, for example \"list today's calls\" or \"create a daily log for a job\". Keystone signs in on a Keystone Computer, explores the app, and records each job as a step-by-step script with checks and a short doc. Each becomes a draft tool that a person reviews before it goes live. Learning runs in the background and takes a few minutes per job; check with anything_apps.","tags":["API Anything apps and saved logins"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app":{"type":"string","minLength":1,"maxLength":80,"description":"App name or id from anything_apps."},"jobs":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":5,"maxLength":300},"description":"Each job in plain words, including what to return or what to fill in."},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["app","jobs"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"anything","x-keystone-needs-approval":false}},"/v1/tools/anything_show":{"post":{"operationId":"anything_show","summary":"Anything show","description":"API Anything, Show it once: the fastest way to teach a job. Returns a link where the person does the task one time in a live Keystone Computer window, already signed in to the app, while Keystone records it. About two minutes later the job is a tool with named inputs (for example add_client_note with name and note) and plain-English steps, waiting for the person to turn it on. Use this instead of anything_learn when the person knows how the task is done, when it depends on how this business uses the app, or when learning alone failed. Pass tool to add another example to a tool that exists: doing it again with different values teaches what changes between runs. Passwords and codes typed during a recording are never recorded and never become inputs. Uses computer time while the window is open.","tags":["API Anything apps and saved logins"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app":{"type":"string","minLength":1,"maxLength":80,"description":"App name or id from anything_apps."},"goal":{"description":"What the person will show, in a few words, for example \"Add a note to a client\".","type":"string","minLength":4,"maxLength":120},"tool":{"description":"An existing tool name, to teach it another example.","type":"string","minLength":1,"maxLength":80},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["app"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"anything","x-keystone-needs-approval":false}},"/v1/tools/anything_tool_review":{"post":{"operationId":"anything_tool_review","summary":"Anything tool review","description":"API Anything: shows a learned tool for review (what it does, inputs, risk, each step and any proposed fix), or rejects a draft or a fix. Approving and turning a tool on happens only on the API Anything page, by a person.","tags":["API Anything apps and saved logins"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","minLength":1,"maxLength":80,"description":"Tool name from anything_apps."},"action":{"default":"show","type":"string","enum":["show","reject_draft","reject_fix"]},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["tool"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"anything","x-keystone-needs-approval":false}},"/v1/tools/anything_run":{"post":{"operationId":"anything_run","summary":"Anything run","description":"API Anything: runs a live learned tool (from anything_apps, for example a \"list calls\" or \"create daily log\" tool) on a Keystone Computer and returns structured results. Tools that change data first answer with a summary and a confirm code: tell the person what will happen, wait for a yes, then call again with the confirm code. When the app moved or renamed a button, the run finds it again and finishes; the answer then lists what it adapted to under \"adapted\", and the new way waits for a person to approve. If a step still fails, Keystone saves a screenshot and prepares a fix for a person to review; it never changes a live tool by itself. To look up several things at once with a read-only tool, pass many (up to 5 sets of inputs): each runs on its own computer at the same time. Uses computer time (see computers_usage).","tags":["API Anything apps and saved logins"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","minLength":1,"maxLength":80,"description":"Exact tool name from anything_apps."},"params":{"default":{},"description":"Inputs listed for the tool in anything_apps.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"confirm":{"description":"Confirm code from the first call, after the person said yes.","type":"string","maxLength":40},"many":{"description":"Read-only tools only: several sets of inputs to run side by side. Leave params empty when you use this.","minItems":1,"maxItems":5,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}}},"runner":{"default":"cloud","description":"my_browser: run in the person's own connected Chrome, where they are already signed in. Use it when the app turns Keystone Computers away or texts codes to the person's phone. Keystone also falls back to it by itself when the cloud run cannot sign in.","type":"string","enum":["cloud","my_browser"]},"job":{"description":"A job id from an earlier answer that said the run is waiting for the person's Chrome. Pass it alone to get the result.","type":"string","maxLength":40},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["tool"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"destructive","x-keystone-module":"anything","x-keystone-needs-approval":false}},"/v1/tools/computers_usage":{"post":{"operationId":"computers_usage","summary":"Computers usage","description":"Keystone Computers: this month's computer hours used, hours included, extra hours and their cost, when the month renews, and the latest sessions. Keystone Computers cost $15 a month per workspace with 15 hours included, then $0.20 an hour.","tags":["API Anything apps and saved logins"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"anything","x-keystone-needs-approval":false}},"/v1/tools/computers_settings":{"post":{"operationId":"computers_settings","summary":"Computers settings","description":"Keystone Computers: turns the add-on on or off for this workspace. Turning it on charges $15 to the card on file now and monthly after that (trial accounts get 2 free hours instead). Before turning it on, tell the person the price and wait for an explicit yes, then pass confirm true. Turning it off stops renewal; the paid month stays usable. (Spends money or changes billing, so a person must approve the exact amount first. Keystone asks the account owner or an admin itself: in your client when it supports approval prompts, otherwise the result has status needs_approval with an approve_url. Share that link, wait until the person says they approved, then call this tool again with the same arguments plus approval_id. The approval works once, expires, and changed arguments, amount or target need a new one. approved: true in the input never counts as approval.)","tags":["API Anything apps and saved logins"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"on":{"type":"boolean","description":"true to turn on, false to turn off."},"confirm":{"default":false,"description":"true only after the person explicitly agreed to the $15 monthly charge.","type":"boolean"},"approval_id":{"description":"The approval_id from a needs_approval result, after a person approved it. Pass the same arguments as the first call.","type":"string","maxLength":200},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}},"required":["on"]}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"202":{"description":"Human approval required before this action runs. Share approve_url, then call again with approval_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeedsApproval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"money","x-keystone-module":"anything","x-keystone-needs-approval":true}},"/v1/tools/anything_identity_get":{"post":{"operationId":"anything_identity_get","summary":"Anything identity get","description":"API Anything: shows the Keystone user for this workspace: display name, email address, custom domain setup with the exact records or forwarding steps, addresses that still forward during a changeover, and the enrolled apps whose Keystone login email should be updated after a rename. Owner or admin only.","tags":["API Anything apps and saved logins"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"anything","x-keystone-needs-approval":false}},"/v1/tools/anything_identity_set":{"post":{"operationId":"anything_identity_set","summary":"Anything identity set","description":"API Anything: changes the Keystone user. Owner or admin only. Set a display name, choose the mailbox name on the Keystone mail domain (for example localPart \"ops-larkspur\"), or move to the business's own domain (domain plus localPart, for example keystone@larkspurstudio.com). For a controlled domain Keystone sets up inbound mail automatically; otherwise the reply lists exact forwarding steps and MX records. After a rename the old address keeps receiving mail for 30 days. Pass check true to verify a custom address once the records or forwarding are in place.","tags":["API Anything apps and saved logins"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"description":"Name apps show for the Keystone user, for example \"Larkspur Studio AI\".","type":"string","maxLength":80},"localPart":{"description":"The part before the @, lowercase letters, digits, dots, dashes and underscores.","type":"string","minLength":1,"maxLength":64},"domain":{"description":"Custom domain for the address, for example larkspurstudio.com. Omit to use the Keystone mail domain.","type":"string","maxLength":200},"check":{"default":false,"description":"true only to verify a pending custom address instead of changing anything.","type":"boolean"},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"write","x-keystone-module":"anything","x-keystone-needs-approval":false}},"/v1/tools/computer_view":{"post":{"operationId":"computer_view","summary":"Computer view","description":"Keystone Computers: the latest screen of an API Anything session, so the person can watch the computer work. Omit session for the newest session in this workspace. Passwords and codes are masked before a screen is saved. In AI apps that show cards it refreshes while the session runs.","tags":["API Anything apps and saved logins"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"session":{"description":"Computer session id. Omit for the newest one.","type":"string","minLength":1,"maxLength":80},"workspace":{"description":"Workspace slug or id. Omit to use your active workspace.","type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"200":{"description":"Tool completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSuccess"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}},"x-keystone-risk":"read","x-keystone-module":"anything","x-keystone-needs-approval":false}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"ks_token","description":"Personal access token (starts with ks_) created in /app/developers or /setup."}},"schemas":{"ToolSuccess":{"type":"object","required":["ok","tool","result"],"properties":{"ok":{"type":"boolean","const":true},"tool":{"type":"string"},"result":{}}},"NeedsApproval":{"type":"object","required":["status","tool","approval_id","approve_url","expires_at","action","amount","target","workspace","next"],"properties":{"status":{"type":"string","const":"needs_approval"},"tool":{"type":"string"},"approval_id":{"type":"string"},"approve_url":{"type":"string","format":"uri"},"expires_at":{"type":"string","format":"date-time"},"action":{"type":"string"},"amount":{"type":"string"},"target":{"type":"string"},"workspace":{"type":"string"},"next":{"type":"string"}}},"Error":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}}},"WebhookSubscription":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"}},"secret_prefix":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"disabled_reason":{"type":["string","null"]},"consecutive_failures":{"type":"integer"},"last_delivered_at":{"type":["string","null"],"format":"date-time"},"last_status_code":{"type":["integer","null"]},"created_at":{"type":"string","format":"date-time"}}},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string"},"webhook_id":{"type":"string"},"workspace_id":{"type":"string"},"event_id":{"type":"string"},"event_type":{"type":"string"},"url":{"type":"string","format":"uri"},"status":{"type":"string","enum":["queued","delivering","delivered","retry","failed"]},"attempts":{"type":"integer"},"max_attempts":{"type":"integer"},"response_status":{"type":["integer","null"]},"duration_ms":{"type":["integer","null"]},"error":{"type":["string","null"]},"next_attempt_at":{"type":["string","null"],"format":"date-time"},"delivered_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"}}},"WebhookEventPayload":{"type":"object","required":["id","type","source","workspace_id","created_at","data"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["contact.created","lead.created","email.received","form.submitted","call.missed","message.received","message.replied","review.received","payment.received","invoice.overdue","booking.created","booking.canceled","webhook.received"]},"source":{"type":"string"},"workspace_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"data":{"type":"object"}}}},"responses":{"BadRequest":{"description":"Invalid arguments or tool error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Missing, invalid or revoked personal token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"Account plan, permissions or workspace scope refused this call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Tool, workspace or webhook was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limit reached (300 calls per minute per account).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"x-keystone-events":[{"type":"contact.created","label":"New contact","description":"A new contact is created in your workspace CRM."},{"type":"lead.created","label":"New lead in the CRM","description":"A new contact lands in ServiceLine CRM or HubSpot."},{"type":"email.received","label":"New email that matches a rule","description":"A Gmail message from a sender or with words you choose."},{"type":"form.submitted","label":"New form submission","description":"Someone fills in one of your Keystone lead forms."},{"type":"call.missed","label":"Missed call","description":"A call to a Keystone number ends with nobody picking up."},{"type":"message.received","label":"Customer texted or emailed","description":"A text to your Keystone number or an email to your front door address."},{"type":"message.replied","label":"Customer replied","description":"Someone you texted or emailed writes back."},{"type":"review.received","label":"New Google review","description":"A new review shows up on your Google Business Profile."},{"type":"payment.received","label":"Payment received","description":"A customer pays in Stripe, QuickBooks or a Keystone deal room."},{"type":"invoice.overdue","label":"Invoice overdue","description":"An open invoice passes its due date."},{"type":"booking.created","label":"New booking","description":"A new appointment in Google Calendar, Calendly or your Keystone booking page."},{"type":"booking.canceled","label":"Booking canceled","description":"An appointment gets canceled."},{"type":"webhook.received","label":"Another app sends an update","description":"Any app that can send a signed update to a Keystone link."}],"x-keystone-rate-limit":{"calls_per_minute":300}}