{"openapi":"3.1.0","info":{"title":"Knotie Partner API (REST facade over Partner MCP)","description":"Same tool set as the Partner MCP gateway (JSON-RPC at POST /api/partner-mcp), exposed as a conventional REST API so deterministic workflows, pipelines, and non-MCP clients can call the partner operations using the same `pkt_` keys and the same scope model.","version":"1.0.0","x-partner-mcp-equivalent":"/api/partner-mcp","x-partner-mcp-docs":"https://connecthub.knotie-ai.pro/partner-mcp"},"servers":[{"url":"https://mcp.knotie-ai.pro","description":"Knotie Partner gateway"}],"tags":[{"name":"agents"},{"name":"ai-gateway"},{"name":"analytics"},{"name":"billing"},{"name":"campaigns"},{"name":"credits"},{"name":"customer-api-keys"},{"name":"customers"},{"name":"discovery"},{"name":"embed"},{"name":"knowledge-bases"},{"name":"media"},{"name":"memory"},{"name":"meta"},{"name":"payments"},{"name":"phone-numbers"},{"name":"quota"},{"name":"team"},{"name":"vps"},{"name":"whitelabel"}],"paths":{"/api/partner-rest/tools/meta_whoami":{"post":{"operationId":"meta_whoami","summary":"Return identity and scope information for the calling partner API key.","tags":["meta"],"x-partner-mcp-scope":null,"security":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (none).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/meta_scopes":{"post":{"operationId":"meta_scopes","summary":"List the full scope catalog and which scopes the calling key has been granted.","tags":["meta"],"x-partner-mcp-scope":null,"security":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (none).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/meta_health":{"post":{"operationId":"meta_health","summary":"Simple health check — returns { ok: true, now: ISO-timestamp }.","tags":["meta"],"x-partner-mcp-scope":null,"security":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (none).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customers_list":{"post":{"operationId":"customers_list","summary":"List partner customers with pagination and optional filters.","tags":["customers"],"x-partner-mcp-scope":"customers:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"number","description":"Page number, 1-based.","default":1},"limit":{"type":"number","description":"Rows per page (max 100).","default":20},"search":{"type":"string","description":"Free-text substring match across firstName, lastName, companyName, email, businessPhone (case-insensitive). Omit or send \"\" to skip."},"monthlyCallVolume":{"type":"string","description":"Substring match against the customer's monthlyCallVolume field. Omit or send \"\" to skip."},"callComplexity":{"type":"string","description":"Substring match against the customer's callComplexity field. Omit or send \"\" to skip."},"deploymentTimeline":{"type":"string","description":"Substring match against the customer's deploymentTimeline field. Omit or send \"\" to skip."}}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (customers:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customers_get":{"post":{"operationId":"customers_get","summary":"Get a single customer by ID.","tags":["customers"],"x-partner-mcp-scope":"customers:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"}},"required":["customerId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (customers:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customers_create":{"post":{"operationId":"customers_create","summary":"Create a customer. Requires email + first/last name + company + password. Optional planId. Partner must have white-label customer portal enabled.","tags":["customers"],"x-partner-mcp-scope":"customers:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"companyName":{"type":"string"},"password":{"type":"string"},"planId":{"type":"string"}},"required":["email","firstName","lastName","companyName","password"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (customers:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customers_onboard":{"post":{"operationId":"customers_onboard","summary":"Provision ONE fully-configured white-label customer in a single call: account + generated credentials + branded welcome email, optional subscription plan, optional experience binding, optional per-customer feature overrides, and an optional starting AI-credit grant. Prefer this over customers_create for any new automated onboarding — customers_create only takes 6 fields and needs a plaintext password. This endpoint never accepts one (a secure password is generated server-side and delivered only in the welcome email). IDEMPOTENT on (partner, email): calling it again for an existing customer returns that customer with outcome=EXISTING_UNCHANGED and mutates NOTHING — it will not re-apply a plan, features, or credits, so you cannot use a repeat call to reconfigure someone. Use customers_update / customer_credits_top_up for that. ALWAYS read `warnings` in the result: the main app clamps every master-gated grant last and unconditionally, so a feature you requested may legitimately not have been enabled. `appliedFeatures` lists what actually landed.","tags":["customers"],"x-partner-mcp-scope":"customers:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Customer login email. Lower-cased and trimmed server-side; unique per partner."},"firstName":{"type":"string","description":"Defaults to the local part of the email."},"lastName":{"type":"string"},"companyName":{"type":"string","description":"Defaults to \"firstName lastName\"."},"planId":{"type":"string","description":"Subscription plan whose features to apply. Applied BEFORE per-call overrides and BEFORE the partner master clamps."},"experienceType":{"type":"string","description":"Bind the customer to one of YOUR PartnerExperience rows. Omit it and the customer is bound to your DEFAULT experience (the one on your root domain), if you have one. The welcome email is that experience's — its product name and branding — so a Media Studio signup gets a Media Studio email, never the generic voice-AI one. An unknown value is a warning, not an error — the customer is still created, just without the binding."},"features":{"type":"object","description":"PlanFeatures-shaped per-customer overrides, applied AFTER the plan and BEFORE the partner master clamps. Same key set a subscription plan can express (menu visibility, studio grants, selfServeAgentLimit, team/storage limits, credit metering, kbTier, visibleCustomerCreditPlanIds). Master-gated keys (showMediaStudio, showWebsiteStudio, showAiAgents, enableAiMemory, showAiGateway) are REQUESTS — each is clamped to false unless your partner master switch is on, and the clamp is reported in `warnings`.","additionalProperties":true},"initialAiCredits":{"type":"number","description":"Whole AI credits to grant at creation (0–1,000,000). The grant is a HARD leg: if it fails the whole customer is rolled back."},"sendWelcomeEmail":{"type":"boolean","description":"Defaults to true. When true the customer receives their generated credentials — this is the ONLY delivery channel for them. Set false only if you will separately trigger customers_enable_portal to issue credentials.","default":true},"idempotencyKey":{"type":"string","description":"Optional caller-supplied de-duplication key."}},"required":["email"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (customers:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customers_capabilities":{"post":{"operationId":"customers_capabilities","summary":"DISCOVERY — returns EVERYTHING you can set on a customer, for THIS partner, right now. Call this FIRST, before customers_onboard or customers_update, instead of guessing key names or values. Returns: `features` (every settable key with its type, bounds/enum, human label and description — plus `masterGate`, which tells you whether the partner master switch backing that key is currently ON, i.e. whether a grant would actually land or be clamped to false); `experiences` (the experienceType values that will validate for this partner — anything else is dropped with a warning); `apps` (the ids/names accepted in features.allowedApps); `plans` (this partner's planId values); and `endpoints` (where to send the result). The whole response is DERIVED at request time from the main app's validation schema, feature catalogs and this partner's own rows — it is never a hand-maintained list, so it stays correct as the product changes. Re-read it rather than caching it. Read-only and cheap; it mutates nothing.","tags":["customers"],"x-partner-mcp-scope":"customers:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (customers:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customers_update":{"post":{"operationId":"customers_update","summary":"Update customer profile + non-paid feature toggles. Covers every boolean/toggle the Features & Add-ons tab exposes: analytics toggles, API-access, portal menu visibility, credit-based pricing flags. Paid add-ons (Sonti CRM subscription, tool-call quota purchase, VPS subscription) are separate — use their dedicated tools.","tags":["customers"],"x-partner-mcp-scope":"customers:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"companyName":{"type":"string"},"businessPhone":{"type":"string"},"monthlyCallVolume":{"type":"string"},"callComplexity":{"type":"string"},"deploymentStatus":{"type":"string"},"orderStatus":{"type":"string"},"dealStatus":{"type":"string"},"enableAdvancedAnalytics":{"type":"boolean"},"enableDetailedCallAnalysis":{"type":"boolean"},"enableActionPointAnalysis":{"type":"boolean"},"enableApiAccess":{"type":"boolean"},"showApiKeys":{"type":"boolean"},"showKnowledgeBase":{"type":"boolean"},"showIntegration":{"type":"boolean"},"showDocsAndMedia":{"type":"boolean"},"showScheduleMeeting":{"type":"boolean"},"showPricingInformation":{"type":"boolean"},"showServerTerminal":{"type":"boolean"},"enableVpsPurchase":{"type":"boolean"},"kbProcessingEnabled":{"type":"boolean"},"showSocialPlanner":{"type":"boolean"},"showPhoneNumbers":{"type":"boolean"},"showMarketplaceSolutions":{"type":"boolean"},"showMcp":{"type":"boolean","description":"Let the customer mint their own MCP token."},"autoEmbeddingEnabled":{"type":"boolean"},"kbTier":{"type":"string","enum":["essential","moderate","premium"],"description":"KB v2 ingestion tier. \"premium\" additionally requires the admin-granted premium-parser entitlement on your partner account — without it the main app returns 403."},"showAiGateway":{"type":"boolean","description":"Also gated on your AI Gateway master switch."},"enableAiMemory":{"type":"boolean","description":"Also gated on your AI Memory master switch. NOTE: on this endpoint (unlike customers_onboard) setting it true also turns the PARTNER-level AI Memory switch on."},"showMediaStudio":{"type":"boolean","description":"Also gated on your Media Studio master switch."},"showWebsiteStudio":{"type":"boolean","description":"Also gated on your Website Studio master switch."},"showAiAgents":{"type":"boolean","description":"Also gated on your customer agent-builder master switch."},"selfServeAgentLimit":{"type":"number","description":"Self-serve agent slots, 0–20 (0 = view/test only). Out-of-range values are rejected 400 by the main app."},"showVpsCatalogApps":{"type":["boolean","null"],"description":"One-click apps tri-state. null = inherit your partner setting."},"vpsMarginPercent":{"type":["number","null"],"description":"Per-customer VPS margin override. null clears the override."},"enableTeamMembers":{"type":"boolean"},"maxTeamMembers":{"type":"number"},"storageAllocatedMB":{"type":["number","null"],"description":"Per-customer storage cap in MB; null removes the cap. The main app rejects (400) an allocation below what the customer already consumes."},"customerInfraResellerMode":{"type":["boolean","null"],"description":"null reverts to your partner default."},"customerAgencyDashboardMode":{"type":["boolean","null"],"description":"null reverts to your partner default."},"aiCreditsEnabled":{"type":"boolean"},"aiCreditPricePerMinute":{"type":"number"},"aiCreditGracePeriodSeconds":{"type":"number"},"lowCreditThreshold":{"type":"number"},"lowCreditNotificationsEnabled":{"type":"boolean"},"restrictCustomerCreditPlanVisibility":{"type":"boolean"},"integrationChargingEnabled":{"type":["boolean","null"],"description":"Per-customer override for integration-app (Composio/GHL/MCP) tool-call charging. true/false forces it on/off for this customer; null inherits the partner default set on /partner/settings/integration-pricing. Prefer customer_integration_charging_set for just this field."},"visibleCustomerCreditPlanIds":{"type":"array","items":{"type":"string"},"description":"Pin the customer to a subset of the partner credit plans. Empty array = all visible."}},"required":["customerId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (customers:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customers_set_status":{"post":{"operationId":"customers_set_status","summary":"Update a customer's order/workflow status. Valid values: \"Submitted\", \"Processing\", \"Additional Info Requested\", \"Under Review\", \"Regulatory approval submitted\", \"Regulatory approval completed\", \"Business Agreement Established\", \"Under Development\", \"System under review\", \"Voice AI Agent Live\". Note: to SUSPEND a customer's portal access, use customers_block_portal instead.","tags":["customers"],"x-partner-mcp-scope":"customers:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"status":{"type":"string","enum":["Submitted","Processing","Additional Info Requested","Under Review","Regulatory approval submitted","Regulatory approval completed","Business Agreement Established","Under Development","System under review","Voice AI Agent Live"]}},"required":["customerId","status"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (customers:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customers_set_deployment_status":{"post":{"operationId":"customers_set_deployment_status","summary":"Patch the deployment status field of a customer.","tags":["customers"],"x-partner-mcp-scope":"customers:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"deploymentStatus":{"type":"string"}},"required":["customerId","deploymentStatus"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (customers:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customers_enable_portal":{"post":{"operationId":"customers_enable_portal","summary":"Enable customer portal access and generate/reset credentials.","tags":["customers"],"x-partner-mcp-scope":"customers:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"generatePassword":{"type":"boolean"},"notifyCustomer":{"type":"boolean"}},"required":["customerId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (customers:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customers_block_portal":{"post":{"operationId":"customers_block_portal","summary":"Block (suspend) customer portal access. Keeps the customer record and all associated data intact, but the customer can no longer log in until access is re-enabled via customers_enable_portal.","tags":["customers"],"x-partner-mcp-scope":"customers:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"}},"required":["customerId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (customers:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customers_reset_password":{"post":{"operationId":"customers_reset_password","summary":"Reset the portal login password for a customer. Resolves which flow to use: (a) if teamMemberId is given → POST team-members/:tmId/reset-password (for specific team members), (b) else if the customer has team members → auto-target the primary/owner team member, (c) else → re-invoke POST /portal-access which regenerates the primary credentials and emails the customer (same flow as the \"Re-send credentials\" button in the dashboard). This (c) path is how most resets work in practice because the customer's owner login is not stored as a PartnerTeamMember row.","tags":["customers"],"x-partner-mcp-scope":"customers:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"teamMemberId":{"type":"string","description":"Specific team-member ID to reset. Omit to target the primary login (auto-resolves via team-members listing, falls back to portal-access regenerate)."}},"required":["customerId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (customers:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customers_paid_addons_status":{"post":{"operationId":"customers_paid_addons_status","summary":"Snapshot the paid add-on state for one customer in a single call: Sonti CRM subscription, tool-call quota, VPS access, embed tokens. Each block is `{ok, data|error}` so partial failures surface independently.","tags":["customers"],"x-partner-mcp-scope":"customers:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"}},"required":["customerId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (customers:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customers_usage_metrics":{"post":{"operationId":"customers_usage_metrics","summary":"Get usage metrics (calls, minutes, credit consumption) for a customer.","tags":["customers"],"x-partner-mcp-scope":"customers:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"from":{"type":"string","description":"ISO date (inclusive)."},"to":{"type":"string","description":"ISO date (inclusive)."}},"required":["customerId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (customers:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customers_check_portal_eligibility":{"post":{"operationId":"customers_check_portal_eligibility","summary":"Check whether this customer is eligible for portal access.","tags":["customers"],"x-partner-mcp-scope":"customers:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"}},"required":["customerId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (customers:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customers_phone_summary":{"post":{"operationId":"customers_phone_summary","summary":"Aggregate phone-number summary across customers.","tags":["customers"],"x-partner-mcp-scope":"customers:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (customers:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customers_continue_deployment":{"post":{"operationId":"customers_continue_deployment","summary":"Resume a partially-completed customer deployment flow.","tags":["customers"],"x-partner-mcp-scope":"customers:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"}},"required":["customerId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (customers:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customer_api_keys_list":{"post":{"operationId":"customer_api_keys_list","summary":"List API keys for a customer. Optional includeRevoked flag.","tags":["customer-api-keys"],"x-partner-mcp-scope":"customer-api-keys:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"includeRevoked":{"type":"boolean"}},"required":["customerId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (customer-api-keys:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customer_api_keys_create":{"post":{"operationId":"customer_api_keys_create","summary":"⚠️ SENSITIVE — creates a customer API key (ckt_...) and returns the plaintext secret ONCE. A malfunctioning agent that receives this in its tool output could exfiltrate it; restrict the `customer-api-keys:write` scope to keys that truly need it.","tags":["customer-api-keys"],"x-partner-mcp-scope":"customer-api-keys:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"expiresAt":{"type":"string","description":"ISO date string or null."},"rateLimit":{"type":"number"},"dailyLimit":{"type":"number"},"monthlyLimit":{"type":"number"},"allowedIps":{"type":"string","description":"Comma-separated IP allowlist."}},"required":["customerId","name"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (customer-api-keys:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customer_api_keys_revoke":{"post":{"operationId":"customer_api_keys_revoke","summary":"Revoke (deactivate) a customer API key.","tags":["customer-api-keys"],"x-partner-mcp-scope":"customer-api-keys:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"keyId":{"type":"string"}},"required":["customerId","keyId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (customer-api-keys:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customer_api_keys_renew":{"post":{"operationId":"customer_api_keys_renew","summary":"⚠️ SENSITIVE — rotates a customer API key. Returns the NEW plaintext secret in the body (old key immediately invalidated). Same exfiltration concern as customer_api_keys_create.","tags":["customer-api-keys"],"x-partner-mcp-scope":"customer-api-keys:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"keyId":{"type":"string"}},"required":["customerId","keyId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (customer-api-keys:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/agents_list":{"post":{"operationId":"agents_list","summary":"List agents. With `provider`, calls /api/partner/{provider}-agents directly. Without, fans out across vapi, retell, ultravox, elevenlabs, ghl and returns a per-provider summary (each item has `{ provider, ok, data | error }`).","tags":["agents"],"x-partner-mcp-scope":"agents:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["vapi","retell","ultravox","elevenlabs","knova","ghl","byo"],"description":"Omit to fan out across vapi, retell, ultravox, elevenlabs, ghl."},"customerId":{"type":"string"},"page":{"type":"number","default":1},"limit":{"type":"number","default":50}}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (agents:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/agents_get":{"post":{"operationId":"agents_get","summary":"Get a single agent by provider + agentId.","tags":["agents"],"x-partner-mcp-scope":"agents:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["vapi","retell","ultravox","elevenlabs","knova","ghl","byo"]},"agentId":{"type":"string"}},"required":["provider","agentId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (agents:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/agents_create":{"post":{"operationId":"agents_create","summary":"Create a new agent on the given provider. Required fields vary by provider; for VAPI/Retell the main app expects agentName, systemPrompt, voiceId, and apiKey at minimum. Any extra provider-specific config can be passed at the top level.","tags":["agents"],"x-partner-mcp-scope":"agents:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["vapi","retell","ultravox","elevenlabs","knova","ghl","byo"]},"agentName":{"type":"string"},"systemPrompt":{"type":"string"},"voiceId":{"type":"string"},"voiceProvider":{"type":"string"},"apiKey":{"type":"string","description":"Provider API key. Omit to use the partner-level key configured in the dashboard, if any."},"modelProvider":{"type":"string"},"model":{"type":"string"},"temperature":{"type":"number"},"maxTokens":{"type":"number"},"firstMessage":{"type":"string"},"customerId":{"type":"string","description":"Optional: map the agent to a customer at create time."}},"required":["provider","agentName","systemPrompt","voiceId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (agents:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/agents_update":{"post":{"operationId":"agents_update","summary":"Update an existing agent (name, config).","tags":["agents"],"x-partner-mcp-scope":"agents:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["vapi","retell","ultravox","elevenlabs","knova","ghl","byo"]},"agentId":{"type":"string"},"name":{"type":"string"},"config":{"type":"object"}},"required":["provider","agentId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (agents:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/agents_test":{"post":{"operationId":"agents_test","summary":"Trigger a test call/conversation for an agent.","tags":["agents"],"x-partner-mcp-scope":"agents:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["vapi","retell","ultravox","elevenlabs","knova","ghl","byo"]},"agentId":{"type":"string"},"testInput":{"type":"object","description":"Provider-specific test payload (e.g. phone number, message)."}},"required":["provider","agentId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (agents:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/agents_analytics":{"post":{"operationId":"agents_analytics","summary":"Fetch analytics for a single agent (calls, minutes, cost, success rate).","tags":["analytics"],"x-partner-mcp-scope":"analytics:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"}},"required":["agentId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (analytics:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/agents_map_customer":{"post":{"operationId":"agents_map_customer","summary":"Assign an agent to a customer (with optional profit multiplier).","tags":["agents"],"x-partner-mcp-scope":"agents:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["vapi","retell","ultravox","elevenlabs","knova","ghl","byo"]},"agentId":{"type":"string"},"customerId":{"type":"string"},"profitMultiplier":{"type":"number"}},"required":["provider","agentId","customerId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (agents:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/agents_unmap_customer":{"post":{"operationId":"agents_unmap_customer","summary":"Unmap an agent from a customer. Routes to the provider-appropriate endpoint: `retell-agents`, `elevenlabs-agents`, `retell-chat-agents` expose a dedicated `unmap-customer` POST — all others unmap by PATCH-ing the agent update endpoint with `customerId: null`.","tags":["agents"],"x-partner-mcp-scope":"agents:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["vapi","retell","ultravox","elevenlabs","knova","ghl","byo"]},"agentId":{"type":"string"},"customerId":{"type":"string","description":"Optional: explicit customer being unmapped. Providers with a dedicated unmap endpoint ignore this; the update-endpoint path uses it for audit clarity only."}},"required":["provider","agentId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (agents:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/ai_gateway_config":{"post":{"operationId":"ai_gateway_config","summary":"Get partner AI Gateway (LiteLLM) configuration.","tags":["ai-gateway"],"x-partner-mcp-scope":"ai-gateway:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (ai-gateway:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/ai_gateway_models":{"post":{"operationId":"ai_gateway_models","summary":"List LLM models available via the AI Gateway.","tags":["ai-gateway"],"x-partner-mcp-scope":"ai-gateway:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (ai-gateway:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/ai_gateway_keys_list":{"post":{"operationId":"ai_gateway_keys_list","summary":"List AI Gateway keys, optionally filtered by status or customer.","tags":["ai-gateway"],"x-partner-mcp-scope":"ai-gateway:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"active | disabled | expired"},"customerId":{"type":"string"}}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (ai-gateway:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/ai_gateway_keys_get":{"post":{"operationId":"ai_gateway_keys_get","summary":"Get one AI Gateway key by ID.","tags":["ai-gateway"],"x-partner-mcp-scope":"ai-gateway:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"keyId":{"type":"string"}},"required":["keyId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (ai-gateway:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/ai_gateway_keys_create":{"post":{"operationId":"ai_gateway_keys_create","summary":"⚠️ SENSITIVE — creates a new LiteLLM proxy key with a USD budget + allowed models. The generated key value is returned ONCE in the response body. A rogue agent could exfiltrate it and burn the entire attached budget. Optionally pin to a customer.","tags":["ai-gateway"],"x-partner-mcp-scope":"ai-gateway:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"budgetUsd":{"type":"number"},"allowedModels":{"type":"array","items":{"type":"string"},"description":"e.g. [\"gpt-4o-mini\", \"claude-sonnet-4-6\"]"},"description":{"type":"string"},"customerId":{"type":"string"},"profitMultiplier":{"type":"number"},"customerCreditPriceCents":{"type":"number"},"minCostPer1MTokensUsd":{"type":"number"},"autoTopUpEnabled":{"type":"boolean"},"autoTopUpThresholdUsd":{"type":"number"},"autoTopUpAmountUsd":{"type":"number"},"allowedDomains":{"type":"array","items":{"type":"string"}},"rateLimit":{"type":"number"},"dailyLimit":{"type":"number"},"monthlyLimit":{"type":"number"},"expiresAt":{"type":"string"}},"required":["name","budgetUsd","allowedModels"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (ai-gateway:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/ai_gateway_keys_update":{"post":{"operationId":"ai_gateway_keys_update","summary":"Update mutable fields of an AI Gateway key (PATCH).","tags":["ai-gateway"],"x-partner-mcp-scope":"ai-gateway:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"keyId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"allowedModels":{"type":"array","items":{"type":"string"}},"allowedDomains":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"rateLimit":{"type":"number"},"dailyLimit":{"type":"number"},"monthlyLimit":{"type":"number"},"autoTopUpEnabled":{"type":"boolean"},"autoTopUpThresholdUsd":{"type":"number"},"autoTopUpAmountUsd":{"type":"number"}},"required":["keyId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (ai-gateway:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/ai_gateway_keys_delete":{"post":{"operationId":"ai_gateway_keys_delete","summary":"Delete / revoke an AI Gateway key.","tags":["ai-gateway"],"x-partner-mcp-scope":"ai-gateway:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"keyId":{"type":"string"}},"required":["keyId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (ai-gateway:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/ai_gateway_keys_regenerate":{"post":{"operationId":"ai_gateway_keys_regenerate","summary":"⚠️ SENSITIVE — rotates a LiteLLM proxy key. Old value is invalidated immediately; new value returned ONCE. Same exfiltration concern as ai_gateway_keys_create.","tags":["ai-gateway"],"x-partner-mcp-scope":"ai-gateway:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"keyId":{"type":"string"}},"required":["keyId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (ai-gateway:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/ai_gateway_keys_top_up":{"post":{"operationId":"ai_gateway_keys_top_up","summary":"Add USD budget to an AI Gateway key.","tags":["ai-gateway"],"x-partner-mcp-scope":"ai-gateway:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"keyId":{"type":"string"},"amountUsd":{"type":"number"}},"required":["keyId","amountUsd"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (ai-gateway:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/ai_gateway_customer_settings_get":{"post":{"operationId":"ai_gateway_customer_settings_get","summary":"Get the partner-level customer LLM settings.","tags":["ai-gateway"],"x-partner-mcp-scope":"ai-gateway:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (ai-gateway:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/ai_gateway_customer_settings_update":{"post":{"operationId":"ai_gateway_customer_settings_update","summary":"Patch the partner-level customer LLM settings.","tags":["ai-gateway"],"x-partner-mcp-scope":"ai-gateway:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"defaultModel":{"type":"string"},"profitMultiplier":{"type":"number"},"customerCreditPriceCents":{"type":"number"},"autoTopUpDefaults":{"type":"object"}}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (ai-gateway:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/credits_balance":{"post":{"operationId":"credits_balance","summary":"Get the partner Knotie credit balance and low-credit alert settings.","tags":["credits"],"x-partner-mcp-scope":"credits:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (credits:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/credits_balance_update":{"post":{"operationId":"credits_balance_update","summary":"Update low-credit alert threshold and notification settings.","tags":["credits"],"x-partner-mcp-scope":"credits:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"lowCreditThreshold":{"type":"number"},"lowCreditNotificationsEnabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (credits:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/credits_packages":{"post":{"operationId":"credits_packages","summary":"List credit packages the partner can purchase.","tags":["credits"],"x-partner-mcp-scope":"credits:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (credits:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/credits_purchase":{"post":{"operationId":"credits_purchase","summary":"Initiate a credit purchase. Provide either packageId or customCredits (1–10,000,000). Returns a Stripe checkout URL.","tags":["credits"],"x-partner-mcp-scope":"credits:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"packageId":{"type":"string"},"customCredits":{"type":"number"}}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (credits:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/credits_transactions":{"post":{"operationId":"credits_transactions","summary":"List partner credit transactions (purchases, deductions, top-ups).","tags":["credits"],"x-partner-mcp-scope":"credits:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"number","default":1},"limit":{"type":"number","default":20}}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (credits:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customer_credits_balance":{"post":{"operationId":"customer_credits_balance","summary":"Get a customer's Knotie credit balance + recent transactions.","tags":["credits"],"x-partner-mcp-scope":"credits:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"}},"required":["customerId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (credits:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customer_credits_top_up":{"post":{"operationId":"customer_credits_top_up","summary":"Top up a customer's credit balance with a positive number of credits. The grant is recorded in the customer credit ledger with the NAME of the API key that made this call, so every automated top-up is attributable. Pass grantType=\"monthly_recurring\" + recurringMonths to make it a repeating grant instead of a one-off.","tags":["credits"],"x-partner-mcp-scope":"credits:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"credits":{"type":"number","description":"Whole credits to add (1–1,000,000)."},"reason":{"type":"string","description":"Ledger description. The acting API key is appended automatically — do not add it yourself."},"grantType":{"type":"string","enum":["one_time","monthly_recurring"],"description":"Defaults to one_time. monthly_recurring requires recurringMonths."},"recurringMonths":{"type":"number","description":"How many months a monthly_recurring grant repeats for (1–60)."}},"required":["customerId","credits"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (credits:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customer_credits_deduct":{"post":{"operationId":"customer_credits_deduct","summary":"Deduct credits from a customer's balance (manual adjustment). The deduction is recorded in the customer credit ledger with the NAME of the API key that made this call, so every automated clawback is attributable.","tags":["credits"],"x-partner-mcp-scope":"credits:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"credits":{"type":"number"},"reason":{"type":"string"}},"required":["customerId","credits"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (credits:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customer_credits_set_monthly":{"post":{"operationId":"customer_credits_set_monthly","summary":"Set (or clear) a customer's RECURRING monthly credit allocation. This is the subscription-style grant the partner dashboard exposes — distinct from customer_credits_top_up, which moves credits once. `monthlyAllocation: 0` turns the monthly grant off. `rolloverEnabled` decides whether an unspent month carries forward or is forfeited at the reset. Recorded in the ledger with the NAME of the API key that made the call.","tags":["credits"],"x-partner-mcp-scope":"credits:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"monthlyAllocation":{"type":"number","description":"Credits granted per month (0–1,000,000). 0 disables the monthly grant."},"rolloverEnabled":{"type":"boolean","description":"True = unspent credits carry into the next month. Omit to leave the current setting alone (the main app defaults it to false when it has never been set)."},"reason":{"type":"string","description":"Ledger description. The acting API key is appended automatically — do not add it yourself."}},"required":["customerId","monthlyAllocation"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (credits:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customer_credits_transactions":{"post":{"operationId":"customer_credits_transactions","summary":"List credit transactions for a customer.","tags":["credits"],"x-partner-mcp-scope":"credits:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"page":{"type":"number","default":1},"limit":{"type":"number","default":20}},"required":["customerId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (credits:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customer_credit_plans_list":{"post":{"operationId":"customer_credit_plans_list","summary":"List partner-defined customer credit plans.","tags":["credits"],"x-partner-mcp-scope":"credits:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (credits:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customer_credit_plans_create":{"post":{"operationId":"customer_credit_plans_create","summary":"Create a customer credit plan (name, credits, price).","tags":["credits"],"x-partner-mcp-scope":"credits:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"credits":{"type":"number"},"priceCents":{"type":"number"},"description":{"type":"string"}},"required":["name","credits","priceCents"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (credits:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customer_credit_plans_update":{"post":{"operationId":"customer_credit_plans_update","summary":"Update a customer credit plan.","tags":["credits"],"x-partner-mcp-scope":"credits:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"planId":{"type":"string"},"name":{"type":"string"},"credits":{"type":"number"},"priceCents":{"type":"number"},"description":{"type":"string"},"active":{"type":"boolean"}},"required":["planId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (credits:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customer_credit_plans_delete":{"post":{"operationId":"customer_credit_plans_delete","summary":"Delete a customer credit plan.","tags":["credits"],"x-partner-mcp-scope":"credits:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"planId":{"type":"string"}},"required":["planId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (credits:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/telephony_credits_balance":{"post":{"operationId":"telephony_credits_balance","summary":"Get the partner telephony credit balance (SMS, calls, phone-number rentals). Balance is returned as `currentBalanceCents`; divide by 100 for USD.","tags":["credits"],"x-partner-mcp-scope":"credits:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (credits:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/telephony_credits_packages":{"post":{"operationId":"telephony_credits_packages","summary":"List telephony credit packages available for purchase.","tags":["credits"],"x-partner-mcp-scope":"credits:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (credits:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/telephony_credits_transactions":{"post":{"operationId":"telephony_credits_transactions","summary":"List partner telephony credit transactions (purchases, deductions).","tags":["credits"],"x-partner-mcp-scope":"credits:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"number","default":1},"limit":{"type":"number","default":20}}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (credits:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/telephony_credits_purchase":{"post":{"operationId":"telephony_credits_purchase","summary":"Initiate a telephony credit purchase. Returns a Stripe checkout URL. Either packageId (from telephony_credits_packages) or customAmountCents must be provided.","tags":["credits"],"x-partner-mcp-scope":"credits:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"packageId":{"type":"string"},"customAmountCents":{"type":"number","description":"Custom purchase amount in cents (min 1000 = $10)."}}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (credits:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/telephony_credits_settings_get":{"post":{"operationId":"telephony_credits_settings_get","summary":"Get the partner telephony-credit settings (auto-top-up, thresholds, profit markups).","tags":["credits"],"x-partner-mcp-scope":"credits:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (credits:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/telephony_credits_settings_update":{"post":{"operationId":"telephony_credits_settings_update","summary":"Update partner telephony-credit settings.","tags":["credits"],"x-partner-mcp-scope":"credits:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"autoTopUpEnabled":{"type":"boolean"},"autoTopUpThresholdCents":{"type":"number"},"autoTopUpAmountCents":{"type":"number"},"smsProfitMarkupPct":{"type":"number"},"callProfitMarkupPct":{"type":"number"},"phoneNumberProfitMarkupPct":{"type":"number"}}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (credits:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/vps_instances_list":{"post":{"operationId":"vps_instances_list","summary":"List VPS instances owned by the partner (with customer assignment state).","tags":["vps"],"x-partner-mcp-scope":"vps:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (vps:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/vps_instance_get":{"post":{"operationId":"vps_instance_get","summary":"Get one VPS instance by ID.","tags":["vps"],"x-partner-mcp-scope":"vps:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"instanceId":{"type":"string"}},"required":["instanceId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (vps:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/vps_instance_update":{"post":{"operationId":"vps_instance_update","summary":"Update a VPS instance — rename, reassign to a customer, change IP, or set lifecycle status (active | suspended | cancelled). Also used for customer-price overrides.","tags":["vps"],"x-partner-mcp-scope":"vps:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"instanceId":{"type":"string"},"displayName":{"type":"string"},"customerId":{"type":"string","description":"Assign the instance to a customer. Pass null to unassign."},"ipAddress":{"type":"string"},"status":{"type":"string","description":"active | suspended | cancelled"},"customerPriceCents":{"type":"number"}},"required":["instanceId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (vps:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/vps_instance_credentials":{"post":{"operationId":"vps_instance_credentials","summary":"⚠️ SENSITIVE — returns the VPS root password and SSH connection details in the response body. A malfunctioning agent could exfiltrate these. Only call when an explicit human/recovery workflow needs them; prefer SSH-key rotation for routine access.","tags":["vps"],"x-partner-mcp-scope":"vps:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"instanceId":{"type":"string"}},"required":["instanceId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (vps:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/vps_instance_fix_credentials":{"post":{"operationId":"vps_instance_fix_credentials","summary":"⚠️ SENSITIVE — resets/recovers VPS credentials and returns the new root password. Same exfiltration risk as vps_instance_credentials.","tags":["vps"],"x-partner-mcp-scope":"vps:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"instanceId":{"type":"string"}},"required":["instanceId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (vps:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/vps_instance_regenerate_ssh_key":{"post":{"operationId":"vps_instance_regenerate_ssh_key","summary":"⚠️ SENSITIVE — regenerates the SSH keypair and returns the new private key in the response body. Rotates all existing SSH access. Exfiltration of the response grants SSH access to the VPS.","tags":["vps"],"x-partner-mcp-scope":"vps:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"instanceId":{"type":"string"}},"required":["instanceId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (vps:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/vps_instance_deploy_package":{"post":{"operationId":"vps_instance_deploy_package","summary":"Deploy a pre-built app package onto a VPS instance.","tags":["vps"],"x-partner-mcp-scope":"vps:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"instanceId":{"type":"string"},"appId":{"type":"string"}},"required":["instanceId","appId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (vps:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/vps_instance_reinstall":{"post":{"operationId":"vps_instance_reinstall","summary":"Reinstall the OS image on a VPS instance (DESTRUCTIVE — wipes disk). Optionally deploy a single app (`applicationId`) or a bundle (`applicationIds`) in the same operation — matches the combo-package deploy flow on the VPS settings page.","tags":["vps"],"x-partner-mcp-scope":"vps:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"instanceId":{"type":"string"},"imageId":{"type":"string","description":"OS image ID. Omit to use the plan default."},"applicationId":{"type":"string","description":"Single-app deploy during reinstall (e.g. \"n8n\")."},"applicationIds":{"type":"array","items":{"type":"string"},"description":"Multi-app combo deploy (e.g. [\"n8n\",\"supabase\",\"redis\"]). Takes precedence over applicationId."}},"required":["instanceId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (vps:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/vps_applications_list":{"post":{"operationId":"vps_applications_list","summary":"List deployable app bundles in the Knotie catalog (what an AI agent can install on a VPS). Returns IDs that feed into vps_instance_deploy_package or vps_instance_reinstall.","tags":["vps"],"x-partner-mcp-scope":"vps:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (vps:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/vps_packages_create":{"post":{"operationId":"vps_packages_create","summary":"Create a reusable multi-app VPS package (e.g. \"n8n + Supabase starter\"). Partners can sell these as a single SKU; AI agents can use them to spin up turnkey stacks.","tags":["vps"],"x-partner-mcp-scope":"vps:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"emoji":{"type":"string"},"bundledAppIds":{"type":"array","items":{"type":"string"},"description":"App IDs from vps_applications_list, e.g. [\"n8n\",\"redis\"]."},"basePlanId":{"type":"string","description":"VPS plan ID the package targets."},"priceMonthlyUsd":{"type":"number"},"priceYearlyUsd":{"type":"number"},"allowMonthlyBilling":{"type":"boolean"},"setupFeeUsd":{"type":"number"},"visibleToCustomers":{"type":"boolean"}},"required":["name","bundledAppIds","basePlanId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (vps:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/vps_packages_update":{"post":{"operationId":"vps_packages_update","summary":"Update a VPS package (any subset of its fields). Useful for price tweaks or adding apps to an existing bundle.","tags":["vps"],"x-partner-mcp-scope":"vps:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"packageId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"emoji":{"type":"string"},"bundledAppIds":{"type":"array","items":{"type":"string"}},"basePlanId":{"type":"string"},"priceMonthlyUsd":{"type":"number"},"priceYearlyUsd":{"type":"number"},"allowMonthlyBilling":{"type":"boolean"},"setupFeeUsd":{"type":"number"},"visibleToCustomers":{"type":"boolean"}},"required":["packageId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (vps:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/vps_packages_delete":{"post":{"operationId":"vps_packages_delete","summary":"Delete a VPS package.","tags":["vps"],"x-partner-mcp-scope":"vps:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"packageId":{"type":"string"}},"required":["packageId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (vps:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/vps_packages_list":{"post":{"operationId":"vps_packages_list","summary":"List deployable VPS app packages in the catalog.","tags":["vps"],"x-partner-mcp-scope":"vps:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (vps:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/vps_plans_list":{"post":{"operationId":"vps_plans_list","summary":"List VPS plans available for purchase.","tags":["vps"],"x-partner-mcp-scope":"vps:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (vps:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/vps_checkout":{"post":{"operationId":"vps_checkout","summary":"Purchase a VPS plan. Returns a Stripe checkout URL.","tags":["vps"],"x-partner-mcp-scope":"vps:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"planId":{"type":"string"},"region":{"type":"string"},"displayName":{"type":"string"},"customerId":{"type":"string"}},"required":["planId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (vps:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/vps_settings_get":{"post":{"operationId":"vps_settings_get","summary":"Get partner-level VPS settings (default region, pricing markup).","tags":["vps"],"x-partner-mcp-scope":"vps:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (vps:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/vps_settings_update":{"post":{"operationId":"vps_settings_update","summary":"Update partner-level VPS settings.","tags":["vps"],"x-partner-mcp-scope":"vps:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"defaultRegion":{"type":"string"},"pricingMarkupPct":{"type":"number"}}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (vps:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/vps_customer_access_list":{"post":{"operationId":"vps_customer_access_list","summary":"List VPS access grants for a customer.","tags":["vps"],"x-partner-mcp-scope":"vps:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"}},"required":["customerId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (vps:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/vps_customer_access_grant":{"post":{"operationId":"vps_customer_access_grant","summary":"Grant a customer access to a VPS instance.","tags":["vps"],"x-partner-mcp-scope":"vps:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"instanceId":{"type":"string"}},"required":["customerId","instanceId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (vps:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/vps_customer_access_revoke":{"post":{"operationId":"vps_customer_access_revoke","summary":"Revoke a customer's VPS access by access-grant ID.","tags":["vps"],"x-partner-mcp-scope":"vps:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"accessId":{"type":"string"}},"required":["customerId","accessId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (vps:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/phone_numbers_list":{"post":{"operationId":"phone_numbers_list","summary":"List all partner phone numbers with filters + stats.","tags":["phone-numbers"],"x-partner-mcp-scope":"phone-numbers:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"number","default":1},"limit":{"type":"number","default":20},"search":{"type":"string"},"provider":{"type":"string"},"status":{"type":"string"},"assignment":{"type":"string"},"ownership":{"type":"string"},"customerId":{"type":"string"},"billingType":{"type":"string"}}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (phone-numbers:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/phone_numbers_search":{"post":{"operationId":"phone_numbers_search","summary":"Search for available phone numbers (Twilio) for a customer to purchase.","tags":["phone-numbers"],"x-partner-mcp-scope":"phone-numbers:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"countryCode":{"type":"string","description":"ISO-3166-1 alpha-2 country code, e.g. \"US\" or \"GB\".","minLength":2,"maxLength":2},"phoneType":{"type":"string","description":"Number category.","enum":["local","mobile","tollfree"]},"limit":{"type":"number","minimum":1,"maximum":50,"default":10},"voiceEnabled":{"type":"boolean"},"smsEnabled":{"type":"boolean"},"mmsEnabled":{"type":"boolean"},"faxEnabled":{"type":"boolean"}},"required":["customerId","countryCode","phoneType"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (phone-numbers:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/phone_numbers_purchase":{"post":{"operationId":"phone_numbers_purchase","summary":"Purchase a phone number for a customer from a provider.","tags":["phone-numbers"],"x-partner-mcp-scope":"phone-numbers:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"provider":{"type":"string"},"phoneNumber":{"type":"string"},"areaCode":{"type":"string"}},"required":["customerId","provider"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (phone-numbers:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/phone_numbers_import":{"post":{"operationId":"phone_numbers_import","summary":"Import an existing externally-provisioned phone number.","tags":["phone-numbers"],"x-partner-mcp-scope":"phone-numbers:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"provider":{"type":"string"},"phoneNumber":{"type":"string"},"credentials":{"type":"object"}},"required":["customerId","provider","phoneNumber"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (phone-numbers:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/phone_numbers_release":{"post":{"operationId":"phone_numbers_release","summary":"Release (unassign + release upstream if owned) a phone number.","tags":["phone-numbers"],"x-partner-mcp-scope":"phone-numbers:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"phoneNumberId":{"type":"string"}},"required":["customerId","phoneNumberId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (phone-numbers:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/phone_numbers_assign_agent":{"post":{"operationId":"phone_numbers_assign_agent","summary":"Assign a phone number to an agent.","tags":["phone-numbers"],"x-partner-mcp-scope":"phone-numbers:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"phoneNumberId":{"type":"string"},"agentProvider":{"type":"string"},"agentId":{"type":"string"}},"required":["phoneNumberId","agentProvider","agentId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (phone-numbers:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/phone_numbers_unassign_agent":{"post":{"operationId":"phone_numbers_unassign_agent","summary":"Unassign the agent from a phone number.","tags":["phone-numbers"],"x-partner-mcp-scope":"phone-numbers:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"phoneNumberId":{"type":"string"}},"required":["phoneNumberId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (phone-numbers:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/phone_numbers_eligible_agents":{"post":{"operationId":"phone_numbers_eligible_agents","summary":"List agents eligible to be assigned to a given phone number.","tags":["phone-numbers"],"x-partner-mcp-scope":"phone-numbers:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"phoneNumberId":{"type":"string"}},"required":["phoneNumberId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (phone-numbers:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/knowledge_bases_list":{"post":{"operationId":"knowledge_bases_list","summary":"List knowledge bases for a customer.","tags":["knowledge-bases"],"x-partner-mcp-scope":"knowledge-bases:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"}},"required":["customerId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (knowledge-bases:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/knowledge_bases_get_files":{"post":{"operationId":"knowledge_bases_get_files","summary":"List files in a knowledge base.","tags":["knowledge-bases"],"x-partner-mcp-scope":"knowledge-bases:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"kbId":{"type":"string"}},"required":["customerId","kbId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (knowledge-bases:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/knowledge_bases_upload_url":{"post":{"operationId":"knowledge_bases_upload_url","summary":"Request presigned upload URLs for knowledge-base file uploads. Returns URLs the client can PUT to.","tags":["knowledge-bases"],"x-partner-mcp-scope":"knowledge-bases:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"kbId":{"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"contentType":{"type":"string"},"sizeBytes":{"type":"number"}}}}},"required":["customerId","kbId","files"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (knowledge-bases:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/invoices_list":{"post":{"operationId":"invoices_list","summary":"List partner-issued invoices.","tags":["billing"],"x-partner-mcp-scope":"billing:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"customerId":{"type":"string"},"page":{"type":"number","default":1},"limit":{"type":"number","default":20}}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (billing:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/invoices_get":{"post":{"operationId":"invoices_get","summary":"Get a single invoice by ID.","tags":["billing"],"x-partner-mcp-scope":"billing:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"invoiceId":{"type":"string"}},"required":["invoiceId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (billing:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/invoices_create":{"post":{"operationId":"invoices_create","summary":"Create a new invoice (Stripe-backed). Amount is in cents.","tags":["billing"],"x-partner-mcp-scope":"billing:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"amount":{"type":"number","description":"Total in cents (min 50)."},"currency":{"type":"string","default":"usd"},"dueDate":{"type":"string","description":"ISO date string."},"type":{"type":"string","enum":["one_time","recurring"],"default":"one_time"},"recurringInterval":{"type":"string","enum":["weekly","monthly","yearly"]},"recurringCount":{"type":"number"}},"required":["customerId","title","amount","type"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (billing:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/invoices_update":{"post":{"operationId":"invoices_update","summary":"Update an invoice.","tags":["billing"],"x-partner-mcp-scope":"billing:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"invoiceId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"amount":{"type":"number","description":"Amount in cents (min 50)."},"dueDate":{"type":"string","description":"ISO date string."},"status":{"type":"string","enum":["draft","sent","paid","overdue","cancelled"]}},"required":["invoiceId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (billing:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/invoices_delete":{"post":{"operationId":"invoices_delete","summary":"Delete an invoice.","tags":["billing"],"x-partner-mcp-scope":"billing:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"invoiceId":{"type":"string"}},"required":["invoiceId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (billing:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/invoices_send":{"post":{"operationId":"invoices_send","summary":"Send an invoice to the customer via email.","tags":["billing"],"x-partner-mcp-scope":"billing:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"invoiceId":{"type":"string"}},"required":["invoiceId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (billing:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/invoices_payment_intent":{"post":{"operationId":"invoices_payment_intent","summary":"Create a Stripe payment intent for an invoice.","tags":["billing"],"x-partner-mcp-scope":"billing:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"invoiceId":{"type":"string"}},"required":["invoiceId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (billing:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/invoices_recurring_list":{"post":{"operationId":"invoices_recurring_list","summary":"List recurring invoice schedules.","tags":["billing"],"x-partner-mcp-scope":"billing:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (billing:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/invoices_recurring_create":{"post":{"operationId":"invoices_recurring_create","summary":"Create a recurring invoice schedule. Amount is in DOLLARS (the route converts to cents).","tags":["billing"],"x-partner-mcp-scope":"billing:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"amount":{"type":"number","description":"Amount in DOLLARS per recurrence (>0)."},"recurringInterval":{"type":"string","enum":["weekly","monthly","yearly"]},"recurringCount":{"type":"number","description":"Number of recurrences (optional)."},"dueDate":{"type":"string","description":"ISO date string."},"currency":{"type":"string","default":"usd"}},"required":["customerId","title","amount","recurringInterval"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (billing:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/billing_analytics":{"post":{"operationId":"billing_analytics","summary":"Aggregate partner billing analytics (revenue, open invoices, etc.)","tags":["billing"],"x-partner-mcp-scope":"billing:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (billing:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/metered_plans_list":{"post":{"operationId":"metered_plans_list","summary":"List metered billing plans.","tags":["billing"],"x-partner-mcp-scope":"billing:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (billing:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/metered_plans_create":{"post":{"operationId":"metered_plans_create","summary":"Create a new metered billing plan. Pricing uses tiered/flat/volume models — pricingTiers must be non-empty.","tags":["billing"],"x-partner-mcp-scope":"billing:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"metricType":{"type":"string","description":"e.g. \"calls\", \"minutes\", \"messages\""},"metricName":{"type":"string","description":"Display name for the metric."},"pricingModel":{"type":"string","enum":["flat","tiered","volume"]},"pricingTiers":{"type":"array","items":{"type":"object","properties":{"upTo":{"type":["number","null"],"description":"Tier upper bound (null = ∞)."},"price":{"type":"number","description":"Price per unit at this tier."}},"required":["upTo","price"]},"minItems":1},"billingCycle":{"type":"string","enum":["daily","weekly","monthly","quarterly"]},"billingDay":{"type":"number","minimum":1,"maximum":31},"minimumCharge":{"type":"number"},"maximumCharge":{"type":["number","null"]},"includedUnits":{"type":"number"},"prorationEnabled":{"type":"boolean"},"usageAggregation":{"type":"string","enum":["sum","max","avg","count"]}},"required":["name","metricType","metricName","pricingModel","pricingTiers","billingCycle"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (billing:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/analytics_summary":{"post":{"operationId":"analytics_summary","summary":"Partner-level analytics summary (calls, minutes, revenue, customers).","tags":["analytics"],"x-partner-mcp-scope":"analytics:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (analytics:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/analytics_usage":{"post":{"operationId":"analytics_usage","summary":"Partner usage analytics (API call counts, rate-limit hits, etc.)","tags":["analytics"],"x-partner-mcp-scope":"analytics:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (analytics:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customer_report_get":{"post":{"operationId":"customer_report_get","summary":"Get a customer's automated-report configuration.","tags":["analytics"],"x-partner-mcp-scope":"analytics:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"}},"required":["customerId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (analytics:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customer_report_update":{"post":{"operationId":"customer_report_update","summary":"Update a customer's automated-report configuration.","tags":["analytics"],"x-partner-mcp-scope":"analytics:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"isEnabled":{"type":"boolean"},"frequency":{"type":"string","description":"none | daily | weekly","enum":["none","daily","weekly"]},"includedMetrics":{"type":"array","items":{"type":"string","enum":["agentName","totalCalls","totalDuration","avgDuration","successRate","failureRate"]},"description":"Non-empty subset of supported metric keys."}},"required":["customerId","isEnabled","frequency","includedMetrics"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (analytics:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customer_report_send_instant":{"post":{"operationId":"customer_report_send_instant","summary":"Send an ad-hoc report email to a customer now.","tags":["analytics"],"x-partner-mcp-scope":"analytics:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"recipients":{"type":"array","items":{"type":"string"}}},"required":["customerId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (analytics:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customer_report_logs":{"post":{"operationId":"customer_report_logs","summary":"List report-sending history for a customer.","tags":["analytics"],"x-partner-mcp-scope":"analytics:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"page":{"type":"number","default":1},"limit":{"type":"number","default":20}},"required":["customerId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (analytics:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/team_members_list":{"post":{"operationId":"team_members_list","summary":"List partner-level team members.","tags":["team"],"x-partner-mcp-scope":"team:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (team:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/team_members_invite":{"post":{"operationId":"team_members_invite","summary":"Invite a new partner team member.","tags":["team"],"x-partner-mcp-scope":"team:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"role":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"}},"required":["email","role"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (team:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/team_members_remove":{"post":{"operationId":"team_members_remove","summary":"Remove a partner team member.","tags":["team"],"x-partner-mcp-scope":"team:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"teamMemberId":{"type":"string"}},"required":["teamMemberId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (team:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customer_team_members_list":{"post":{"operationId":"customer_team_members_list","summary":"List team members associated with a customer.","tags":["team"],"x-partner-mcp-scope":"team:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"}},"required":["customerId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (team:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customer_team_members_add":{"post":{"operationId":"customer_team_members_add","summary":"Add a team member to a customer portal.","tags":["team"],"x-partner-mcp-scope":"team:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"}},"required":["customerId","email","role"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (team:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customer_team_members_update":{"post":{"operationId":"customer_team_members_update","summary":"Update a customer team-member's role/name.","tags":["team"],"x-partner-mcp-scope":"team:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"teamMemberId":{"type":"string"},"role":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"}},"required":["customerId","teamMemberId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (team:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customer_team_members_remove":{"post":{"operationId":"customer_team_members_remove","summary":"Remove a team member from a customer portal.","tags":["team"],"x-partner-mcp-scope":"team:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"teamMemberId":{"type":"string"}},"required":["customerId","teamMemberId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (team:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/whitelabel_settings_get":{"post":{"operationId":"whitelabel_settings_get","summary":"Get partner whitelabel settings (portal title, slogan, theme).","tags":["whitelabel"],"x-partner-mcp-scope":"whitelabel:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (whitelabel:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/whitelabel_settings_update":{"post":{"operationId":"whitelabel_settings_update","summary":"Update partner whitelabel settings.","tags":["whitelabel"],"x-partner-mcp-scope":"whitelabel:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"portalTitle":{"type":"string"},"portalSlogan":{"type":"string"},"themePreference":{"type":"string"},"basicPortalLanguage":{"type":"string"},"saasPortalLanguage":{"type":"string"}}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (whitelabel:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/whitelabel_domain_get":{"post":{"operationId":"whitelabel_domain_get","summary":"Get the partner custom domain configuration.","tags":["whitelabel"],"x-partner-mcp-scope":"whitelabel:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (whitelabel:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/whitelabel_domain_set":{"post":{"operationId":"whitelabel_domain_set","summary":"Set the partner custom domain and subdomain.","tags":["whitelabel"],"x-partner-mcp-scope":"whitelabel:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customDomain":{"type":"string"},"subdomain":{"type":"string"}}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (whitelabel:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/whitelabel_domain_verify":{"post":{"operationId":"whitelabel_domain_verify","summary":"Trigger verification of the partner custom domain (DNS + Cloudflare).","tags":["whitelabel"],"x-partner-mcp-scope":"whitelabel:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (whitelabel:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/branding_update":{"post":{"operationId":"branding_update","summary":"Update partner branding (logo, favicon, colors, font).","tags":["whitelabel"],"x-partner-mcp-scope":"whitelabel:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"logo":{"type":"string","description":"URL to logo image."},"logoSize":{"type":"string"},"favicon":{"type":"string"},"primaryColor":{"type":"string"},"secondaryColor":{"type":"string"},"fontFamily":{"type":"string"}}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (whitelabel:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/tool_quota_get":{"post":{"operationId":"tool_quota_get","summary":"Get a customer's tool-call quota usage + limits.","tags":["quota"],"x-partner-mcp-scope":"quota:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"}},"required":["customerId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (quota:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/tool_quota_update":{"post":{"operationId":"tool_quota_update","summary":"Update a customer's tool-call quota limits.","tags":["quota"],"x-partner-mcp-scope":"quota:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"dailyLimit":{"type":"number"},"monthlyLimit":{"type":"number"},"rateLimit":{"type":"number"}},"required":["customerId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (quota:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/tool_quota_checkout":{"post":{"operationId":"tool_quota_checkout","summary":"Purchase a paid tool-call quota tier for a customer (returns Stripe Checkout URL).","tags":["quota"],"x-partner-mcp-scope":"quota:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"tier":{"type":"string","enum":["basic","standard","premium","enterprise","unlimited"],"description":"Quota tier id. Use `tool_quota_get` first to see current tier."}},"required":["customerId","tier"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (quota:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/embed_tokens_list":{"post":{"operationId":"embed_tokens_list","summary":"List embed tokens (scoped per-customer).","tags":["embed"],"x-partner-mcp-scope":"embed:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"status":{"type":"string"}}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (embed:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/embed_tokens_create":{"post":{"operationId":"embed_tokens_create","summary":"⚠️ SENSITIVE — creates an embed token and returns the secret ONCE in the response body. An attacker could exfiltrate it and embed the customer's experience on attacker-controlled sites (subject to allowedDomains). Restrict via the `embed:write` scope if agent needs read-only access.","tags":["embed"],"x-partner-mcp-scope":"embed:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"expiresAt":{"type":"string"},"allowedDomains":{"type":"array","items":{"type":"string"}},"scopes":{"type":"array","items":{"type":"string"}}},"required":["customerId","name"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (embed:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/embed_tokens_revoke":{"post":{"operationId":"embed_tokens_revoke","summary":"Revoke an embed token.","tags":["embed"],"x-partner-mcp-scope":"embed:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"tokenId":{"type":"string"}},"required":["tokenId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (embed:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/memory_list_minds":{"post":{"operationId":"memory_list_minds","summary":"List the Minds (memory banks) for a customer (optionally filtered to one agent).","tags":["memory"],"x-partner-mcp-scope":"memory:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","description":"The customer whose Minds to list."},"agentId":{"type":"string","description":"Optional — only Minds for this agent."}},"required":["customerId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (memory:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/memory_create_mind":{"post":{"operationId":"memory_create_mind","summary":"Create (or ensure) a named Mind for a customer or agent.","tags":["memory"],"x-partner-mcp-scope":"memory:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"scope":{"type":"string","enum":["customer","agent"],"default":"customer","description":"Which Mind: the customer's shared Mind, or a specific agent's Mind (requires agentId)."},"agentId":{"type":"string","description":"Required when scope = \"agent\"."},"name":{"type":"string","description":"Display name for the Mind, e.g. \"VIP callers\"."},"description":{"type":"string"},"bankKey":{"type":"string","description":"Optional stable key to namespace a project/automation Mind."}},"required":["customerId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (memory:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/memory_remember":{"post":{"operationId":"memory_remember","summary":"Capture one or more facts/messages into a Mind (the agent will remember them next time). Charges ingest.","tags":["memory"],"x-partner-mcp-scope":"memory:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"scope":{"type":"string","enum":["customer","agent"],"default":"customer","description":"Which Mind: the customer's shared Mind, or a specific agent's Mind (requires agentId)."},"agentId":{"type":"string"},"bankKey":{"type":"string"},"messages":{"type":"array","description":"The turns/facts to remember.","items":{"type":"object","properties":{"content":{"type":"string"},"author":{"type":"string","enum":["user","agent"],"description":"Who said it (default user)."}},"required":["content"]},"minItems":1}},"required":["customerId","messages"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (memory:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/memory_recall":{"post":{"operationId":"memory_recall","summary":"Recall what a Mind knows — its Profile (evolving understanding), Snapshot (quick bio), and recent messages. Free.","tags":["memory"],"x-partner-mcp-scope":"memory:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"scope":{"type":"string","enum":["customer","agent"],"default":"customer","description":"Which Mind: the customer's shared Mind, or a specific agent's Mind (requires agentId)."},"agentId":{"type":"string"},"bankKey":{"type":"string"},"includeMessages":{"type":"boolean","description":"Include recent stored messages."}},"required":["customerId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (memory:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/memory_ask":{"post":{"operationId":"memory_ask","summary":"Ask a Mind a natural-language question (dialectic recall). Charges one query, weighted by reasoning level.","tags":["memory"],"x-partner-mcp-scope":"memory:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"scope":{"type":"string","enum":["customer","agent"],"default":"customer","description":"Which Mind: the customer's shared Mind, or a specific agent's Mind (requires agentId)."},"agentId":{"type":"string"},"bankKey":{"type":"string"},"query":{"type":"string","description":"The question to ask the Mind."},"reasoningLevel":{"type":"string","enum":["minimal","low","medium","high","max"],"description":"Higher = deeper reasoning, higher cost. Default low."}},"required":["customerId","query"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (memory:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/payment_links_create":{"post":{"operationId":"payment_links_create","summary":"Mint a Stripe Checkout link that sells ONE experience / feature bundle from the partner's own landing page. The buyer pays the PARTNER directly (Stripe Connect on their connected account) — no platform credits are involved. THE WEBHOOK GRANTS ACCESS. The returned url is just where the buyer pays; entitlement is applied when our signature-verified Stripe webhook confirms the payment settled. The buyer's redirect back to successUrl is UX only and proves nothing — never tell anyone they are provisioned until payment_links_status reports paid=true. Requires the payments:write scope (a customers/CRM key deliberately cannot mint money links) and a connected Stripe account with charges enabled. successUrl and cancelUrl must be https on one of YOUR approved redirect domains — the guard that keeps a leaked key from redirecting paying buyers off your property. experienceType must be one of your own experiences (call customers_capabilities to list them); unlike customers_onboard it is a HARD refusal here, because a buyer is about to pay for it. features are REQUESTS: your partner master switches are re-applied at grant time, and anything clamped shows up in the status result's warnings.","tags":["payments"],"x-partner-mcp-scope":"payments:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","description":"Sell to an EXISTING customer of yours. Optional — omit it for a brand-new prospect and pass `email` instead; the webhook then resolves or creates the account idempotently."},"email":{"type":"string","description":"Buyer email. Required unless `customerId` is given (and that record has an email). Lower-cased server-side, and pre-filled into the Stripe checkout."},"amount":{"type":"number","description":"Integer MINOR UNITS (cents/pence) — 9900 means £99.00, not £9,900. Fractional or string amounts are refused rather than rounded. Bounds are partner-configurable; the shipped default range is 100–5,000,000."},"currency":{"type":"string","description":"Presentment currency, lower-case. One of: usd, gbp, eur, aud, cad, sgd, inr."},"interval":{"type":"string","enum":["one_time","month","year"],"description":"\"one_time\" mints a one-off payment; \"month\" / \"year\" mint a Stripe subscription on your connected account."},"experienceType":{"type":"string","description":"The experience to grant on payment. Must be one of YOUR PartnerExperience rows — an unknown value is refused (400), not warned. List valid values with customers_capabilities."},"features":{"type":"object","description":"PlanFeatures-shaped grants applied on payment, through the same pipeline as customers_onboard: defaults, then these, then your partner master clamps LAST. Master-gated keys are requests, not guarantees; clamps are stored on the intent and returned by payment_links_status as warnings.","additionalProperties":true},"successUrl":{"type":"string","description":"Where Stripe sends the buyer after paying. https, on one of your approved redirect domains. Supports Stripe's {CHECKOUT_SESSION_ID} placeholder — put it in the query string and your thank-you page can confirm the sale with payment_links_status."},"cancelUrl":{"type":"string","description":"Where Stripe sends a buyer who abandons checkout. Same domain rules as successUrl."},"description":{"type":"string","description":"Buyer-visible product name on the Stripe page (max 300 chars). Defaults to the experience display name, then your business name. Keep it your own copy."},"expiresAt":{"type":"string","description":"ISO-8601 date-time after which the link grants nothing. Must be in the future and within the configured maximum (shipped default: 30 days). Defaults to 24 hours."}},"required":["amount","currency","interval","successUrl","cancelUrl"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (payments:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/payment_links_status":{"post":{"operationId":"payment_links_status","summary":"The ONLY trustworthy answer to \"did this buyer actually pay, and what did they get?\". Reads the intent row our signature-verified Stripe webhook writes — never the buyer's redirect, which anyone who can edit a URL can fake. Look up by intentId (returned by payment_links_create) or by stripeSessionId (what Stripe substitutes into a {CHECKOUT_SESSION_ID} placeholder in your successUrl, i.e. all a thank-you page has). ALWAYS read `paid` and `warnings`: paid=true is the only proof of fulfilment, and warnings lists any requested feature your partner master switches clamped at grant time — a customer can legitimately be paid-up and still not have everything the link offered. Read-only. Needs payments:read; a payments:write key can also read back the links it minted.","tags":["payments"],"x-partner-mcp-scope":"payments:read","x-partner-mcp-alt-scopes":["payments:write"],"security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"intentId":{"type":"string","description":"The payment-link intent id returned by payment_links_create. Preferred when you have it."},"stripeSessionId":{"type":"string","description":"Stripe Checkout session id (cs_…). Use this when all you have is the {CHECKOUT_SESSION_ID} value Stripe put in your successUrl."}}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (payments:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/campaigns_list":{"post":{"operationId":"campaigns_list","summary":"List this partner's outbound calling campaigns, newest first. Use it to find a campaign id before starting, pausing or adding prospects.","tags":["campaigns"],"x-partner-mcp-scope":"campaigns:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["draft","scheduled","running","paused","completed","cancelled"],"description":"OPTIONAL — only campaigns in this state."},"page":{"type":"number","description":"OPTIONAL — 1-based page number."},"pageSize":{"type":"number","description":"OPTIONAL — rows per page (max 100)."}}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (campaigns:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/campaigns_get":{"post":{"operationId":"campaigns_get","summary":"Get one campaign: its schedule, calling window, assigned agent and counts.","tags":["campaigns"],"x-partner-mcp-scope":"campaigns:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"campaignId":{"type":"string"}},"required":["campaignId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (campaigns:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/campaigns_create":{"post":{"operationId":"campaigns_create","summary":"Create an outbound calling campaign for one of this partner's customers. It is created in 'draft' — add prospects, then call campaigns_start. The calling window is in the campaign's OWN timezone and defaults to 09:00-17:00 Mon-Fri: a campaign is silent outside it, which is the usual reason a new campaign never dials.","tags":["campaigns"],"x-partner-mcp-scope":"campaigns:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"What the partner will recognise it by."},"customerId":{"type":"string","description":"The CUSTOMER id that owns this campaign (not a UserOnboarding id — use customers_list to resolve one)."},"agentId":{"type":"string","description":"The agent that will place the calls. Use campaigns_agents to list eligible ones."},"agentProvider":{"type":"string","enum":["knova","retell","vapi"],"description":"Which stack the agent runs on. Defaults to 'knova'."},"timezone":{"type":"string","description":"IANA name, e.g. 'Europe/London'. Defaults to the partner's."},"callStartHour":{"type":"number","description":"OPTIONAL — 0-23, inclusive. Sent as 9 if omitted."},"callEndHour":{"type":"number","description":"OPTIONAL — 0-24, EXCLUSIVE. Sent as 17 if omitted."},"callDays":{"type":"array","items":{"type":"number"},"description":"OPTIONAL — ISO weekdays, 1=Mon..7=Sun. Default [1,2,3,4,5]."},"callsPerDay":{"type":"number","description":"OPTIONAL — daily cap. Omit for unlimited."},"maxConcurrent":{"type":"number","description":"OPTIONAL — simultaneous calls. Default 1."},"allowCustomerProspectUpload":{"type":"boolean","description":"OPTIONAL — let the customer add prospects themselves from their own portal."},"scheduledAt":{"type":"string","description":"OPTIONAL — ISO time to start automatically."}},"required":["name","customerId","agentId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (campaigns:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/campaigns_update":{"post":{"operationId":"campaigns_update","summary":"Change a campaign — its name, calling window, caps or assigned agent. Only the fields you pass change.","tags":["campaigns"],"x-partner-mcp-scope":"campaigns:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"campaignId":{"type":"string"},"name":{"type":"string"},"agentId":{"type":"string"},"timezone":{"type":"string"},"callStartHour":{"type":"number"},"callEndHour":{"type":"number"},"callDays":{"type":"array","items":{"type":"number"}},"callsPerDay":{"type":"number"},"maxConcurrent":{"type":"number"},"allowCustomerProspectUpload":{"type":"boolean"}},"required":["campaignId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (campaigns:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/campaigns_prospects_list":{"post":{"operationId":"campaigns_prospects_list","summary":"List the people a campaign will call, with their status and per-call variables.","tags":["campaigns"],"x-partner-mcp-scope":"campaigns:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"campaignId":{"type":"string"},"status":{"type":"string","enum":["pending","calling","completed","failed","dnc","opted_out"],"description":"OPTIONAL — only prospects in this state."},"q":{"type":"string","description":"OPTIONAL — search name, email or number."},"page":{"type":"number","description":"OPTIONAL — 1-based page number."},"pageSize":{"type":"number","description":"OPTIONAL — rows per page (max 100)."}},"required":["campaignId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (campaigns:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/campaigns_prospects_add":{"post":{"operationId":"campaigns_prospects_add","summary":"Add ONE person to a campaign, with the per-call variables that personalise their call. `customFields` is how a call says something specific — {\"offer_name\": \"Premium Care Plan\"} lets the agent say \"about your Premium Care Plan\". IMPORTANT: every name you use here must ALSO be declared on the agent (advancedConfig.dynamicVariables) and referenced in its prompt as {{offer_name}} — an undeclared name resolves to nothing and the words around it are silently dropped. Names are lower_snake_case; first_name, last_name, email, phone_number and campaign_name are supplied automatically, so do not set them here.","tags":["campaigns"],"x-partner-mcp-scope":"campaigns:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"campaignId":{"type":"string"},"phoneNumber":{"type":"string","description":"E.164 with country code, e.g. +447700900123."},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"customFields":{"type":"object","description":"Per-call variables for THIS person, as flat name/value pairs. Names must match the {{placeholders}} declared on the agent.","additionalProperties":{"type":"string"}},"notes":{"type":"string","description":"OPTIONAL — internal note, never spoken."}},"required":["campaignId","phoneNumber"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (campaigns:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/campaigns_start":{"post":{"operationId":"campaigns_start","summary":"Start a campaign dialling. It still only calls inside its calling window, so a start outside those hours takes effect when the window next opens.","tags":["campaigns"],"x-partner-mcp-scope":"campaigns:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"campaignId":{"type":"string"}},"required":["campaignId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (campaigns:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/campaigns_pause":{"post":{"operationId":"campaigns_pause","summary":"Pause a running campaign. Calls already connected are not cut off.","tags":["campaigns"],"x-partner-mcp-scope":"campaigns:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"campaignId":{"type":"string"}},"required":["campaignId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (campaigns:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/campaigns_resume":{"post":{"operationId":"campaigns_resume","summary":"Resume a paused campaign.","tags":["campaigns"],"x-partner-mcp-scope":"campaigns:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"campaignId":{"type":"string"}},"required":["campaignId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (campaigns:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/campaigns_cancel":{"post":{"operationId":"campaigns_cancel","summary":"Cancel a campaign for good. Cannot be undone — pause it instead if it may run again.","tags":["campaigns"],"x-partner-mcp-scope":"campaigns:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"campaignId":{"type":"string"}},"required":["campaignId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (campaigns:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/campaigns_stats":{"post":{"operationId":"campaigns_stats","summary":"Progress for one campaign: attempted, connected, failed, and how many remain.","tags":["campaigns"],"x-partner-mcp-scope":"campaigns:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"campaignId":{"type":"string"}},"required":["campaignId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (campaigns:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/campaigns_calls":{"post":{"operationId":"campaigns_calls","summary":"The calls a campaign has placed, with outcome and duration.","tags":["campaigns"],"x-partner-mcp-scope":"campaigns:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"campaignId":{"type":"string"},"outcome":{"type":"string","enum":["answered","completed","voicemail","no_answer","busy","rejected","failed"],"description":"OPTIONAL — only calls with this outcome."},"page":{"type":"number","description":"OPTIONAL — 1-based page number."},"pageSize":{"type":"number","description":"OPTIONAL — rows per page (max 100)."}},"required":["campaignId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (campaigns:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/campaigns_agents":{"post":{"operationId":"campaigns_agents","summary":"Agents eligible to run a campaign — call this before campaigns_create to pick a valid agentId.","tags":["campaigns"],"x-partner-mcp-scope":"campaigns:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","description":"OPTIONAL — only agents belonging to this customer."}}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (campaigns:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/integration_pricing_get":{"post":{"operationId":"integration_pricing_get","summary":"Get the partner's integration-app pricing configuration: the master charging switch, profit multiplier, per-app credit overrides / unlock fees, and per-experience on/off overrides. All prices are expressed in customer AI credits. Mirrors the /partner/settings/integration-pricing page.","tags":["billing"],"x-partner-mcp-scope":"billing:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (billing:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/integration_pricing_update":{"post":{"operationId":"integration_pricing_update","summary":"Update the partner's integration-app pricing configuration: the master charging switch (`enabled`), the profit multiplier (1.0-5.0) applied to the base per-call rate, per-app overrides (`apps`: `creditsPerCall` / `unlockCredits` — leaving both null on an app removes its override row), and per-experience on/off/inherit overrides (`experiences`). All prices, including the one-time unlock fee, are in customer AI credits. Mirrors the /partner/settings/integration-pricing page.","tags":["billing"],"x-partner-mcp-scope":"billing:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Master switch: charge customers for integration-app tool calls at all."},"profitMultiplier":{"type":"number","minimum":1,"maximum":5,"description":"Multiplier applied to the base per-call rate for apps with no per-app override. Bounds 1.0-5.0."},"apps":{"type":"array","items":{"type":"object","properties":{"appName":{"type":"string","description":"PARTNER_APP_CATALOG app name."},"creditsPerCall":{"type":["number","null"],"description":"Per-app override, in customer AI credits. null = use the computed default (base rate x profitMultiplier)."},"unlockCredits":{"type":["number","null"],"description":"One-time unlock fee, in customer AI credits. null = no unlock required."}},"required":["appName"]},"description":"Per-app price overrides. An entry with both creditsPerCall and unlockCredits set to null removes that app's override row entirely."},"experiences":{"type":"array","items":{"type":"object","properties":{"experienceType":{"type":"string"},"chargingEnabled":{"type":["boolean","null"],"description":"true/false forces charging on/off for customers on this experience; null inherits the partner default."}},"required":["experienceType","chargingEnabled"]},"description":"Per-experience on/off/inherit overrides."}}}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (billing:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/customer_integration_charging_set":{"post":{"operationId":"customer_integration_charging_set","summary":"Set or clear one customer's integration-app charging override. `enabled: true` or `false` forces charging on/off for that customer; `enabled: null` clears the override so the customer inherits the partner default configured on the /partner/settings/integration-pricing page. Thin proxy onto the same field customers_update exposes as integrationChargingEnabled.","tags":["customers"],"x-partner-mcp-scope":"customers:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string"},"enabled":{"type":["boolean","null"],"description":"true/false forces the override; null clears it (inherit the partner default)."}},"required":["customerId","enabled"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (customers:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/media_list":{"post":{"operationId":"media_list","summary":"List files in a customer's media & document library. WITHOUT `type` you get the MEDIA lane only (images, video, audio) — that is the default every existing consumer relies on; pass type: 'all' to include documents, or 'document' for documents only. Private documents come back with publicUrl: null and downloadable: true — fetch them with media_get_download_url, never by guessing a storage URL.","tags":["media"],"x-partner-mcp-scope":"media:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","description":"The customer whose library to act on. Must belong to this partner."},"type":{"type":"string","enum":["image","video","audio","document","all"],"description":"Omit for the media lane (images/video/audio), 'all' for both lanes, or name one kind — 'image', 'video', 'audio' or 'document'."},"folderId":{"type":"string","description":"Restrict to one folder. 'root' means the top level. Omit for no folder filter."},"search":{"type":"string","description":"Substring match on the file name."},"limit":{"type":"number","description":"Page size (default 50, max 100)."},"offset":{"type":"number","description":"Rows to skip, for paging."}},"required":["customerId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (media:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/media_list_folders":{"post":{"operationId":"media_list_folders","summary":"List the folders directly inside one folder of a customer's library, plus the breadcrumb back to the root. Folders are metadata only — moving a file between them never moves its bytes. Omit parentFolderId (or pass 'root') for the top level.","tags":["media"],"x-partner-mcp-scope":"media:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","description":"The customer whose library to act on. Must belong to this partner."},"parentFolderId":{"type":"string","description":"The folder to look inside. Omit or 'root' for the top level."}},"required":["customerId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (media:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/media_create_folder":{"post":{"operationId":"media_create_folder","summary":"Create a folder in a customer's library. Name is 1–80 characters and cannot contain '/'; folders nest up to 10 levels; a duplicate name in the same parent is refused. Needs the customer's Docs & Media feature.","tags":["media"],"x-partner-mcp-scope":"media:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","description":"The customer whose library to act on. Must belong to this partner."},"name":{"type":"string","description":"Folder name, 1–80 characters, no slashes."},"parentFolderId":{"type":"string","description":"Parent folder id. Omit to create the folder at the top level."}},"required":["customerId","name"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (media:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/media_upload_url":{"post":{"operationId":"media_upload_url","summary":"Step 1 of an upload: ask for a presigned URL for one file in a customer's library. The bytes DO NOT pass through this gateway — PUT them straight to the returned `uploadUrl` with the returned `headers` (the URL expires in 15 minutes), then call media_confirm_upload with BOTH the returned `storageKey` AND the returned `name` to register the file. The ticket answers with a `name` (the display name the file should be registered under) for exactly that reason: a DOCUMENT's storage key is a uuid with no file name in it, so a document confirm that omits `name` is refused — keep both values from this result until the confirm has succeeded. `sizeBytes` is checked against the cap and the customer's storage quota before the URL is minted, and again against the real object at confirm. Send exactly the returned `headers` on the PUT — they are part of the signature, and a PUT missing any of them is refused. The link is SINGLE-USE: a 412 means it was already used, so the bytes are there — go on to media_confirm_upload, or request a new URL if you need to upload again.","tags":["media"],"x-partner-mcp-scope":"media:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","description":"The customer whose library to act on. Must belong to this partner."},"fileName":{"type":"string","description":"Original file name, including its extension."},"mimeType":{"type":"string","description":"Content type, e.g. application/pdf, image/png. Documents (pdf/doc/docx/xls/xlsx/ppt/pptx/txt/md/csv/json/zip) need the Docs & Media feature."},"sizeBytes":{"type":"number","description":"Size of the file in bytes."},"folderId":{"type":"string","description":"Folder to file it into. Omit for the top level."}},"required":["customerId","fileName","mimeType","sizeBytes"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (media:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/media_confirm_upload":{"post":{"operationId":"media_confirm_upload","summary":"Step 2 of an upload: register the object you PUT to the presigned URL as a file in the library. Pass the `storageKey` media_upload_url returned, and — for a DOCUMENT, i.e. a storageKey beginning 't/' — the `name` it returned as well: a document key is a uuid, so there is nothing in it to name the file after and a confirm without `name` is refused. A picture or video may omit `name` and keeps the uploaded file name. Safe to retry — a repeat returns the same file with `created: false` instead of a duplicate. The server measures the real object, so an upload that never happened is refused here rather than recorded.","tags":["media"],"x-partner-mcp-scope":"media:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","description":"The customer whose library to act on. Must belong to this partner."},"storageKey":{"type":"string","description":"The `storageKey` returned by media_upload_url."},"mimeType":{"type":"string","description":"The same content type the upload was signed with."},"name":{"type":"string","description":"Display name for the file. REQUIRED for a DOCUMENT (a storageKey beginning 't/') — echo the `name` media_upload_url returned, because a document's storage key is a uuid with no file name to fall back on. Optional for a picture or video, which default to the uploaded file name."},"folderId":{"type":"string","description":"Folder to file it into. Omit for the top level."}},"required":["customerId","storageKey","mimeType"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (media:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/media_get_download_url":{"post":{"operationId":"media_get_download_url","summary":"Get a time-limited link to one file's bytes. For a private document this is the ONLY way in — the link is signed, defaults to 5 minutes (ttlSeconds steers it within 60–3600) and downloads under the file's own name. For a public image or video it returns the URL the file already has, so you never have to know which store it lives in. Download from the returned `url` directly; the bytes do not pass through this gateway.","tags":["media"],"x-partner-mcp-scope":"media:read","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","description":"The customer whose library to act on. Must belong to this partner."},"assetId":{"type":"string","description":"Id of the file, from media_list."},"ttlSeconds":{"type":"number","description":"How long the link stays valid, 60–3600 seconds. Default 300."}},"required":["customerId","assetId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (media:read).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools/media_delete":{"post":{"operationId":"media_delete","summary":"Permanently delete one file from a customer's library — the stored object as well as the row — and free its storage. Refused (409 MEDIA_IN_USE) while a scheduled social post still references it. Needs the customer's Docs & Media feature.","tags":["media"],"x-partner-mcp-scope":"media:write","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","description":"The customer whose library to act on. Must belong to this partner."},"assetId":{"type":"string","description":"Id of the file to delete, from media_list."}},"required":["customerId","assetId"]}}}},"responses":{"200":{"description":"Tool executed. `isError: true` inside the body indicates a main-app domain error (not a transport error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Malformed body, missing required input, or unknown tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing / invalid / revoked / expired `pkt_` key, or key has `mcpEnabled: false`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"},"description":"Bearer challenge pointing at the Protected Resource Metadata URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key does not hold the required scope (media:write).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily or monthly rate limit exceeded. `Retry-After` header set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/tools":{"get":{"operationId":"listTools","summary":"List all tools visible to the authenticated key (scope-filtered).","tags":["discovery"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Tool list.","content":{"application/json":{"schema":{"type":"object","properties":{"tools":{"type":"array","items":{"$ref":"#/components/schemas/ToolSummary"}}}}}}},"401":{"description":"Unauthenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/partner-rest/openapi.json":{"get":{"operationId":"getOpenApiSpec","summary":"This OpenAPI document, scoped to the authenticated key when a bearer is supplied.","tags":["discovery"],"security":[],"responses":{"200":{"description":"OpenAPI 3.1 document.","content":{"application/json":{"schema":{"type":"object"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"pkt","description":"Partner API key (pkt_...). Tokens are minted in the partner dashboard and carry per-domain scopes (e.g. `customers:read`, `vps:*`, `*`)."}},"schemas":{"ToolResult":{"type":"object","description":"MCP tool result envelope. `content[0].text` holds the tool output (typically JSON). `isError: true` means the tool handler reported a domain error (e.g. main-app 4xx) rather than a transport error.","properties":{"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"]}},"isError":{"type":"boolean"}},"required":["content"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"integer","description":"JSON-RPC error code for parity with the MCP path."},"message":{"type":"string"},"data":{"type":"object","properties":{"type":{"type":"string","description":"Machine-readable error class."}}}},"required":["message"]}}},"ToolSummary":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"requiredScope":{"type":["string","null"]},"inputSchema":{"type":"object"}}}}}}