{"openapi":"3.1.0","info":{"title":"Sinwan API","description":"Voice agents for call centers: agents, knowledge bases, phone numbers, calls, campaigns, contacts and leads, post-call deliveries and billing.\n\nAuthenticate with an API key in the `X-API-Key` header (create one in the console or over `/v1/api-keys`) or with an OAuth 2.1 bearer token (authorization code + PKCE S256, dynamic client registration at `/oauth/register`; metadata at `/.well-known/oauth-authorization-server`). Every operation lists the scope it needs. The same surface is available to MCP clients at `/mcp`.\n","version":"0.1.0"},"paths":{"/health":{"get":{"tags":["health"],"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Health Get"}}}}}}},"/.well-known/oauth-authorization-server":{"get":{"tags":["oauth"],"summary":"Authorization Server Metadata","description":"RFC 8414 discovery document MCP clients bootstrap from.","operationId":"authorization_server_metadata__well_known_oauth_authorization_server_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Authorization Server Metadata  Well Known Oauth Authorization Server Get"}}}}}}},"/.well-known/jwks.json":{"get":{"tags":["oauth"],"summary":"Jwks","description":"Public keys resource servers verify access tokens against.","operationId":"jwks__well_known_jwks_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Jwks  Well Known Jwks Json Get"}}}}}}},"/oauth/register":{"post":{"tags":["oauth"],"summary":"Register","description":"Dynamic Client Registration (RFC 7591) — how Claude self-registers.","operationId":"register_oauth_register_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Metadata"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Register Oauth Register Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/authorize":{"get":{"tags":["oauth"],"summary":"Authorize","operationId":"authorize_oauth_authorize_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["oauth"],"summary":"Decide","operationId":"decide_oauth_authorize_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentDecisionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentRedirect"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/oauth/token":{"post":{"tags":["oauth"],"summary":"Token","operationId":"token_oauth_token_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/revoke":{"post":{"tags":["oauth"],"summary":"Revoke","operationId":"revoke_oauth_revoke_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/webhooks/{provider}/voice":{"post":{"tags":["webhooks"],"summary":"Voice","description":"Incoming-call callback. Answers with the provider's voice response dialect (TwiML for Twilio) connecting the call's audio to the media streamer, or rejecting it when the number isn't serviceable.","operationId":"voice_webhooks__provider__voice_post","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/{provider}/status":{"post":{"tags":["webhooks"],"summary":"Status","description":"Call-status callback. Records the event and advances the call lifecycle; duplicate and out-of-order deliveries are no-ops.","operationId":"status_webhooks__provider__status_post","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/{provider}/amd":{"post":{"tags":["webhooks"],"summary":"Amd","description":"Asynchronous answering-machine-detection callback. Records the verdict on the call and hangs up machine-answered calls; duplicate deliveries are no-ops.","operationId":"amd_webhooks__provider__amd_post","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/{provider}/recording":{"post":{"tags":["webhooks"],"summary":"Recording","description":"Recording callback. Stores the provider's recording reference on the call; media ingestion into our storage happens asynchronously.","operationId":"recording_webhooks__provider__recording_post","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/{provider}/human/gather":{"post":{"tags":["webhooks"],"summary":"Human Gather","description":"A connect leg's key press (PLAN-human-in-the-loop §7). ``r`` is the human request and ``a`` the attempt. A 1 puts the recipient in the room to wait for the caller — dialing the caller at once when their call is already over; anything else hangs up and fails the attempt.","operationId":"human_gather_webhooks__provider__human_gather_post","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}},{"name":"r","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"R"}},{"name":"a","in":"query","required":true,"schema":{"type":"integer","title":"A"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/{provider}/human/wait":{"post":{"tags":["webhooks"],"summary":"Human Wait","description":"The room's wait URL, requested every few seconds while the recipient waits alone — the heartbeat that dials the caller in when the live call was not moved within the deadline, and ends an attempt that failed.","operationId":"human_wait_webhooks__provider__human_wait_post","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}},{"name":"r","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"R"}},{"name":"a","in":"query","required":true,"schema":{"type":"integer","title":"A"}},{"name":"loop","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Loop"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/tranzila/notify/{token}":{"get":{"tags":["webhooks"],"summary":"Tranzila Notify","description":"Tranzila's notify for a hosted-page charge (PLAN-console D27). The URL, secret segment included, is configured in the terminal's Security settings and never passed to the payment page; a notify whose amount and currency match the purchase credits it exactly once, a replay is a no-op, and the answer is always the literal OK the processor expects.","operationId":"tranzila_notify_webhooks_tranzila_notify__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["webhooks"],"summary":"Tranzila Notify","description":"Tranzila's notify for a hosted-page charge (PLAN-console D27). The URL, secret segment included, is configured in the terminal's Security settings and never passed to the payment page; a notify whose amount and currency match the purchase credits it exactly once, a replay is a no-op, and the answer is always the literal OK the processor expects.","operationId":"tranzila_notify_webhooks_tranzila_notify__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/{provider}/sms-status":{"post":{"tags":["webhooks"],"summary":"Sms Status","description":"Message-status callback for form-link SMS, for the texts a human\nrequest sends and for the messages an agent texts the caller. Routes by\nMessageSid to the row it belongs to; late callbacks for superseded\nattempts update their own row and touch nothing current.","operationId":"sms_status_webhooks__provider__sms_status_post","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/signup":{"post":{"tags":["auth"],"summary":"Signup","operationId":"signup_v1_auth_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/login":{"post":{"tags":["auth"],"summary":"Login","operationId":"login_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/otp/verify":{"post":{"tags":["auth"],"summary":"Verify Otp","operationId":"verify_otp_v1_auth_otp_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyOtpRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifiedSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/otp/resend":{"post":{"tags":["auth"],"summary":"Resend Otp","operationId":"resend_otp_v1_auth_otp_resend_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendOtpRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtpResendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/password/forgot":{"post":{"tags":["auth"],"summary":"Forgot Password","description":"Email a reset code. Always 202 with a challenge id, so the endpoint\ncannot be used to learn which addresses have an account.","operationId":"forgot_password_v1_auth_password_forgot_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetChallengeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/password/reset":{"post":{"tags":["auth"],"summary":"Reset Password","description":"Set a new password with the emailed code. Signs the person out of every\nconsole session and forgets every trusted browser.","operationId":"reset_password_v1_auth_password_reset_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/phone":{"post":{"tags":["auth"],"summary":"Start Phone Verification","description":"Send a code to a number the signed-in user claims. Nothing about\nsign-in changes until the code comes back and the flag is on.","operationId":"start_phone_verification_v1_auth_phone_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartPhoneVerificationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneChallengeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/auth/phone/verify":{"post":{"tags":["auth"],"summary":"Confirm Phone Verification","operationId":"confirm_phone_verification_v1_auth_phone_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmPhoneVerificationRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/auth/me":{"get":{"tags":["auth"],"summary":"Me","operationId":"me_v1_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"patch":{"tags":["auth"],"summary":"Update Me","description":"Change the signed-in person's name or console language.","operationId":"update_me_v1_auth_me_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/auth/context":{"get":{"tags":["auth"],"summary":"Context","operationId":"context_v1_auth_context_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextResponse"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/auth/session/login":{"post":{"tags":["auth"],"summary":"Session Login","description":"Password sign-in; the OTP step answers 403 ``otp_required`` exactly like\n``/v1/auth/login``. The trusted-browser cookie set by ``otp/verify`` skips\nthe challenge next time.","operationId":"session_login_v1_auth_session_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsoleSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/session/otp/verify":{"post":{"tags":["auth"],"summary":"Session Verify Otp","operationId":"session_verify_otp_v1_auth_session_otp_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyOtpRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsoleSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/session/exchange":{"post":{"tags":["auth"],"summary":"Session Exchange","description":"Redeem the login code a provider callback handed the browser.","operationId":"session_exchange_v1_auth_session_exchange_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeCodeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsoleSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/session/refresh":{"post":{"tags":["auth"],"summary":"Session Refresh","description":"Rotate the refresh cookie and mint a new access cookie. 401\n``session_expired`` (cookies cleared) when the sign-in is over.","operationId":"session_refresh_v1_auth_session_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsoleSessionResponse"}}}}}}},"/v1/auth/session/logout":{"post":{"tags":["auth"],"summary":"Session Logout","description":"End the sign-in everywhere this refresh family was used.","operationId":"session_logout_v1_auth_session_logout_post","responses":{"204":{"description":"Successful Response"}}}},"/v1/auth/session/switch-tenant":{"post":{"tags":["auth"],"summary":"Session Switch Tenant","description":"Move the sign-in to another workspace the person belongs to.","operationId":"session_switch_tenant_v1_auth_session_switch_tenant_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwitchTenantRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsoleSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/api-keys":{"get":{"tags":["api-keys"],"summary":"List Keys","operationId":"list_keys_v1_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ApiKeyOut"},"type":"array","title":"Response List Keys V1 Api Keys Get"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"post":{"tags":["api-keys"],"summary":"Create Key","operationId":"create_key_v1_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/api-keys/{key_id}":{"delete":{"tags":["api-keys"],"summary":"Revoke Key","operationId":"revoke_key_v1_api_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/members":{"get":{"tags":["members"],"summary":"List Members","description":"Everyone in the workspace with their role and the channels they verified. Any member may look; a dashboard session is required.","operationId":"list_members_v1_members_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberListOut"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/members/{user_id}":{"patch":{"tags":["members"],"summary":"Update Role","description":"Change a member's role (owner or admin). Only an owner grants or removes the owner role and nobody changes their own, so the workspace keeps its owner.","operationId":"update_role_v1_members__user_id__patch","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberRoleUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"delete":{"tags":["members"],"summary":"Remove Member","description":"Remove a member (owner or admin). An admin cannot remove an owner and nobody removes themselves. The member's console session ends at its next refresh.","operationId":"remove_member_v1_members__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/invitations":{"get":{"tags":["members"],"summary":"List Invitations","description":"Open and lapsed invitations, newest first (owner or admin).","operationId":"list_invitations_v1_invitations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationListOut"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"post":{"tags":["members"],"summary":"Create Invitation","description":"Invite an address with a role (owner or admin): an email with a seven-day link goes out; a newer invitation to the same address supersedes the open one. A brand-new account created with that address joins at signup; an existing account accepts by link.","operationId":"create_invitation_v1_invitations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/invitations/{invitation_id}/resend":{"post":{"tags":["members"],"summary":"Resend Invitation","description":"Send the invitation again with a fresh link and window (owner or admin); the previous link stops working. At most once a minute.","operationId":"resend_invitation_v1_invitations__invitation_id__resend_post","parameters":[{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invitation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/invitations/{invitation_id}":{"delete":{"tags":["members"],"summary":"Revoke Invitation","description":"Withdraw an open invitation (owner or admin).","operationId":"revoke_invitation_v1_invitations__invitation_id__delete","parameters":[{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invitation Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/invitations/lookup":{"get":{"tags":["members"],"summary":"Lookup Invitation","description":"What an invitation link leads to — the workspace, the address, the role and whether it is still open. The token is the credential; no session is needed.","operationId":"lookup_invitation_v1_invitations_lookup_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","minLength":8,"maxLength":255,"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationLookupOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invitations/accept":{"post":{"tags":["members"],"summary":"Accept Invitation","description":"Accept an invitation as the signed-in user, whose address must be the invited one; the membership carries the invited role. Idempotent for a member invited twice.","operationId":"accept_invitation_v1_invitations_accept_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationAcceptRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationAcceptedOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/assistant-connections":{"get":{"tags":["assistant-connections"],"summary":"List Connections","description":"The assistants connected to this workspace over OAuth, oldest first, with who connected each and when it was last active. Any member may look; a dashboard session is required.","operationId":"list_connections_v1_assistant_connections_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantConnectionListOut"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/assistant-connections/{connection_id}":{"delete":{"tags":["assistant-connections"],"summary":"Disconnect","description":"Disconnect an assistant: its grant, refresh tokens and pending codes are revoked, so it loses access when its current access token lapses (at most 10 minutes). Members disconnect their own; an owner or admin disconnects anyone's.","operationId":"disconnect_v1_assistant_connections__connection_id__delete","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/tenant":{"get":{"tags":["tenant"],"summary":"Get Tenant","description":"The workspace's settings.","operationId":"get_tenant_v1_tenant_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantSettingsOut"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"patch":{"tags":["tenant"],"summary":"Update Tenant","description":"Change the workspace's settings (owner or admin): name, time zone, default console language, country, industry, website, the language new agents open in, and what receipts name. Omitted fields stay; a nullable field set to null clears it.","operationId":"update_tenant_v1_tenant_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantSettingsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/tenant/billing-details":{"patch":{"tags":["tenant"],"summary":"Update Billing Details","description":"Set what receipts name: legal name, tax id, address and up to five receipt emails (owner, admin or billing admin). Omitted keys stay; an empty value clears one.","operationId":"update_billing_details_v1_tenant_billing_details_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingDetails"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantSettingsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/tenant/onboarding":{"patch":{"tags":["tenant"],"summary":"Advance Onboarding","description":"Move the owner's first-login wizard: mark a step done, skip one (team, assistant or number; 409 otherwise) or hide the wizard. Finishing the agent step completes it; a completed wizard stays completed. Owner only.","operationId":"advance_onboarding_v1_tenant_onboarding_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/branding":{"get":{"tags":["tenant"],"summary":"Get Branding","description":"What the workspace's end-customer pages show: name, logo, color, support phone and links — the defaults until an admin sets them.","operationId":"get_branding_v1_branding_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandingOut"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"put":{"tags":["tenant"],"summary":"Put Branding","description":"Set the brand (owner or admin): display name, primary color (#rrggbb; the response carries its contrast against white text), support phone, website and privacy URLs. The logo is uploaded separately.","operationId":"put_branding_v1_branding_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandingPutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/branding/logo":{"post":{"tags":["tenant"],"summary":"Upload Logo","description":"Upload the logo (owner or admin): one multipart file, PNG, JPEG, WebP or a plain SVG, at most 1 MB. The response's logo_url is public and immutable per version.","operationId":"upload_logo_v1_branding_logo_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_logo_v1_branding_logo_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"delete":{"tags":["tenant"],"summary":"Delete Logo","description":"Remove the logo (owner or admin).","operationId":"delete_logo_v1_branding_logo_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandingOut"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/billing/usage":{"get":{"tags":["billing"],"summary":"List Usage","operationId":"list_usage_v1_billing_usage_get","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsagePageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/billing/balance":{"get":{"tags":["billing"],"summary":"Get Balance","operationId":"get_balance_v1_billing_balance_get","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/billing/checkout":{"post":{"tags":["billing"],"summary":"Start Checkout","description":"Start a purchase: a pending record and the hosted payment page to frame. Public — a visitor buys with an email and a name for the receipt; a signed-in buyer's session binds the credit to the workspace they are in, otherwise it is addressed to the email and collected at the first sign-in that owns a workspace. 503 when card payments are not configured on this deployment.","operationId":"start_checkout_v1_billing_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/checkout/{purchase_id}":{"get":{"tags":["billing"],"summary":"Get Purchase","description":"A purchase's state — what the processor's notify recorded. The id is the credential; the checkout page polls this after the payment frame reports back.","operationId":"get_purchase_v1_billing_checkout__purchase_id__get","parameters":[{"name":"purchase_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Purchase Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/markets":{"get":{"tags":["markets"],"summary":"List Markets","description":"The markets open to the public, each with its currency, its top-up packages and its headline rates (PLAN-markets D11). Public — the pricing, checkout and signup pages read it.","operationId":"list_markets_v1_markets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MarketOut"},"type":"array","title":"Response List Markets V1 Markets Get"}}}}}}},"/v1/markets/{code}":{"get":{"tags":["markets"],"summary":"Get Market","description":"One public market. 404 for a market that is hidden or does not exist.","operationId":"get_market_v1_markets__code__get","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/integrations":{"get":{"tags":["integrations"],"summary":"List Integrations","description":"The tenant's integrations, newest first (a bounded set — no\npagination).","operationId":"list_integrations_v1_integrations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationListOut"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"post":{"tags":["integrations"],"summary":"Create Integration","description":"Registers a tenant provider key; the key goes to the secrets backend\nand only a display hint survives in the database.","operationId":"create_integration_v1_integrations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/integrations/{integration_id}":{"get":{"tags":["integrations"],"summary":"Get Integration","operationId":"get_integration_v1_integrations__integration_id__get","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"patch":{"tags":["integrations"],"summary":"Update Integration","description":"Rename, enable/disable, or rotate the key (``secret`` writes a new\nversion under the same ref).","operationId":"update_integration_v1_integrations__integration_id__patch","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"delete":{"tags":["integrations"],"summary":"Delete Integration","description":"Removes the integration; the stored secret is scheduled for deletion\nwith a recovery window rather than destroyed immediately.","operationId":"delete_integration_v1_integrations__integration_id__delete","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/delivery-endpoints":{"get":{"tags":["delivery-endpoints"],"summary":"List Endpoints","description":"The tenant's delivery endpoints, newest first, with each one's last\ndelivery and the workspace quota (a bounded set — no pagination).","operationId":"list_endpoints_v1_delivery_endpoints_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryEndpointListOut"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"post":{"tags":["delivery-endpoints"],"summary":"Create Endpoint","description":"Registers a destination for outbound call events. Webhook endpoints get\na signing secret in this response — the only time it is ever returned.","operationId":"create_endpoint_v1_delivery_endpoints_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryEndpointCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryEndpointOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/delivery-endpoints/{endpoint_id}":{"get":{"tags":["delivery-endpoints"],"summary":"Get Endpoint","operationId":"get_endpoint_v1_delivery_endpoints__endpoint_id__get","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryEndpointOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"patch":{"tags":["delivery-endpoints"],"summary":"Update Endpoint","description":"Rename, enable/disable, retarget, set headers, or rotate the signing\nsecret (``rotate_secret`` mints a new one, returned once).","operationId":"update_endpoint_v1_delivery_endpoints__endpoint_id__patch","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryEndpointUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryEndpointOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"delete":{"tags":["delivery-endpoints"],"summary":"Delete Endpoint","description":"Removes the endpoint and its delivery rows (the per-attempt audit\nstays for its retention window); its secrets are deleted after the commit.","operationId":"delete_endpoint_v1_delivery_endpoints__endpoint_id__delete","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/delivery-endpoints/{endpoint_id}/test":{"post":{"tags":["delivery-endpoints"],"summary":"Test Endpoint","description":"Webhook: POSTs a signed sample event and reports the receiver's answer.\nMCP: connects, checks the allowlisted tool exists; with ``args``, calls it\nonce for real. Rate-limited per workspace.","operationId":"test_endpoint_v1_delivery_endpoints__endpoint_id__test_post","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryTestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryTestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/delivery-endpoints/{endpoint_id}/deliveries":{"get":{"tags":["delivery-endpoints"],"summary":"List Deliveries","description":"The endpoint's delivery log, newest first, each row with its attempts:\ncounts, errors, and (for MCP pushes) the audited tool calls.","operationId":"list_deliveries_v1_delivery_endpoints__endpoint_id__deliveries_get","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/delivery-endpoints/{endpoint_id}/deliveries/{delivery_id}/retry":{"post":{"tags":["delivery-endpoints"],"summary":"Retry","description":"Re-attempts the same delivery under the same event id with its\ncounters reset — for a receiver that never processed it.","operationId":"retry_v1_delivery_endpoints__endpoint_id__deliveries__delivery_id__retry_post","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}},{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Delivery Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventDeliveryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/delivery-endpoints/{endpoint_id}/deliveries/{delivery_id}/replay":{"post":{"tags":["delivery-endpoints"],"summary":"Replay","description":"Sends the event again as a new delivery under a new id — for a receiver\nthat already processed the original.","operationId":"replay_v1_delivery_endpoints__endpoint_id__deliveries__delivery_id__replay_post","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}},{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Delivery Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventDeliveryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/delivery-attempts":{"get":{"tags":["delivery-endpoints"],"summary":"List Attempts","description":"The workspace's per-attempt audit, newest first — including attempts of\nendpoints deleted since; kept for 90 days.","operationId":"list_attempts_v1_delivery_attempts_get","parameters":[{"name":"endpoint_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Endpoint Id"}},{"name":"delivery_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Delivery Id"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttemptListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/credential-requests":{"get":{"tags":["credentials"],"summary":"List Requests","operationId":"list_requests_v1_credential_requests_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialRequestListOut"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"post":{"tags":["credentials"],"summary":"Create Request","operationId":"create_request_v1_credential_requests_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialRequestCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedCredentialRequestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/credential-requests/{request_id}":{"delete":{"tags":["credentials"],"summary":"Cancel Request","operationId":"cancel_request_v1_credential_requests__request_id__delete","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/phone-numbers":{"get":{"tags":["phone-numbers"],"summary":"List Phone Numbers","operationId":"list_phone_numbers_v1_phone_numbers_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/PhoneNumberStatus"},{"type":"null"}],"description":"Filter by status. Absent → all except released.","title":"Status"},"description":"Filter by status. Absent → all except released."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PhoneNumberOut"},"title":"Response List Phone Numbers V1 Phone Numbers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["phone_numbers:read"]}]}},"/v1/phone-numbers/available":{"get":{"tags":["phone-numbers"],"summary":"Search Available","description":"Search numbers available for managed purchase on the platform's provider account, each with its monthly rent in the workspace's currency.","operationId":"search_available_v1_phone_numbers_available_get","parameters":[{"name":"country","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z]{2}$","description":"ISO 3166-1 alpha-2.","title":"Country"},"description":"ISO 3166-1 alpha-2."},{"name":"type","in":"query","required":false,"schema":{"enum":["local","mobile","toll_free"],"type":"string","default":"local","title":"Type"}},{"name":"area_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":2,"maxLength":6},{"type":"null"}],"title":"Area Code"}},{"name":"contains","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":15},{"type":"null"}],"title":"Contains"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":30,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AvailableNumberOut"},"title":"Response Search Available V1 Phone Numbers Available Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["phone_numbers:write"]}]}},"/v1/phone-numbers/purchase":{"post":{"tags":["phone-numbers"],"summary":"Purchase Phone Number","description":"Buy a number on the platform account (managed mode): the number is purchased with its voice webhooks already pointing at this API, persisted, and optionally assigned for inbound routing.","operationId":"purchase_phone_number_v1_phone_numbers_purchase_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberPurchaseRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["phone_numbers:write"]}]}},"/v1/phone-numbers/import":{"post":{"tags":["phone-numbers"],"summary":"Import Phone Number","description":"Bring your own Twilio number: validates the account credentials, detects whether the number is purchased (inbound+outbound) or a verified caller ID (outbound only), configures its voice webhooks, and stores the credentials by reference.","operationId":"import_phone_number_v1_phone_numbers_import_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberImportRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["phone_numbers:write"]}]}},"/v1/phone-numbers/{phone_number_id}/probe":{"post":{"tags":["phone-numbers"],"summary":"Probe Phone Number","description":"Re-run the recording activation probe for a BYO number (PLAN-byo-telephony D10): places a short call on the customer's account, records it, then reads and deletes the artifact to demonstrate what the account actually permits. Returns immediately; the outcome lands on the number's recording_mode.","operationId":"probe_phone_number_v1_phone_numbers__phone_number_id__probe_post","parameters":[{"name":"phone_number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Phone Number Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProbeScheduledOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["phone_numbers:write"]}]}},"/v1/phone-numbers/{phone_number_id}":{"get":{"tags":["phone-numbers"],"summary":"Get Phone Number","operationId":"get_phone_number_v1_phone_numbers__phone_number_id__get","parameters":[{"name":"phone_number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Phone Number Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["phone_numbers:read"]}]},"patch":{"tags":["phone-numbers"],"summary":"Update Phone Number","operationId":"update_phone_number_v1_phone_numbers__phone_number_id__patch","parameters":[{"name":"phone_number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Phone Number Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["phone_numbers:write"]}]},"delete":{"tags":["phone-numbers"],"summary":"Release Phone Number","description":"Release the number. Managed numbers are released back to the provider (irreversible — requires confirm=true); BYO numbers have their webhooks reset and the stored credentials are deleted with the last number of their account. Blocked while non-terminal campaigns use the number. The row is kept as released for call history.","operationId":"release_phone_number_v1_phone_numbers__phone_number_id__delete","parameters":[{"name":"phone_number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Phone Number Id"}},{"name":"confirm","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Confirm"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["phone_numbers:write"]}]}},"/v1/auth/providers":{"get":{"tags":["provider-login"],"summary":"List Providers","description":"The sign-in providers this deployment has credentials for.","operationId":"list_providers_v1_auth_providers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderListResponse"}}}}}}},"/v1/auth/providers/{provider}/start":{"get":{"tags":["provider-login"],"summary":"Start","description":"Begin sign-in with an external provider.\n\nMust be a top-level browser navigation (``window.location = …``), never a\n``fetch()``: the response is a 302 into the provider plus the handshake\ncookie, and neither survives an XHR. ``return_to`` (allowlisted: the\nconsent page path or the web app origin) rides the handshake and decides\nwhere the callback sends the browser afterwards.","operationId":"start_v1_auth_providers__provider__start_get","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}},{"name":"return_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/providers/{provider}/callback":{"get":{"tags":["provider-login"],"summary":"Callback","description":"Provider redirect target: completes the flow and hands the browser a\nsingle-use login code (302 to the web app, or JSON when unset).","operationId":"callback_v1_auth_providers__provider__callback_get","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/providers/exchange":{"post":{"tags":["provider-login"],"summary":"Exchange","description":"Redeem a login code for a session. Same tenant-selection contract as\n``/v1/auth/login``: a 400 with ``tenant_selection_required`` lists the\nmemberships, and the client retries with the same code plus a tenant_id.","operationId":"exchange_v1_auth_providers_exchange_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/contacts":{"post":{"tags":["contacts"],"summary":"Create Contact","operationId":"create_contact_v1_contacts_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["contacts:write"]}]},"get":{"tags":["contacts"],"summary":"List Contacts","operationId":"list_contacts_v1_contacts_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}],"description":"Case-insensitive substring match on name or email.","title":"Q"},"description":"Case-insensitive substring match on name or email."},{"name":"phone","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact E.164 match.","title":"Phone"},"description":"Exact E.164 match."},{"name":"external_ref","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact match.","title":"External Ref"},"description":"Exact match."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["contacts:read"]}]}},"/v1/contacts/{contact_id}":{"get":{"tags":["contacts"],"summary":"Get Contact","operationId":"get_contact_v1_contacts__contact_id__get","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["contacts:read"]}]},"patch":{"tags":["contacts"],"summary":"Update Contact","operationId":"update_contact_v1_contacts__contact_id__patch","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contact Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["contacts:write"]}]},"delete":{"tags":["contacts"],"summary":"Delete Contact","description":"Deletes the contact, cascading its leads; past calls keep their history but lose the contact link.","operationId":"delete_contact_v1_contacts__contact_id__delete","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contact Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["contacts:write"]}]}},"/v1/contacts/by-external-ref/{external_ref}":{"put":{"tags":["contacts"],"summary":"Upsert Contact","description":"Create-or-replace a contact keyed on external_ref — the idempotent write path for CRM syncs. Replaces every mutable field with the request body.","operationId":"upsert_contact_v1_contacts_by_external_ref__external_ref__put","parameters":[{"name":"external_ref","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"title":"External Ref"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactUpsertRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["contacts:write"]}]}},"/v1/knowledge-bases":{"get":{"tags":["knowledge-bases"],"summary":"List Kbs","operationId":"list_kbs_v1_knowledge_bases_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseListOut"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["knowledge_bases:read"]}]},"post":{"tags":["knowledge-bases"],"summary":"Create Kb","operationId":"create_kb_v1_knowledge_bases_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["knowledge_bases:write"]}]}},"/v1/knowledge-bases/embedding-models":{"get":{"tags":["knowledge-bases"],"summary":"Embedding Models","description":"Embedding models a knowledge base can pin, from the platform catalog.","operationId":"embedding_models_v1_knowledge_bases_embedding_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingModelListOut"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["knowledge_bases:read"]}]}},"/v1/knowledge-bases/{kb_id}":{"get":{"tags":["knowledge-bases"],"summary":"Get Kb","operationId":"get_kb_v1_knowledge_bases__kb_id__get","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["knowledge_bases:read"]}]},"patch":{"tags":["knowledge-bases"],"summary":"Update Kb","operationId":"update_kb_v1_knowledge_bases__kb_id__patch","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["knowledge_bases:write"]}]},"delete":{"tags":["knowledge-bases"],"summary":"Delete Kb","description":"Deletes the knowledge base with its sources, documents, and chunks. Refused while any agent version references it.","operationId":"delete_kb_v1_knowledge_bases__kb_id__delete","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["knowledge_bases:write"]}]}},"/v1/knowledge-bases/{kb_id}/sources":{"post":{"tags":["knowledge-bases"],"summary":"Create Source","operationId":"create_source_v1_knowledge_bases__kb_id__sources_post","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["knowledge_bases:write"]}]},"get":{"tags":["knowledge-bases"],"summary":"List Sources","operationId":"list_sources_v1_knowledge_bases__kb_id__sources_get","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["knowledge_bases:read"]}]}},"/v1/knowledge-bases/{kb_id}/sources/{source_id}":{"get":{"tags":["knowledge-bases"],"summary":"Get Source","operationId":"get_source_v1_knowledge_bases__kb_id__sources__source_id__get","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}},{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["knowledge_bases:read"]}]},"patch":{"tags":["knowledge-bases"],"summary":"Update Source","operationId":"update_source_v1_knowledge_bases__kb_id__sources__source_id__patch","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}},{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["knowledge_bases:write"]}]},"delete":{"tags":["knowledge-bases"],"summary":"Delete Source","operationId":"delete_source_v1_knowledge_bases__kb_id__sources__source_id__delete","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}},{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["knowledge_bases:write"]}]}},"/v1/knowledge-bases/{kb_id}/sources/{source_id}/sync":{"post":{"tags":["knowledge-bases"],"summary":"Trigger Sync","description":"Queues a crawl run for a website source; the kb-indexer worker picks it up on its next tick. 409 while a run is in flight.","operationId":"trigger_sync_v1_knowledge_bases__kb_id__sources__source_id__sync_post","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}},{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["knowledge_bases:write"]}]}},"/v1/knowledge-bases/{kb_id}/reindex":{"post":{"tags":["knowledge-bases"],"summary":"Trigger Reindex","description":"Re-embeds every stored document from its saved content — no re-crawl. Pass embedding_provider/embedding_model to switch model: the switch and the re-embedding commit together, so the index never mixes two vector spaces. 409 while any run for the KB is in flight.","operationId":"trigger_reindex_v1_knowledge_bases__kb_id__reindex_post","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReindexRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReindexOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["knowledge_bases:write"]}]}},"/v1/knowledge-bases/{kb_id}/sources/{source_id}/documents":{"post":{"tags":["knowledge-bases"],"summary":"Create Text Document","description":"Adds a raw text/markdown document to a text source.","operationId":"create_text_document_v1_knowledge_bases__kb_id__sources__source_id__documents_post","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}},{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextDocumentCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["knowledge_bases:write"]}]}},"/v1/knowledge-bases/{kb_id}/sources/{source_id}/documents/upload":{"post":{"tags":["knowledge-bases"],"summary":"Upload Document","description":"Multipart file upload for a file_upload source (pdf/docx/html/md/txt, 25 MB default cap).","operationId":"upload_document_v1_knowledge_bases__kb_id__sources__source_id__documents_upload_post","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}},{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_document_v1_knowledge_bases__kb_id__sources__source_id__documents_upload_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["knowledge_bases:write"]}]}},"/v1/knowledge-bases/{kb_id}/documents":{"get":{"tags":["knowledge-bases"],"summary":"List Documents","operationId":"list_documents_v1_knowledge_bases__kb_id__documents_get","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}},{"name":"source_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/KbDocumentStatus"},{"type":"null"}],"title":"Status"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["knowledge_bases:read"]}]}},"/v1/knowledge-bases/{kb_id}/documents/{document_id}":{"get":{"tags":["knowledge-bases"],"summary":"Get Document","operationId":"get_document_v1_knowledge_bases__kb_id__documents__document_id__get","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["knowledge_bases:read"]}]},"delete":{"tags":["knowledge-bases"],"summary":"Delete Document","operationId":"delete_document_v1_knowledge_bases__kb_id__documents__document_id__delete","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["knowledge_bases:write"]}]}},"/v1/knowledge-bases/{kb_id}/documents/{document_id}/content":{"get":{"tags":["knowledge-bases"],"summary":"Get Document Content","description":"The extracted markdown the chunker consumed; 409 until extraction has run.","operationId":"get_document_content_v1_knowledge_bases__kb_id__documents__document_id__content_get","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["knowledge_bases:read"]}]}},"/v1/knowledge-bases/{kb_id}/query":{"post":{"tags":["knowledge-bases"],"summary":"Query Kb","description":"Hybrid retrieval (pgvector + keyword, RRF-fused): chunks with scores and citations. No LLM synthesis — callers compose answers.","operationId":"query_kb_v1_knowledge_bases__kb_id__query_post","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["knowledge_bases:read"]}]}},"/v1/knowledge-bases/{kb_id}/runs":{"get":{"tags":["knowledge-bases"],"summary":"List Runs","operationId":"list_runs_v1_knowledge_bases__kb_id__runs_get","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}},{"name":"source_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["knowledge_bases:read"]}]}},"/v1/knowledge-bases/{kb_id}/runs/{run_id}":{"get":{"tags":["knowledge-bases"],"summary":"Get Run","operationId":"get_run_v1_knowledge_bases__kb_id__runs__run_id__get","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["knowledge_bases:read"]}]}},"/v1/knowledge-bases/{kb_id}/runs/{run_id}/cancel":{"post":{"tags":["knowledge-bases"],"summary":"Cancel Run","operationId":"cancel_run_v1_knowledge_bases__kb_id__runs__run_id__cancel_post","parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["knowledge_bases:write"]}]}},"/v1/agents/{agent_id}/versions/{version_number}/knowledge-bases":{"get":{"tags":["knowledge-bases"],"summary":"List Kb Attachments","operationId":"list_kb_attachments_v1_agents__agent_id__versions__version_number__knowledge_bases_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"version_number","in":"path","required":true,"schema":{"type":"integer","title":"Version Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KbAttachmentListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["agents:read"]}]}},"/v1/agents/{agent_id}/versions/{version_number}/knowledge-bases/{kb_id}":{"put":{"tags":["knowledge-bases"],"summary":"Upsert Kb Attachment","description":"Wire a knowledge base into a draft agent version (idempotent upsert).","operationId":"upsert_kb_attachment_v1_agents__agent_id__versions__version_number__knowledge_bases__kb_id__put","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"version_number","in":"path","required":true,"schema":{"type":"integer","title":"Version Number"}},{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KbAttachmentUpsertRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KbAttachmentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["agents:write"]}]},"delete":{"tags":["knowledge-bases"],"summary":"Delete Kb Attachment","operationId":"delete_kb_attachment_v1_agents__agent_id__versions__version_number__knowledge_bases__kb_id__delete","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"version_number","in":"path","required":true,"schema":{"type":"integer","title":"Version Number"}},{"name":"kb_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Kb Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["agents:write"]}]}},"/v1/lead-lists":{"post":{"tags":["lead-lists"],"summary":"Create Lead List","operationId":"create_lead_list_v1_lead_lists_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadListCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["leads:write"]}]},"get":{"tags":["lead-lists"],"summary":"List Lead Lists","operationId":"list_lead_lists_v1_lead_lists_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}],"description":"Case-insensitive substring match on the list name.","title":"Q"},"description":"Case-insensitive substring match on the list name."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadListPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["leads:read"]}]}},"/v1/lead-lists/{lead_list_id}":{"get":{"tags":["lead-lists"],"summary":"Get Lead List","operationId":"get_lead_list_v1_lead_lists__lead_list_id__get","parameters":[{"name":"lead_list_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lead List Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadListDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["leads:read"]}]},"patch":{"tags":["lead-lists"],"summary":"Update Lead List","operationId":"update_lead_list_v1_lead_lists__lead_list_id__patch","parameters":[{"name":"lead_list_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lead List Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadListUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["leads:write"]}]},"delete":{"tags":["lead-lists"],"summary":"Delete Lead List","description":"Deletes the list and its leads; contacts and call history are untouched. Fails with 409 while a campaign references the list.","operationId":"delete_lead_list_v1_lead_lists__lead_list_id__delete","parameters":[{"name":"lead_list_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lead List Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["leads:write"]}]}},"/v1/lead-lists/{lead_list_id}/leads":{"post":{"tags":["lead-lists"],"summary":"Add Lead","description":"Adds one contact to the list: reference an existing contact by contact_id, or embed `contact` to resolve it inline (additionally requires contacts:write; with an external_ref this create-or-replaces the contact, without one it always creates a new one). 409 if the contact is already a member.","operationId":"add_lead_v1_lead_lists__lead_list_id__leads_post","parameters":[{"name":"lead_list_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lead List Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["leads:write"]}]},"get":{"tags":["lead-lists"],"summary":"List Leads","operationId":"list_leads_v1_lead_lists__lead_list_id__leads_get","parameters":[{"name":"lead_list_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lead List Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/LeadStatus"},{"type":"null"}],"title":"Status"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["leads:read"]}]}},"/v1/lead-lists/{lead_list_id}/leads/import":{"post":{"tags":["lead-lists"],"summary":"Import Leads","description":"Bulk CSV/CRM import (requires leads:write and contacts:write). Rows with an external_ref create-or-replace their contact and collapse last-wins within one request; rows without always create a new contact. Re-importing refreshes contact data, priority, and attributes but never resets a lead's dial state.","operationId":"import_leads_v1_lead_lists__lead_list_id__leads_import_post","parameters":[{"name":"lead_list_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lead List Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadImportRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadImportResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["contacts:write","leads:write"]}]}},"/v1/lead-lists/{lead_list_id}/leads/{lead_id}":{"get":{"tags":["lead-lists"],"summary":"Get Lead","operationId":"get_lead_v1_lead_lists__lead_list_id__leads__lead_id__get","parameters":[{"name":"lead_list_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lead List Id"}},{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["leads:read"]}]},"patch":{"tags":["lead-lists"],"summary":"Update Lead","operationId":"update_lead_v1_lead_lists__lead_list_id__leads__lead_id__patch","parameters":[{"name":"lead_list_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lead List Id"}},{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lead Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["leads:write"]}]},"delete":{"tags":["lead-lists"],"summary":"Delete Lead","description":"Removes the contact from the list; the contact itself and past calls are untouched.","operationId":"delete_lead_v1_lead_lists__lead_list_id__leads__lead_id__delete","parameters":[{"name":"lead_list_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lead List Id"}},{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lead Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["leads:write"]}]}},"/v1/calls":{"post":{"tags":["calls"],"summary":"Create Direct Call","description":"Create and immediately dial one campaign-less outbound call (a direct call). Answers 201 once the call row exists; the body's status is queued when the provider accepted the dial and failed when origination was rejected synchronously (see metadata.origination_error). Poll GET /v1/calls/{id} for progress.","operationId":"create_direct_call_v1_calls_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DirectCallCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["calls:write"]}]},"get":{"tags":["calls"],"summary":"List Calls","operationId":"list_calls_v1_calls_get","parameters":[{"name":"campaign_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Campaign Id"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"}},{"name":"contact_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contact Id"}},{"name":"lead_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lead Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CallStatus"},{"type":"null"}],"title":"Status"}},{"name":"direction","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CallDirection"},{"type":"null"}],"title":"Direction"}},{"name":"outcome","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CallOutcome"},{"type":"null"}],"title":"Outcome"}},{"name":"direct","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"true → only campaign-less outbound (direct) calls; false → everything else.","title":"Direct"},"description":"true → only campaign-less outbound (direct) calls; false → everything else."},{"name":"started_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only calls with started_at at or after this instant; calls that never started (queued/canceled before dialing) are excluded whenever a started_* bound is set.","title":"Started After"},"description":"Only calls with started_at at or after this instant; calls that never started (queued/canceled before dialing) are excluded whenever a started_* bound is set."},{"name":"started_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started Before"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"description":"Case-insensitive match on the contact's name or either phone number.","title":"Q"},"description":"Case-insensitive match on the contact's name or either phone number."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["calls:read"]}]}},"/v1/calls/{call_id}":{"get":{"tags":["calls"],"summary":"Get Call","operationId":"get_call_v1_calls__call_id__get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["calls:read"]}]}},"/v1/calls/{call_id}/transcript":{"get":{"tags":["calls"],"summary":"Get Transcript","description":"The full utterance-level transcript in conversation order. Requires transcripts:read — verbatim conversation content is gated separately from call metadata.","operationId":"get_transcript_v1_calls__call_id__transcript_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["transcripts:read"]}]}},"/v1/calls/{call_id}/analysis":{"get":{"tags":["calls"],"summary":"List Analysis Results","description":"Post-call analysis results, newest first. Re-runs append; the newest row is also embedded in the call detail as latest_analysis.","operationId":"list_analysis_results_v1_calls__call_id__analysis_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalysisListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["calls:read"]}]}},"/v1/calls/{call_id}/events":{"get":{"tags":["calls"],"summary":"List Events","description":"The runtime's event timeline for the call, in sequence order.","operationId":"list_events_v1_calls__call_id__events_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallEventListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["calls:read"]}]}},"/v1/calls/{call_id}/prompt":{"get":{"tags":["calls"],"summary":"Get Prompt","description":"The prompt the agent received on this call, as the runtime composed it (PLAN-console D21): one item per link it ran on, with the backend's half on a delegating link. Gated like the transcript (transcripts:read) — the caller's details are rendered into it. Empty for calls that ran before the runtime recorded it.","operationId":"get_prompt_v1_calls__call_id__prompt_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallPromptListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["transcripts:read"]}]}},"/v1/calls/{call_id}/tool-runs":{"get":{"tags":["calls"],"summary":"List Tool Runs","description":"Tool invocations the agent made during the call.","operationId":"list_tool_runs_v1_calls__call_id__tool_runs_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolRunListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["calls:read"]}]}},"/v1/calls/{call_id}/recording":{"get":{"tags":["calls"],"summary":"Get Recording","description":"Stream the call recording: a 302 to a presigned URL that lives minutes and supports range requests. Gated like the transcript (transcripts:read); 404 when no recording exists.","operationId":"get_recording_v1_calls__call_id__recording_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Id"}}],"responses":{"302":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["transcripts:read"]}]}},"/v1/stats/home":{"get":{"tags":["stats"],"summary":"Home","description":"The console Home aggregates (PLAN-console D18): calls, answer rate,\ntime on the line and spend over the window with their previous-window\nvalues, calls per local day, outcome and language shares.","operationId":"home_v1_stats_home_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"description":"Window length; compared with the same span before it.","default":7,"title":"Days"},"description":"Window length; compared with the same span before it."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HomeStatsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["calls:read"]}]}},"/v1/agents/{agent_id}/stats":{"get":{"tags":["stats"],"summary":"Agent","description":"One agent's window: calls, answer rate, average answered duration,\nquestions it asked a person, calls per local day.","operationId":"agent_v1_agents__agent_id__stats_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"description":"Window length; compared with the same span before it.","default":7,"title":"Days"},"description":"Window length; compared with the same span before it."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentStatsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["calls:read"]}]}},"/v1/agents":{"post":{"tags":["agents"],"summary":"Create Agent","description":"Creates the agent together with draft version 1.","operationId":"create_agent_v1_agents_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["agents:write"]}]},"get":{"tags":["agents"],"summary":"List Agents","operationId":"list_agents_v1_agents_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}],"description":"Case-insensitive substring match on name.","title":"Q"},"description":"Case-insensitive substring match on name."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AgentStatus"},{"type":"null"}],"title":"Status"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["agents:read"]}]}},"/v1/agents/quickstart":{"post":{"tags":["agents"],"summary":"Quickstart Agent","description":"Create an agent from a short form and publish it in one step: the\nplatform writes the instructions from a template and what was typed,\nopens it on the default live model, activates it and, when a number is\ngiven, puts it on that number. Afterwards it is edited like any agent.\n422 with the publish problems when the form cannot make a valid agent.","operationId":"quickstart_agent_v1_agents_quickstart_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuickstartAgentRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["agents:write","phone_numbers:write"]}]}},"/v1/agents/{agent_id}":{"get":{"tags":["agents"],"summary":"Get Agent","operationId":"get_agent_v1_agents__agent_id__get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["agents:read"]}]},"patch":{"tags":["agents"],"summary":"Update Agent","operationId":"update_agent_v1_agents__agent_id__patch","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["agents:write"]}]},"delete":{"tags":["agents"],"summary":"Delete Agent","description":"Deletes a never-used agent and its versions; 409 when campaigns or calls reference it. Archiving is the normal retirement path.","operationId":"delete_agent_v1_agents__agent_id__delete","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["agents:write"]}]}},"/v1/agents/{agent_id}/versions":{"get":{"tags":["agents"],"summary":"List Versions","description":"All versions newest-first, as summaries without configs.","operationId":"list_versions_v1_agents__agent_id__versions_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__agents__schemas__VersionListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["agents:read"]}]},"post":{"tags":["agents"],"summary":"Create Version","description":"Opens a new draft; an agent can have at most one draft at a time.","operationId":"create_version_v1_agents__agent_id__versions_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__agents__schemas__VersionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["agents:write"]}]}},"/v1/agents/{agent_id}/versions/{version_number}":{"get":{"tags":["agents"],"summary":"Get Version","operationId":"get_version_v1_agents__agent_id__versions__version_number__get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"version_number","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Version Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__agents__schemas__VersionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["agents:read"]}]},"patch":{"tags":["agents"],"summary":"Update Version","description":"Edits a draft. Configs are replaced whole and shape-checked only;\nthe full catalog matrix is enforced at publish.","operationId":"update_version_v1_agents__agent_id__versions__version_number__patch","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"version_number","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Version Number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__agents__schemas__VersionUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__agents__schemas__VersionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["agents:write"]}]}},"/v1/agents/{agent_id}/versions/{version_number}/publish":{"post":{"tags":["agents"],"summary":"Publish Version","description":"Validates the draft in full and freezes it; published versions are\nimmutable forever.","operationId":"publish_version_v1_agents__agent_id__versions__version_number__publish_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"version_number","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Version Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__agents__schemas__VersionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["agents:write"]}]}},"/v1/agents/{agent_id}/versions/{version_number}/activate":{"post":{"tags":["agents"],"summary":"Activate Version","description":"Points the agent at a published version; rollback is activating an\nolder published version.","operationId":"activate_version_v1_agents__agent_id__versions__version_number__activate_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"version_number","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Version Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["agents:write"]}]}},"/v1/agents/{agent_id}/versions/{version_number}/effective-config":{"get":{"tags":["agents"],"summary":"Get Effective Config","description":"What will actually govern a call on this version: every key resolved,\neach marked as configured, defaulted, or left to the provider.","operationId":"get_effective_config_v1_agents__agent_id__versions__version_number__effective_config_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"version_number","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Version Number"}},{"name":"include_advanced","in":"query","required":false,"schema":{"type":"boolean","description":"Include the advanced safety timings (reconnect, hangup).","default":false,"title":"Include Advanced"},"description":"Include the advanced safety timings (reconnect, hangup)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EffectiveConfigOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["agents:read"]}]}},"/v1/agents/{agent_id}/versions/{version_number}/prompt-preview":{"get":{"tags":["agents"],"summary":"Get Prompt Preview","description":"What a call on this version receives, composed the way the runtime\ncomposes it, without the per-call context (PLAN-console D21).","operationId":"get_prompt_preview_v1_agents__agent_id__versions__version_number__prompt_preview_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"version_number","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Version Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptPreviewOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["agents:read"]}]}},"/v1/agents/{agent_id}/connections":{"get":{"tags":["agents"],"summary":"Get Connections","description":"What the agent's active version is wired to — tools, knowledge bases, MCP servers, enrichers, delivery endpoints — with seven days of tool-run evidence (runs, failures, median latency, last error).","operationId":"get_connections_v1_agents__agent_id__connections_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentConnectionsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["agents:read"]}]}},"/v1/providers/runtime-config":{"get":{"tags":["providers"],"summary":"Get Runtime Config Catalog","description":"Every key that governs call behaviour — type, range, default, purpose,\nper-provider resolution — plus the map from what a caller complained about\nto the keys to try and the call event that shows whether it worked.","operationId":"get_runtime_config_catalog_v1_providers_runtime_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimeConfigCatalogOut"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["agents:read"]}]}},"/v1/providers/provider-options":{"get":{"tags":["providers"],"summary":"Get Provider Options Catalog","description":"Settings that belong to one realtime provider and have no equivalent on\nthe others — written to an agent version's provider_config, keyed by\nprovider. Also lists what cannot be set there, and what governs it.","operationId":"get_provider_options_catalog_v1_providers_provider_options_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderOptionsCatalogOut"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["agents:read"]}]}},"/v1/providers":{"get":{"tags":["providers"],"summary":"Get Catalog","description":"The static provider/model catalog that publish validation enforces.","operationId":"get_catalog_v1_providers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogOut"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["agents:read"]}]}},"/v1/workflows":{"post":{"tags":["workflows"],"summary":"Create Workflow","description":"Creates the workflow together with draft version 1, optionally seeded\nwith an initial graph.","operationId":"create_workflow_v1_workflows_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["workflows:write"]}]},"get":{"tags":["workflows"],"summary":"List Workflows","operationId":"list_workflows_v1_workflows_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}],"description":"Case-insensitive substring match on name.","title":"Q"},"description":"Case-insensitive substring match on name."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/WorkflowStatus"},{"type":"null"}],"title":"Status"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["workflows:read"]}]}},"/v1/workflows/{workflow_id}":{"get":{"tags":["workflows"],"summary":"Get Workflow","operationId":"get_workflow_v1_workflows__workflow_id__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["workflows:read"]}]},"patch":{"tags":["workflows"],"summary":"Update Workflow","operationId":"update_workflow_v1_workflows__workflow_id__patch","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["workflows:write"]}]},"delete":{"tags":["workflows"],"summary":"Delete Workflow","description":"Deletes a never-used workflow and its versions; 409 when campaigns or calls reference it. Archiving is the normal retirement path.","operationId":"delete_workflow_v1_workflows__workflow_id__delete","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["workflows:write"]}]}},"/v1/workflows/{workflow_id}/versions":{"get":{"tags":["workflows"],"summary":"List Versions","description":"All versions newest-first, as summaries without graphs.","operationId":"list_versions_v1_workflows__workflow_id__versions_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__workflows__schemas__VersionListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["workflows:read"]}]},"post":{"tags":["workflows"],"summary":"Create Version","description":"Opens a new draft; a workflow can have at most one draft at a time.","operationId":"create_version_v1_workflows__workflow_id__versions_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__workflows__schemas__VersionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["workflows:write"]}]}},"/v1/workflows/{workflow_id}/versions/{version_number}":{"get":{"tags":["workflows"],"summary":"Get Version","operationId":"get_version_v1_workflows__workflow_id__versions__version_number__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}},{"name":"version_number","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Version Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__workflows__schemas__VersionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["workflows:read"]}]},"patch":{"tags":["workflows"],"summary":"Update Version","description":"Edits a draft. The graph is replaced whole and checked structurally;\ntenancy and the full publish matrix are enforced at publish.","operationId":"update_version_v1_workflows__workflow_id__versions__version_number__patch","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}},{"name":"version_number","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Version Number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__workflows__schemas__VersionUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__workflows__schemas__VersionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["workflows:write"]}]}},"/v1/workflows/{workflow_id}/versions/{version_number}/publish":{"post":{"tags":["workflows"],"summary":"Publish Version","description":"Validates the draft in full, pins every node to its agent's active\nversion, and freezes it; published versions are immutable forever.","operationId":"publish_version_v1_workflows__workflow_id__versions__version_number__publish_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}},{"name":"version_number","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Version Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__workflows__schemas__VersionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["workflows:write"]}]}},"/v1/workflows/{workflow_id}/versions/{version_number}/activate":{"post":{"tags":["workflows"],"summary":"Activate Version","description":"Points the workflow at a published version; rollback is activating an\nolder published version.","operationId":"activate_version_v1_workflows__workflow_id__versions__version_number__activate_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}},{"name":"version_number","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Version Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["workflows:write"]}]}},"/v1/campaigns":{"post":{"tags":["campaigns"],"summary":"Create Campaign","description":"Creates the campaign in draft; start it explicitly once it is ready. The lead list, agent, and phone number must already exist.","operationId":"create_campaign_v1_campaigns_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["campaigns:write"]}]},"get":{"tags":["campaigns"],"summary":"List Campaigns","operationId":"list_campaigns_v1_campaigns_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}],"description":"Case-insensitive substring match on the campaign name.","title":"Q"},"description":"Case-insensitive substring match on the campaign name."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CampaignStatus"},{"type":"null"}],"title":"Status"}},{"name":"lead_list_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lead List Id"}},{"name":"kind","in":"query","required":false,"schema":{"enum":["campaign","callback","all"],"type":"string","description":"'campaign' (the default) leaves out the callbacks schedule_callback books; 'callback' lists only those; 'all' lists both.","default":"campaign","title":"Kind"},"description":"'campaign' (the default) leaves out the callbacks schedule_callback books; 'callback' lists only those; 'all' lists both."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["campaigns:read"]}]}},"/v1/campaigns/{campaign_id}":{"get":{"tags":["campaigns"],"summary":"Get Campaign","operationId":"get_campaign_v1_campaigns__campaign_id__get","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["campaigns:read"]}]},"patch":{"tags":["campaigns"],"summary":"Update Campaign","description":"Partial update. The lead list, agent, and phone number can only be changed while the campaign is draft or scheduled; other fields stay editable until the campaign is completed or canceled (409 otherwise).","operationId":"update_campaign_v1_campaigns__campaign_id__patch","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["campaigns:write"]}]},"delete":{"tags":["campaigns"],"summary":"Delete Campaign","description":"Deletes a campaign that never started (draft or scheduled); 409 otherwise — cancel is the way to stop a running campaign.","operationId":"delete_campaign_v1_campaigns__campaign_id__delete","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["campaigns:write"]}]}},"/v1/campaigns/{campaign_id}/start":{"post":{"tags":["campaigns"],"summary":"Start Campaign","description":"Starts a draft or scheduled campaign: scheduled when start_at is in the future, active otherwise. 409 unless the agent is active with an active version and the phone number is active and outbound-capable.","operationId":"start_campaign_v1_campaigns__campaign_id__start_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["campaigns:write"]}]}},"/v1/campaigns/{campaign_id}/pause":{"post":{"tags":["campaigns"],"summary":"Pause Campaign","description":"Pauses an active campaign; in-flight calls finish naturally and the dialer stops claiming new leads.","operationId":"pause_campaign_v1_campaigns__campaign_id__pause_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["campaigns:write"]}]}},"/v1/campaigns/{campaign_id}/resume":{"post":{"tags":["campaigns"],"summary":"Resume Campaign","description":"Resumes a paused campaign; runnability is re-checked.","operationId":"resume_campaign_v1_campaigns__campaign_id__resume_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["campaigns:write"]}]}},"/v1/campaigns/{campaign_id}/cancel":{"post":{"tags":["campaigns"],"summary":"Cancel Campaign","description":"Cancels from any non-terminal status. Terminal: a canceled campaign cannot be restarted.","operationId":"cancel_campaign_v1_campaigns__campaign_id__cancel_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["campaigns:write"]}]}},"/v1/dialer/tick":{"post":{"tags":["dialer"],"summary":"Tick","description":"Runs one dialer sweep: reconciles finished calls into lead dial-state, promotes due scheduled campaigns, auto-completes finished runs, then dials every active campaign up to its free capacity within its calling window. Authenticated by the SINWAN_DIALER_TOKEN shared secret (X-Dialer-Token header or Bearer token), not tenant credentials. Overlapping ticks skip each other's rows, so any scheduler cadence is safe.","operationId":"tick_v1_dialer_tick_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TickSummaryOut"}}}}}}},"/v1/deliveries/tick":{"post":{"tags":["deliveries"],"summary":"Tick","description":"Claims due webhook deliveries and attempts them (the service owns the\ncommits). MCP deliveries are claimed by the call-analyzer worker's tick,\nnever here.","operationId":"tick_v1_deliveries_tick_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryTickOut"}}}}}}},"/v1/notification-rules":{"get":{"tags":["notifications"],"summary":"List Rules","operationId":"list_rules_v1_notification_rules_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationRuleListOut"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"post":{"tags":["notifications"],"summary":"Create Rule","description":"Registers a notification rule: when a matching call's analysis\ncompletes, its summary is sent to the rule's recipients with a share-page\nlink. Campaign calls are excluded unless opted into via call_sources.","operationId":"create_rule_v1_notification_rules_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationRuleCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationRuleOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/notification-rules/{rule_id}":{"get":{"tags":["notifications"],"summary":"Get Rule","operationId":"get_rule_v1_notification_rules__rule_id__get","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationRuleOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"patch":{"tags":["notifications"],"summary":"Update Rule","operationId":"update_rule_v1_notification_rules__rule_id__patch","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationRuleUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationRuleOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"delete":{"tags":["notifications"],"summary":"Delete Rule","operationId":"delete_rule_v1_notification_rules__rule_id__delete","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/notification-rules/{rule_id}/test":{"post":{"tags":["notifications"],"summary":"Test Send","description":"Sends a sample notification to the rule's recipients immediately —\ncatches a typo'd address before real call traffic does.","operationId":"test_send_v1_notification_rules__rule_id__test_post","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestSendOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/comm-messages":{"get":{"tags":["notifications"],"summary":"List Messages","description":"The tenant's outbound notification log, newest first.","operationId":"list_messages_v1_comm_messages_get","parameters":[{"name":"call_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CommMessageStatus"},{"type":"null"}],"title":"Status"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommMessageListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/comm-messages/{message_id}/resend":{"post":{"tags":["notifications"],"summary":"Resend","description":"Queues a sent, failed, dead, or blocked message for another attempt.","operationId":"resend_v1_comm_messages__message_id__resend_post","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommMessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/comms/tick":{"post":{"tags":["notifications"],"summary":"Tick","description":"Claims due notification messages and sends them (the dispatcher owns\nthe commits) — gated by SINWAN_COMMS_TICK_TOKEN, mirroring the delivery\ntick. Also sweeps form files past their retention (PLAN-forms.md D17) —\nthe forms purge rides this tick rather than owning a fourth ticker.","operationId":"tick_v1_comms_tick_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommsTickOut"}}}}}}},"/v1/connectors":{"get":{"tags":["connectors"],"summary":"List Connectors","description":"The connector catalog with this workspace's connections per entry.\nConnect one with ``POST /v1/mcp/servers {\"catalog_key\": …}``.","operationId":"list_connectors_v1_connectors_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorListOut"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/mcp/servers":{"get":{"tags":["mcp"],"summary":"List Servers","operationId":"list_servers_v1_mcp_servers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerListOut"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"post":{"tags":["mcp"],"summary":"Create Server","description":"Register a tenant MCP server — a custom URL, or a catalog entry by\n``catalog_key``. ``oauth`` servers start ``pending_auth`` until the admin\ncompletes ``POST /mcp/servers/{id}/authorize``; others are discovered at\nonce.","operationId":"create_server_v1_mcp_servers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/mcp/servers/{server_id}":{"get":{"tags":["mcp"],"summary":"Get Server","operationId":"get_server_v1_mcp_servers__server_id__get","parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Server Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"patch":{"tags":["mcp"],"summary":"Update Server","operationId":"update_server_v1_mcp_servers__server_id__patch","parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Server Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"delete":{"tags":["mcp"],"summary":"Delete Server","operationId":"delete_server_v1_mcp_servers__server_id__delete","parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Server Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/mcp/servers/{server_id}/authorize":{"post":{"tags":["mcp"],"summary":"Authorize","description":"Begin the OAuth grant against the customer's authorization server;\nreturns the URL to send the admin's browser to.","operationId":"authorize_v1_mcp_servers__server_id__authorize_post","parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Server Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/mcp/servers/{server_id}/discover":{"post":{"tags":["mcp"],"summary":"Discover","description":"List the server's tools now (\"check connection\"). The result feeds\ndrafts; a published version keeps the snapshot it froze. A failure is\nreported in ``last_error``, not as an HTTP error.","operationId":"discover_v1_mcp_servers__server_id__discover_post","parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Server Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/mcp/callback":{"get":{"tags":["mcp"],"summary":"Callback","description":"Authorization-server redirect target — authenticated by ``state``, not\na session. Registered once as the fixed redirect URI for every server.","operationId":"callback_v1_mcp_callback_get","parameters":[{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/versions/{version_number}/mcp-servers":{"get":{"tags":["mcp"],"summary":"List Attachments","operationId":"list_attachments_v1_agents__agent_id__versions__version_number__mcp_servers_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"version_number","in":"path","required":true,"schema":{"type":"integer","title":"Version Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/agents/{agent_id}/versions/{version_number}/mcp-servers/{server_id}":{"put":{"tags":["mcp"],"summary":"Upsert Attachment","description":"Wire an MCP server into a draft agent version (idempotent upsert).","operationId":"upsert_attachment_v1_agents__agent_id__versions__version_number__mcp_servers__server_id__put","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"version_number","in":"path","required":true,"schema":{"type":"integer","title":"Version Number"}},{"name":"server_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Server Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentUpsertRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"delete":{"tags":["mcp"],"summary":"Delete Attachment","operationId":"delete_attachment_v1_agents__agent_id__versions__version_number__mcp_servers__server_id__delete","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"version_number","in":"path","required":true,"schema":{"type":"integer","title":"Version Number"}},{"name":"server_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Server Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/tools/definitions":{"get":{"tags":["tools"],"summary":"List Definitions","description":"The built-in internal catalog plus the tenant's webhook definitions.","operationId":"list_definitions_v1_tools_definitions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolDefinitionListOut"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"post":{"tags":["tools"],"summary":"Create Definition","description":"Define a tenant webhook tool; internal tools ship with the platform.","operationId":"create_definition_v1_tools_definitions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolDefinitionCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookToolDefinitionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/tools/definitions/{definition_id}":{"get":{"tags":["tools"],"summary":"Get Definition","operationId":"get_definition_v1_tools_definitions__definition_id__get","parameters":[{"name":"definition_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Definition Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookToolDefinitionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"patch":{"tags":["tools"],"summary":"Update Definition","operationId":"update_definition_v1_tools_definitions__definition_id__patch","parameters":[{"name":"definition_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Definition Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolDefinitionUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookToolDefinitionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"delete":{"tags":["tools"],"summary":"Delete Definition","operationId":"delete_definition_v1_tools_definitions__definition_id__delete","parameters":[{"name":"definition_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Definition Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/tools/installations":{"get":{"tags":["tools"],"summary":"List Installations","operationId":"list_installations_v1_tools_installations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolInstallationListOut"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"post":{"tags":["tools"],"summary":"Create Installation","description":"Install a definition for the tenant, optionally with a credential.","operationId":"create_installation_v1_tools_installations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolInstallationCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolInstallationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/tools/installations/{installation_id}":{"get":{"tags":["tools"],"summary":"Get Installation","operationId":"get_installation_v1_tools_installations__installation_id__get","parameters":[{"name":"installation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Installation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolInstallationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"patch":{"tags":["tools"],"summary":"Update Installation","operationId":"update_installation_v1_tools_installations__installation_id__patch","parameters":[{"name":"installation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Installation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolInstallationUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolInstallationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"delete":{"tags":["tools"],"summary":"Delete Installation","operationId":"delete_installation_v1_tools_installations__installation_id__delete","parameters":[{"name":"installation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Installation Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/tools/signing-secret":{"get":{"tags":["tools"],"summary":"Get Signing Secret","description":"Whether the workspace has a tool-signing secret, and its hint.","operationId":"get_signing_secret_v1_tools_signing_secret_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSigningSecretOut"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"post":{"tags":["tools"],"summary":"Create Signing Secret","description":"Creates the secret that signs the call identity on tool requests. The\nvalue is in this response only when this request created it; one that\nalready exists is rotated to be shown again.","operationId":"create_signing_secret_v1_tools_signing_secret_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSigningSecretOut"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/tools/signing-secret/rotate":{"post":{"tags":["tools"],"summary":"Rotate Signing Secret","description":"A new secret, returned once; the old one stops working at once.","operationId":"rotate_signing_secret_v1_tools_signing_secret_rotate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSigningSecretOut"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/agents/{agent_id}/versions/{version_number}/tools":{"get":{"tags":["tools"],"summary":"List Attachments","operationId":"list_attachments_v1_agents__agent_id__versions__version_number__tools_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"version_number","in":"path","required":true,"schema":{"type":"integer","title":"Version Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolAttachmentListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/agents/{agent_id}/versions/{version_number}/tools/internal/{key}":{"put":{"tags":["tools"],"summary":"Upsert Internal Attachment","description":"Wire a built-in internal tool into a draft agent version by its\ncatalog key (idempotent upsert).","operationId":"upsert_internal_attachment_v1_agents__agent_id__versions__version_number__tools_internal__key__put","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"version_number","in":"path","required":true,"schema":{"type":"integer","title":"Version Number"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalToolAttachmentUpsertRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolAttachmentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"delete":{"tags":["tools"],"summary":"Delete Internal Attachment","operationId":"delete_internal_attachment_v1_agents__agent_id__versions__version_number__tools_internal__key__delete","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"version_number","in":"path","required":true,"schema":{"type":"integer","title":"Version Number"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/agents/{agent_id}/versions/{version_number}/tools/{installation_id}":{"put":{"tags":["tools"],"summary":"Upsert Attachment","description":"Wire a tool installation into a draft agent version (idempotent upsert).","operationId":"upsert_attachment_v1_agents__agent_id__versions__version_number__tools__installation_id__put","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"version_number","in":"path","required":true,"schema":{"type":"integer","title":"Version Number"}},{"name":"installation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Installation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolAttachmentUpsertRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolAttachmentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]},"delete":{"tags":["tools"],"summary":"Delete Attachment","operationId":"delete_attachment_v1_agents__agent_id__versions__version_number__tools__installation_id__delete","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"version_number","in":"path","required":true,"schema":{"type":"integer","title":"Version Number"}},{"name":"installation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Installation Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":[]}]}},"/v1/enrichers":{"get":{"tags":["enrichers"],"summary":"List Enrichers","description":"The workspace's enrichers by name, each with the agent versions that\nname it (a bounded set — no pagination).","operationId":"list_enrichers_v1_enrichers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnricherListOut"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["tools:read"]}]},"post":{"tags":["enrichers"],"summary":"Create Enricher","description":"Registers an endpoint the platform asks about the caller while a call\nis built. It runs on the calls of every published version whose prompts\nname it as ``{{name}}``.","operationId":"create_enricher_v1_enrichers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnricherCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnricherOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["tools:write"]}]}},"/v1/enrichers/{enricher_id}":{"get":{"tags":["enrichers"],"summary":"Get Enricher","operationId":"get_enricher_v1_enrichers__enricher_id__get","parameters":[{"name":"enricher_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Enricher Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnricherOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["tools:read"]}]},"patch":{"tags":["enrichers"],"summary":"Update Enricher","description":"Edits apply to every version that names the enricher from its next\ncall — the config is not versioned; ``status`` disabled is the kill\nswitch. The name is immutable.","operationId":"update_enricher_v1_enrichers__enricher_id__patch","parameters":[{"name":"enricher_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Enricher Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnricherUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnricherOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["tools:write"]}]},"delete":{"tags":["enrichers"],"summary":"Delete Enricher","description":"Refused (409, naming the agents) while an agent version that can still\nrun names it; its credential is scheduled for deletion after the commit.","operationId":"delete_enricher_v1_enrichers__enricher_id__delete","parameters":[{"name":"enricher_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Enricher Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["tools:write"]}]}},"/v1/enrichers/{enricher_id}/test":{"post":{"tags":["enrichers"],"summary":"Test Enricher","description":"One marked request (``X-Sinwan-Test: true``, a fresh call id) against\nthe real endpoint, answering with the block a call would carry. Writes\nnothing.","operationId":"test_enricher_v1_enrichers__enricher_id__test_post","parameters":[{"name":"enricher_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Enricher Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnricherTestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnricherTestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]},{"OAuth2":["tools:write"]}]}}},"components":{"schemas":{"AgentConnectionsOut":{"properties":{"version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version Number"},"tools":{"items":{"$ref":"#/components/schemas/ToolLinkOut"},"type":"array","title":"Tools"},"knowledge_bases":{"items":{"$ref":"#/components/schemas/KnowledgeLinkOut"},"type":"array","title":"Knowledge Bases"},"mcp_servers":{"items":{"$ref":"#/components/schemas/McpLinkOut"},"type":"array","title":"Mcp Servers"},"enrichers":{"items":{"$ref":"#/components/schemas/EnricherLinkOut"},"type":"array","title":"Enrichers"},"delivery_endpoints":{"items":{"$ref":"#/components/schemas/DeliveryLinkOut"},"type":"array","title":"Delivery Endpoints"}},"type":"object","required":["version_number","tools","knowledge_bases","mcp_servers","enrichers","delivery_endpoints"],"title":"AgentConnectionsOut","description":"What the agent's active version is wired to (PLAN-console D23), with\nseven days of tool-run evidence."},"AgentCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"AgentCreateRequest"},"AgentDetailOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"$ref":"#/components/schemas/AgentStatus"},"active_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Active Version Number"},"avatar_color":{"type":"string","enum":["steel","terracotta","plum","petrol","amber","rose","slate","moss"],"title":"Avatar Color"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"active_version":{"anyOf":[{"$ref":"#/components/schemas/app__routes__agents__schemas__VersionOut"},{"type":"null"}]},"latest_version_number":{"type":"integer","title":"Latest Version Number"},"has_draft":{"type":"boolean","title":"Has Draft"}},"type":"object","required":["id","name","status","active_version_number","avatar_color","created_at","updated_at","active_version","latest_version_number","has_draft"],"title":"AgentDetailOut"},"AgentOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"$ref":"#/components/schemas/AgentStatus"},"active_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Active Version Number"},"avatar_color":{"type":"string","enum":["steel","terracotta","plum","petrol","amber","rose","slate","moss"],"title":"Avatar Color"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","status","active_version_number","avatar_color","created_at","updated_at"],"title":"AgentOut"},"AgentPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AgentOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"AgentPage"},"AgentStatsOut":{"properties":{"window":{"$ref":"#/components/schemas/WindowOut"},"calls":{"$ref":"#/components/schemas/MetricOut"},"answer_rate":{"$ref":"#/components/schemas/MetricOut"},"avg_duration_seconds":{"$ref":"#/components/schemas/MetricOut"},"human_requests":{"$ref":"#/components/schemas/MetricOut"},"per_day":{"items":{"$ref":"#/components/schemas/DayOut"},"type":"array","title":"Per Day"}},"type":"object","required":["window","calls","answer_rate","avg_duration_seconds","human_requests","per_day"],"title":"AgentStatsOut"},"AgentStatus":{"type":"string","enum":["draft","active","archived"],"title":"AgentStatus"},"AgentUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"status":{"anyOf":[{"type":"string","enum":["active","archived"]},{"type":"null"}],"title":"Status"},"avatar_color":{"anyOf":[{"type":"string","enum":["steel","terracotta","plum","petrol","amber","rose","slate","moss"]},{"type":"null"}],"title":"Avatar Color"}},"type":"object","title":"AgentUpdateRequest","description":"PATCH body: ``status`` accepts only ``archived`` (archive) or\n``active`` (unarchive — the server recomputes the real status)."},"AgentVersionStatus":{"type":"string","enum":["draft","published","archived"],"title":"AgentVersionStatus"},"AnalysisListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AnalysisResultOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"AnalysisListOut"},"AnalysisResultOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"analyzer_version":{"type":"string","title":"Analyzer Version"},"status":{"$ref":"#/components/schemas/AnalysisStatus","description":"'failed' only once the analysis is final; while the analyzer is still retrying it reads 'pending'."},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"sentiment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sentiment"},"intent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"},"extracted_fields":{"additionalProperties":true,"type":"object","title":"Extracted Fields"},"scores":{"additionalProperties":true,"type":"object","title":"Scores"},"recommendations":{"items":{},"type":"array","title":"Recommendations"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"A stable code when status is 'failed': provider_unavailable, invalid_output, input_rejected, no_transcript, or analysis_failed for an older failure."},"transcript_basis":{"anyOf":[{"$ref":"#/components/schemas/TranscriptBasis"},{"type":"null"}],"description":"What was analyzed: 'recording' is the read of the call audio, 'live' the in-call transcript used when the recording could not be read."},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","analyzer_version","status","summary","sentiment","intent","outcome","extracted_fields","scores","recommendations","error","transcript_basis","completed_at","created_at"],"title":"AnalysisResultOut"},"AnalysisStatus":{"type":"string","enum":["pending","running","completed","failed"],"title":"AnalysisStatus"},"ApiKeyCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["name"],"title":"ApiKeyCreateRequest"},"ApiKeyCreatedResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"secret":{"type":"string","title":"Secret"}},"type":"object","required":["id","name","key_prefix","scopes","created_at","last_used_at","expires_at","revoked_at","secret"],"title":"ApiKeyCreatedResponse"},"ApiKeyOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"}},"type":"object","required":["id","name","key_prefix","scopes","created_at","last_used_at","expires_at","revoked_at"],"title":"ApiKeyOut"},"AssistantConnectionListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AssistantConnectionOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"AssistantConnectionListOut"},"AssistantConnectionOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"client_name":{"type":"string","title":"Client Name"},"client_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Uri"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"user_email":{"type":"string","title":"User Email"},"is_mine":{"type":"boolean","title":"Is Mine"},"status":{"type":"string","enum":["active","expired"],"title":"Status"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"connected_at":{"type":"string","format":"date-time","title":"Connected At"},"last_active_at":{"type":"string","format":"date-time","title":"Last Active At"}},"type":"object","required":["id","client_name","client_uri","user_id","user_name","user_email","is_mine","status","scopes","connected_at","last_active_at"],"title":"AssistantConnectionOut"},"AttachmentListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AttachmentOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"AttachmentListOut"},"AttachmentOut":{"properties":{"mcp_server_id":{"type":"string","format":"uuid","title":"Mcp Server Id"},"server_name":{"type":"string","title":"Server Name"},"enabled":{"type":"boolean","title":"Enabled"},"tool_allowlist":{"items":{"type":"string"},"type":"array","title":"Tool Allowlist"},"alias":{"type":"string","title":"Alias"},"timeout_seconds":{"type":"integer","title":"Timeout Seconds"},"tools":{"items":{"$ref":"#/components/schemas/FrozenToolOut"},"type":"array","title":"Tools"},"unknown_tools":{"items":{"type":"string"},"type":"array","title":"Unknown Tools"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["mcp_server_id","server_name","enabled","tool_allowlist","alias","timeout_seconds","tools","unknown_tools","created_at","updated_at"],"title":"AttachmentOut"},"AttachmentUpsertRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":true},"tool_allowlist":{"items":{"type":"string","maxLength":100,"minLength":1},"type":"array","title":"Tool Allowlist"},"alias":{"anyOf":[{"type":"string","pattern":"^[a-z0-9_]{1,24}$"},{"type":"null"}],"title":"Alias"},"timeout_seconds":{"anyOf":[{"type":"integer","maximum":30.0,"minimum":1.0},{"type":"null"}],"title":"Timeout Seconds"}},"type":"object","title":"AttachmentUpsertRequest"},"AttemptListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AttemptOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"AttemptListOut"},"AttemptOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"kind":{"type":"string","title":"Kind"},"attempt_no":{"type":"integer","title":"Attempt No"},"ok":{"type":"boolean","title":"Ok"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"finished_at":{"type":"string","format":"date-time","title":"Finished At"},"duration_ms":{"type":"integer","title":"Duration Ms"},"endpoint_id":{"type":"string","format":"uuid","title":"Endpoint Id"},"endpoint_name":{"type":"string","title":"Endpoint Name"},"destination_type":{"$ref":"#/components/schemas/DeliveryDestinationType"},"endpoint_deleted":{"type":"boolean","title":"Endpoint Deleted","default":false},"delivery_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Delivery Id"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"response_meta":{"additionalProperties":true,"type":"object","title":"Response Meta"}},"type":"object","required":["id","kind","attempt_no","ok","error","started_at","finished_at","duration_ms","endpoint_id","endpoint_name","destination_type","delivery_id","call_id","response_meta"],"title":"AttemptOut"},"AuthorizeResponse":{"properties":{"authorization_url":{"type":"string","title":"Authorization Url"}},"type":"object","required":["authorization_url"],"title":"AuthorizeResponse"},"AvailableNumberOut":{"properties":{"phone_number":{"type":"string","title":"Phone Number"},"locality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locality"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"iso_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iso Country"},"voice_capable":{"type":"boolean","title":"Voice Capable"},"sms_capable":{"type":"boolean","title":"Sms Capable"},"address_requirements":{"type":"string","title":"Address Requirements"},"monthly_price_minor":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Monthly Price Minor"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"}},"type":"object","required":["phone_number","locality","region","iso_country","voice_capable","sms_capable","address_requirements"],"title":"AvailableNumberOut"},"BalanceOut":{"properties":{"currency":{"type":"string","title":"Currency"},"balance_minor":{"type":"integer","title":"Balance Minor"},"balance_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Balance Cents","description":"Deprecated alias of the *_minor field, present only on a USD wallet.","deprecated":true},"ledger":{"items":{"$ref":"#/components/schemas/LedgerEntryOut"},"type":"array","title":"Ledger"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["currency","balance_minor","ledger","next_cursor"],"title":"BalanceOut"},"BillingDetails":{"properties":{"legal_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Legal Name"},"tax_id":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Tax Id"},"address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Address"},"receipt_emails":{"anyOf":[{"items":{"type":"string","format":"email"},"type":"array","maxItems":5},{"type":"null"}],"title":"Receipt Emails"}},"type":"object","title":"BillingDetails","description":"What a receipt names (PLAN-onboarding-billing D11). On a write, an\nomitted key stays and an empty value clears it."},"Body_upload_document_v1_knowledge_bases__kb_id__sources__source_id__documents_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"}},"type":"object","required":["file"],"title":"Body_upload_document_v1_knowledge_bases__kb_id__sources__source_id__documents_upload_post"},"Body_upload_logo_v1_branding_logo_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_logo_v1_branding_logo_post"},"BrandingOut":{"properties":{"display_name":{"type":"string","title":"Display Name"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"primary_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Color"},"support_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Phone"},"website_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website Url"},"privacy_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Privacy Url"},"configured":{"type":"boolean","title":"Configured"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"contrast_white":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Contrast White"},"text_on_brand":{"anyOf":[{"type":"string","enum":["white","black"]},{"type":"null"}],"title":"Text On Brand"}},"type":"object","required":["display_name","logo_url","primary_color","support_phone","website_url","privacy_url","configured","updated_at","contrast_white","text_on_brand"],"title":"BrandingOut","description":"What every end-customer page shows for this workspace (D16);\n``configured`` is false while the defaults (the workspace name, the\nplatform color) stand in."},"BrandingPutRequest":{"properties":{"display_name":{"type":"string","maxLength":255,"minLength":1,"title":"Display Name"},"primary_color":{"anyOf":[{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},{"type":"null"}],"title":"Primary Color"},"support_phone":{"anyOf":[{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},{"type":"null"}],"title":"Support Phone"},"website_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Website Url"},"privacy_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Privacy Url"}},"type":"object","required":["display_name"],"title":"BrandingPutRequest"},"CallCounts":{"properties":{"total":{"type":"integer","title":"Total"},"by_status":{"additionalProperties":{"type":"integer"},"propertyNames":{"$ref":"#/components/schemas/CallStatus"},"type":"object","title":"By Status"}},"type":"object","required":["total","by_status"],"title":"CallCounts"},"CallDetailOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"direction":{"$ref":"#/components/schemas/CallDirection"},"status":{"$ref":"#/components/schemas/CallStatus"},"outcome":{"$ref":"#/components/schemas/CallOutcome"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"agent_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Version Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"workflow_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Version Id"},"campaign_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Campaign Id"},"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contact Id"},"lead_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lead Id"},"phone_number_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Phone Number Id"},"from_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Number"},"to_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Number"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"answered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Answered At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"detected_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detected Language"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name"},"workflow_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Name"},"cost_minor":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cost Minor"},"cost_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cost Currency"},"cost_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cost Cents","description":"Deprecated alias of cost_minor, present only in USD.","deprecated":true},"provider":{"type":"string","title":"Provider"},"provider_call_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Call Sid"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"recording_available":{"type":"boolean","title":"Recording Available"},"agent_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agent Version Number"},"latest_analysis":{"anyOf":[{"$ref":"#/components/schemas/AnalysisResultOut"},{"type":"null"}]},"human_requests":{"items":{"$ref":"#/components/schemas/HumanRequestOut"},"type":"array","title":"Human Requests"},"sms_messages":{"items":{"$ref":"#/components/schemas/CallSmsOut"},"type":"array","title":"Sms Messages"}},"type":"object","required":["id","direction","status","outcome","agent_id","agent_version_id","workflow_id","workflow_version_id","campaign_id","contact_id","lead_id","phone_number_id","from_number","to_number","started_at","answered_at","ended_at","duration_seconds","detected_language","created_at","updated_at","provider","provider_call_sid","metadata","recording_available","agent_version_number","latest_analysis","human_requests","sms_messages"],"title":"CallDetailOut"},"CallDirection":{"type":"string","enum":["inbound","outbound"],"title":"CallDirection"},"CallEventListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CallEventOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"CallEventListOut"},"CallEventOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"event_type":{"type":"string","title":"Event Type"},"sequence_number":{"type":"integer","title":"Sequence Number"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"}},"type":"object","required":["id","event_type","sequence_number","timestamp","payload"],"title":"CallEventOut"},"CallOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"direction":{"$ref":"#/components/schemas/CallDirection"},"status":{"$ref":"#/components/schemas/CallStatus"},"outcome":{"$ref":"#/components/schemas/CallOutcome"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"agent_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Version Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"workflow_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Version Id"},"campaign_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Campaign Id"},"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contact Id"},"lead_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lead Id"},"phone_number_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Phone Number Id"},"from_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Number"},"to_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Number"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"answered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Answered At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"detected_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detected Language"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name"},"workflow_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Name"},"cost_minor":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cost Minor"},"cost_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cost Currency"},"cost_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cost Cents","description":"Deprecated alias of cost_minor, present only in USD.","deprecated":true}},"type":"object","required":["id","direction","status","outcome","agent_id","agent_version_id","workflow_id","workflow_version_id","campaign_id","contact_id","lead_id","phone_number_id","from_number","to_number","started_at","answered_at","ended_at","duration_seconds","detected_language","created_at","updated_at"],"title":"CallOut"},"CallOutcome":{"type":"string","enum":["interested","not_interested","no_answer","voicemail","transferred","do_not_call","unknown"],"title":"CallOutcome"},"CallPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CallOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"CallPage"},"CallPromptListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CallPromptOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"CallPromptListOut"},"CallPromptOut":{"properties":{"agent":{"type":"string","title":"Agent"},"protocol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Protocol"},"conversation":{"type":"string","title":"Conversation"},"delegation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delegation"},"recorded_at":{"type":"string","format":"date-time","title":"Recorded At"}},"type":"object","required":["agent","protocol","conversation","delegation","recorded_at"],"title":"CallPromptOut","description":"One rendering the runtime recorded (PLAN-console D21): ``conversation``\nis what the model that talks read, ``delegation`` the backend's half on a\ndelegating link. ``agent`` is the runtime's agent key — ``agent`` on a\nsingle-agent call, the node key on a workflow call."},"CallSmsLinkOut":{"properties":{"token":{"type":"string","title":"Token","description":"The code at the end of the short link in the text."},"target":{"type":"string","title":"Target","description":"The address it redirects to, as the agent wrote it."},"opened_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Opened At","description":"When the caller first opened it; null while they have not."},"opens":{"type":"integer","title":"Opens","description":"How many times it was opened; link previews do not count."}},"type":"object","required":["token","target","opened_at","opens"],"title":"CallSmsLinkOut","description":"A short link in a message: where it leads and whether the caller opened it."},"CallSmsOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"to":{"type":"string","title":"To","description":"The caller's number it went to."},"text":{"type":"string","title":"Text","description":"The message exactly as sent, the business's name included."},"status":{"type":"string","title":"Status","description":"'sent' — the provider accepted it and no report has come yet; 'delivered' — the carrier reported it on the phone; 'failed' — the provider refused it, or the carrier reported it undelivered (see error)."},"segments":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Segments","description":"The SMS segments the provider bills for it; null when it was refused."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"sent_at":{"type":"string","format":"date-time","title":"Sent At"},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivered At"},"links":{"items":{"$ref":"#/components/schemas/CallSmsLinkOut"},"type":"array","title":"Links","description":"The short links the platform put in place of the links the agent wrote."}},"type":"object","required":["id","to","text","status","segments","error","sent_at","delivered_at","links"],"title":"CallSmsOut","description":"One message the agent texted the caller (send_sms) — the same shape in\nget_call and GET /v1/calls/{id}."},"CallStatus":{"type":"string","enum":["queued","ringing","in_progress","completed","failed","canceled"],"title":"CallStatus"},"CampaignCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"lead_list_id":{"type":"string","format":"uuid","title":"Lead List Id"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"phone_number_id":{"type":"string","format":"uuid","title":"Phone Number Id"},"max_concurrent_calls":{"type":"integer","maximum":2147483647.0,"minimum":1.0,"title":"Max Concurrent Calls","default":1},"max_attempts_per_lead":{"type":"integer","maximum":2147483647.0,"minimum":1.0,"title":"Max Attempts Per Lead","default":3},"retry_interval_minutes":{"type":"integer","maximum":2147483647.0,"minimum":1.0,"title":"Retry Interval Minutes","default":60},"timezone":{"type":"string","maxLength":64,"minLength":1,"title":"Timezone","default":"UTC"},"calling_window_start":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Calling Window Start"},"calling_window_end":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Calling Window End"},"allowed_days_of_week":{"items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]},"type":"array","title":"Allowed Days Of Week","description":"Days the dialer may call, deduped into week order; empty means every day is allowed."},"start_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start At"},"end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End At"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["name","lead_list_id","phone_number_id"],"title":"CampaignCreateRequest"},"CampaignDetailOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"$ref":"#/components/schemas/CampaignStatus"},"lead_list_id":{"type":"string","format":"uuid","title":"Lead List Id"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"phone_number_id":{"type":"string","format":"uuid","title":"Phone Number Id"},"max_concurrent_calls":{"type":"integer","title":"Max Concurrent Calls"},"max_attempts_per_lead":{"type":"integer","title":"Max Attempts Per Lead"},"retry_interval_minutes":{"type":"integer","title":"Retry Interval Minutes"},"timezone":{"type":"string","title":"Timezone"},"calling_window_start":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Calling Window Start"},"calling_window_end":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Calling Window End"},"allowed_days_of_week":{"items":{"type":"string"},"type":"array","title":"Allowed Days Of Week"},"start_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start At"},"end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End At"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"call_counts":{"$ref":"#/components/schemas/CallCounts"}},"type":"object","required":["id","name","status","lead_list_id","agent_id","workflow_id","phone_number_id","max_concurrent_calls","max_attempts_per_lead","retry_interval_minutes","timezone","calling_window_start","calling_window_end","allowed_days_of_week","start_at","end_at","metadata","created_at","updated_at","call_counts"],"title":"CampaignDetailOut"},"CampaignOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"$ref":"#/components/schemas/CampaignStatus"},"lead_list_id":{"type":"string","format":"uuid","title":"Lead List Id"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"phone_number_id":{"type":"string","format":"uuid","title":"Phone Number Id"},"max_concurrent_calls":{"type":"integer","title":"Max Concurrent Calls"},"max_attempts_per_lead":{"type":"integer","title":"Max Attempts Per Lead"},"retry_interval_minutes":{"type":"integer","title":"Retry Interval Minutes"},"timezone":{"type":"string","title":"Timezone"},"calling_window_start":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Calling Window Start"},"calling_window_end":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Calling Window End"},"allowed_days_of_week":{"items":{"type":"string"},"type":"array","title":"Allowed Days Of Week"},"start_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start At"},"end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End At"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","status","lead_list_id","agent_id","workflow_id","phone_number_id","max_concurrent_calls","max_attempts_per_lead","retry_interval_minutes","timezone","calling_window_start","calling_window_end","allowed_days_of_week","start_at","end_at","metadata","created_at","updated_at"],"title":"CampaignOut"},"CampaignPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CampaignOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"CampaignPage"},"CampaignStatus":{"type":"string","enum":["draft","scheduled","active","paused","completed","canceled"],"title":"CampaignStatus"},"CampaignUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"lead_list_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lead List Id"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"phone_number_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Phone Number Id"},"max_concurrent_calls":{"anyOf":[{"type":"integer","maximum":2147483647.0,"minimum":1.0},{"type":"null"}],"title":"Max Concurrent Calls"},"max_attempts_per_lead":{"anyOf":[{"type":"integer","maximum":2147483647.0,"minimum":1.0},{"type":"null"}],"title":"Max Attempts Per Lead"},"retry_interval_minutes":{"anyOf":[{"type":"integer","maximum":2147483647.0,"minimum":1.0},{"type":"null"}],"title":"Retry Interval Minutes"},"timezone":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Timezone"},"calling_window_start":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Calling Window Start"},"calling_window_end":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Calling Window End"},"allowed_days_of_week":{"anyOf":[{"items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]},"type":"array"},{"type":"null"}],"title":"Allowed Days Of Week"},"start_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start At"},"end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End At"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","title":"CampaignUpdateRequest","description":"PATCH body: omitted fields keep their value; ``metadata`` and\n``allowed_days_of_week`` are replaced as a whole, null resets them to\nempty; null clears the calling window (as a pair), ``start_at``, and\n``end_at``. An ``end_at`` that lands at or before the merged ``start_at``\nis rejected by the service with 409."},"CatalogEntryOut":{"properties":{"capability":{"type":"string","title":"Capability"},"provider":{"type":"string","title":"Provider"},"model":{"type":"string","title":"Model"},"deprecated":{"type":"boolean","title":"Deprecated"},"used_by":{"type":"string","title":"Used By"},"protocol":{"type":"string","title":"Protocol"}},"type":"object","required":["capability","provider","model","deprecated","used_by","protocol"],"title":"CatalogEntryOut"},"CatalogOut":{"properties":{"providers":{"items":{"$ref":"#/components/schemas/CatalogProviderOut"},"type":"array","title":"Providers"},"entries":{"items":{"$ref":"#/components/schemas/CatalogEntryOut"},"type":"array","title":"Entries"}},"type":"object","required":["providers","entries"],"title":"CatalogOut","description":"The models an agent version can name — the realtime model that runs the\ncall (``voice_config``) and the text model that extracts fields after it\n(``analysis_config.model``), each labelled with which. Embedding models are\nserved by the knowledge-base route instead. Deprecated entries are included,\nflagged, so the UI can show-but-disable them. No language list: the spoken\nlanguage is any well-formed BCP-47 tag (PLAN-languages D1/D2)."},"CatalogProviderOut":{"properties":{"key":{"type":"string","title":"Key"},"display_name":{"type":"string","title":"Display Name"},"byok":{"type":"boolean","title":"Byok"}},"type":"object","required":["key","display_name","byok"],"title":"CatalogProviderOut"},"CheckoutIn":{"properties":{"package":{"type":"string","maxLength":32,"minLength":1,"title":"Package"},"market":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Market","description":"The market whose package this is. A signed-in buyer buys in their workspace's market (409 when this names another); a visitor without one buys in the default market."},"email":{"type":"string","format":"email","title":"Email"},"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"locale":{"type":"string","maxLength":35,"minLength":2,"title":"Locale","default":"en"},"apple_pay":{"type":"boolean","title":"Apple Pay","description":"Offer Apple Pay in the payment frame. Only a page that loads Tranzila's Apple Pay script and is served from a domain registered with Apple for the terminal can complete it: the payment sheet is opened by the parent page, not the frame.","default":false}},"type":"object","required":["package","email","name"],"title":"CheckoutIn"},"CheckoutOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","title":"Status"},"package":{"type":"string","title":"Package"},"market":{"type":"string","title":"Market"},"currency":{"type":"string","title":"Currency"},"price_minor":{"type":"integer","title":"Price Minor"},"credit_currency":{"type":"string","title":"Credit Currency"},"credit_minor":{"type":"integer","title":"Credit Minor"},"credit_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credit Cents","description":"Deprecated alias of the *_minor field, present only on a USD wallet.","deprecated":true},"receipt_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Receipt Number"},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"},"card_last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card Last4"},"credited":{"type":"boolean","title":"Credited"},"payment_url":{"type":"string","title":"Payment Url"},"workspace_bound":{"type":"boolean","title":"Workspace Bound"}},"type":"object","required":["id","status","package","market","currency","price_minor","credit_currency","credit_minor","receipt_number","paid_at","card_last4","credited","payment_url","workspace_bound"],"title":"CheckoutOut"},"ChunkResultOut":{"properties":{"chunk_id":{"type":"string","format":"uuid","title":"Chunk Id"},"document_id":{"type":"string","format":"uuid","title":"Document Id"},"document_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Title"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"heading_path":{"items":{"type":"string"},"type":"array","title":"Heading Path"},"text":{"type":"string","title":"Text"},"score":{"type":"number","title":"Score"},"ord":{"type":"integer","title":"Ord"}},"type":"object","required":["chunk_id","document_id","document_title","uri","heading_path","text","score","ord"],"title":"ChunkResultOut"},"CommCallSource":{"type":"string","enum":["inbound","outbound_direct","outbound_campaign"],"title":"CommCallSource"},"CommChannel":{"type":"string","enum":["email","whatsapp","sms"],"title":"CommChannel"},"CommMessageListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CommMessageOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"CommMessageListOut"},"CommMessageOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"rule_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rule Id"},"channel":{"$ref":"#/components/schemas/CommChannel"},"recipient":{"type":"string","title":"Recipient"},"template_key":{"type":"string","title":"Template Key"},"locale":{"type":"string","title":"Locale"},"rendered_locale":{"type":"string","title":"Rendered Locale"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"status":{"$ref":"#/components/schemas/CommMessageStatus"},"attempt_count":{"type":"integer","title":"Attempt Count"},"next_attempt_at":{"type":"string","format":"date-time","title":"Next Attempt At"},"last_attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Attempt At"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"provider_message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Message Id"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","rule_id","channel","recipient","template_key","locale","rendered_locale","call_id","status","attempt_count","next_attempt_at","last_attempt_at","last_error","provider","provider_message_id","sent_at","created_at"],"title":"CommMessageOut"},"CommMessageStatus":{"type":"string","enum":["pending","sent","failed","dead","blocked"],"title":"CommMessageStatus"},"CommsTickOut":{"properties":{"claimed":{"type":"integer","title":"Claimed"},"sent":{"type":"integer","title":"Sent"},"retried":{"type":"integer","title":"Retried"},"failed":{"type":"integer","title":"Failed"},"blocked":{"type":"integer","title":"Blocked"}},"type":"object","required":["claimed","sent","retried","failed","blocked"],"title":"CommsTickOut"},"ConfirmPhoneVerificationRequest":{"properties":{"challenge_id":{"type":"string","format":"uuid","title":"Challenge Id"},"code":{"type":"string","maxLength":10,"minLength":4,"title":"Code"}},"type":"object","required":["challenge_id","code"],"title":"ConfirmPhoneVerificationRequest"},"ConnectionOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"$ref":"#/components/schemas/McpServerStatus"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"}},"type":"object","required":["id","name","status","last_error"],"title":"ConnectionOut"},"ConnectorListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ConnectorOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"ConnectorListOut"},"ConnectorOut":{"properties":{"key":{"type":"string","title":"Key"},"kind":{"type":"string","enum":["vendor","hosted"],"title":"Kind"},"display_name":{"type":"string","title":"Display Name"},"category":{"type":"string","title":"Category"},"description":{"type":"string","title":"Description"},"auth_type":{"type":"string","enum":["none","bearer","oauth"],"title":"Auth Type"},"availability":{"type":"string","enum":["ga","preview"],"title":"Availability"},"connectable":{"type":"boolean","title":"Connectable"},"tools_preview":{"items":{"type":"string"},"type":"array","title":"Tools Preview"},"docs_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Docs Url"},"setup_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Setup Notes"},"connections":{"items":{"$ref":"#/components/schemas/ConnectionOut"},"type":"array","title":"Connections"}},"type":"object","required":["key","kind","display_name","category","description","auth_type","availability","connectable","tools_preview","docs_url","setup_notes","connections"],"title":"ConnectorOut"},"ConsentDecisionRequest":{"properties":{"client_id":{"type":"string","title":"Client Id"},"redirect_uri":{"type":"string","title":"Redirect Uri"},"response_type":{"type":"string","title":"Response Type","default":"code"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"code_challenge":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Challenge"},"code_challenge_method":{"type":"string","title":"Code Challenge Method","default":"S256"},"resource":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource"},"approve":{"type":"boolean","title":"Approve"},"tenant_id":{"type":"string","format":"uuid","title":"Tenant Id"},"approved_scopes":{"items":{"type":"string"},"type":"array","title":"Approved Scopes","default":[]}},"type":"object","required":["client_id","redirect_uri","approve","tenant_id"],"title":"ConsentDecisionRequest","description":"The user's consent decision: the original authorization parameters\n(re-validated server-side; never trusted from the echo) plus the outcome\nand which tenant the grant applies to."},"ConsentRedirect":{"properties":{"redirect_to":{"type":"string","title":"Redirect To"}},"type":"object","required":["redirect_to"],"title":"ConsentRedirect","description":"Where the browser should go next — the client's redirect URI carrying\neither the authorization code or the error."},"ConsoleSessionResponse":{"properties":{"user":{"$ref":"#/components/schemas/UserOut"},"tenant":{"$ref":"#/components/schemas/TenantOut"},"role":{"type":"string","title":"Role"},"memberships":{"items":{"$ref":"#/components/schemas/MembershipOut"},"type":"array","title":"Memberships"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["user","tenant","role","memberships","expires_in"],"title":"ConsoleSessionResponse","description":"What the console learns at sign-in. The credentials ride in cookies\n(PLAN-console D9), never in this body."},"ContactCreateRequest":{"properties":{"phone_e164":{"anyOf":[{"type":"string","pattern":"^\\+[1-9]\\d{1,14}$"},{"type":"null"}],"title":"Phone E164"},"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string","maxLength":255,"format":"email"},{"type":"null"}],"title":"Email"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"external_ref":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"External Ref"}},"type":"object","title":"ContactCreateRequest"},"ContactOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"phone_e164":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone E164"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Ref"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","phone_e164","name","email","external_ref","metadata","created_at","updated_at"],"title":"ContactOut"},"ContactPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ContactOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"ContactPage"},"ContactUpdateRequest":{"properties":{"phone_e164":{"anyOf":[{"type":"string","pattern":"^\\+[1-9]\\d{1,14}$"},{"type":"null"}],"title":"Phone E164"},"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string","maxLength":255,"format":"email"},{"type":"null"}],"title":"Email"},"external_ref":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"External Ref"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","title":"ContactUpdateRequest","description":"PATCH body: omitted fields keep their value, explicit nulls clear them;\n``metadata`` is replaced as a whole, never deep-merged."},"ContactUpsertRequest":{"properties":{"phone_e164":{"anyOf":[{"type":"string","pattern":"^\\+[1-9]\\d{1,14}$"},{"type":"null"}],"title":"Phone E164"},"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string","maxLength":255,"format":"email"},{"type":"null"}],"title":"Email"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","title":"ContactUpsertRequest","description":"The mutable fields of a contact — what a CRM sync sends for one person."},"ContextResponse":{"properties":{"tenant_id":{"type":"string","format":"uuid","title":"Tenant Id"},"principal":{"$ref":"#/components/schemas/PrincipalOut"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"}},"type":"object","required":["tenant_id","principal","scopes"],"title":"ContextResponse","description":"The resolved ``AuthContext`` — mostly useful for debugging a credential."},"CreatedCredentialRequestOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"target_kind":{"$ref":"#/components/schemas/CredentialTargetKind"},"target_id":{"type":"string","format":"uuid","title":"Target Id"},"status":{"$ref":"#/components/schemas/CredentialRequestStatus"},"recipient_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient Email"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"url":{"type":"string","title":"Url"},"sent":{"type":"boolean","title":"Sent"}},"type":"object","required":["id","target_kind","target_id","status","recipient_email","expires_at","completed_at","created_at","url","sent"],"title":"CreatedCredentialRequestOut"},"CredentialRequestCreateRequest":{"properties":{"target_kind":{"$ref":"#/components/schemas/CredentialTargetKind"},"target_id":{"type":"string","format":"uuid","title":"Target Id"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"send":{"type":"boolean","title":"Send","default":true}},"type":"object","required":["target_kind","target_id"],"title":"CredentialRequestCreateRequest"},"CredentialRequestListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CredentialRequestOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"CredentialRequestListOut"},"CredentialRequestOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"target_kind":{"$ref":"#/components/schemas/CredentialTargetKind"},"target_id":{"type":"string","format":"uuid","title":"Target Id"},"status":{"$ref":"#/components/schemas/CredentialRequestStatus"},"recipient_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient Email"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","target_kind","target_id","status","recipient_email","expires_at","completed_at","created_at"],"title":"CredentialRequestOut"},"CredentialRequestStatus":{"type":"string","enum":["pending","completed","expired","cancelled"],"title":"CredentialRequestStatus"},"CredentialTargetKind":{"type":"string","enum":["tool_installation","integration","mcp_server_bearer","mcp_server_client_secret","delivery_endpoint_auth","enricher"],"title":"CredentialTargetKind"},"DayOut":{"properties":{"date":{"type":"string","format":"date","title":"Date"},"inbound":{"type":"integer","title":"Inbound"},"outbound":{"type":"integer","title":"Outbound"}},"type":"object","required":["date","inbound","outbound"],"title":"DayOut"},"DeliveryDestinationType":{"type":"string","enum":["webhook","mcp"],"title":"DeliveryDestinationType"},"DeliveryEndpointCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","default":"default"},"destination_type":{"$ref":"#/components/schemas/DeliveryDestinationType"},"subscribed_events":{"items":{"$ref":"#/components/schemas/DeliveryEventType"},"type":"array","title":"Subscribed Events","default":["call.analysis.completed"]},"url":{"anyOf":[{"type":"string","maxLength":2048,"minLength":1},{"type":"null"}],"title":"Url"},"include_transcript":{"type":"boolean","title":"Include Transcript","default":false},"include_recording":{"type":"boolean","title":"Include Recording","default":false},"include_attachments":{"type":"boolean","title":"Include Attachments","default":false},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"auth_header":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Auth Header"},"auth_prefix":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Auth Prefix"},"mcp_server_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Mcp Server Id"},"tool_allowlist":{"items":{"type":"string","maxLength":200,"minLength":1},"type":"array","title":"Tool Allowlist","default":[]},"instructions":{"anyOf":[{"type":"string","maxLength":4000,"minLength":1},{"type":"null"}],"title":"Instructions"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"call_sources":{"anyOf":[{"items":{"$ref":"#/components/schemas/CommCallSource"},"type":"array"},{"type":"null"}],"title":"Call Sources"},"max_attempts":{"anyOf":[{"type":"integer","maximum":6.0,"minimum":1.0},{"type":"null"}],"title":"Max Attempts"}},"type":"object","required":["destination_type"],"title":"DeliveryEndpointCreateRequest"},"DeliveryEndpointListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DeliveryEndpointOut"},"type":"array","title":"Items"},"quota":{"anyOf":[{"$ref":"#/components/schemas/DeliveryQuotaOut"},{"type":"null"}]}},"type":"object","required":["items"],"title":"DeliveryEndpointListOut"},"DeliveryEndpointOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"destination_type":{"$ref":"#/components/schemas/DeliveryDestinationType"},"status":{"$ref":"#/components/schemas/DeliveryEndpointStatus"},"subscribed_events":{"items":{"type":"string"},"type":"array","title":"Subscribed Events"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"include_transcript":{"type":"boolean","title":"Include Transcript"},"include_recording":{"type":"boolean","title":"Include Recording"},"include_attachments":{"type":"boolean","title":"Include Attachments"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers"},"auth_header":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Header"},"has_auth_credential":{"type":"boolean","title":"Has Auth Credential"},"mcp_server_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Mcp Server Id"},"tool_allowlist":{"items":{"type":"string"},"type":"array","title":"Tool Allowlist"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"call_sources":{"items":{"type":"string"},"type":"array","title":"Call Sources"},"max_attempts":{"type":"integer","title":"Max Attempts"},"secret_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret Hint"},"signing_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signing Secret"},"last_delivery":{"anyOf":[{"$ref":"#/components/schemas/LastDeliveryOut"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","destination_type","status","subscribed_events","url","include_transcript","include_recording","include_attachments","headers","auth_header","has_auth_credential","mcp_server_id","tool_allowlist","instructions","agent_id","workflow_id","call_sources","max_attempts","secret_hint","created_at","updated_at"],"title":"DeliveryEndpointOut"},"DeliveryEndpointStatus":{"type":"string","enum":["active","disabled"],"title":"DeliveryEndpointStatus"},"DeliveryEndpointUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"status":{"anyOf":[{"type":"string","enum":["active","disabled"]},{"type":"null"}],"title":"Status"},"subscribed_events":{"anyOf":[{"items":{"$ref":"#/components/schemas/DeliveryEventType"},"type":"array"},{"type":"null"}],"title":"Subscribed Events"},"url":{"anyOf":[{"type":"string","maxLength":2048,"minLength":1},{"type":"null"}],"title":"Url"},"include_transcript":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Transcript"},"include_recording":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Recording"},"include_attachments":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Attachments"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"auth_header":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Auth Header"},"auth_prefix":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Auth Prefix"},"tool_allowlist":{"anyOf":[{"items":{"type":"string","maxLength":200,"minLength":1},"type":"array"},{"type":"null"}],"title":"Tool Allowlist"},"instructions":{"anyOf":[{"type":"string","maxLength":4000,"minLength":1},{"type":"null"}],"title":"Instructions"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"call_sources":{"anyOf":[{"items":{"$ref":"#/components/schemas/CommCallSource"},"type":"array"},{"type":"null"}],"title":"Call Sources"},"max_attempts":{"anyOf":[{"type":"integer","maximum":6.0,"minimum":1.0},{"type":"null"}],"title":"Max Attempts"},"rotate_secret":{"type":"boolean","title":"Rotate Secret","default":false}},"type":"object","title":"DeliveryEndpointUpdateRequest"},"DeliveryEventType":{"type":"string","enum":["call.analysis.completed"],"title":"DeliveryEventType"},"DeliveryLinkOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"destination_type":{"type":"string","title":"Destination Type"},"status":{"type":"string","title":"Status"},"subscribed_events":{"items":{},"type":"array","title":"Subscribed Events"},"agent_scoped":{"type":"boolean","title":"Agent Scoped"}},"type":"object","required":["id","name","destination_type","status","subscribed_events","agent_scoped"],"title":"DeliveryLinkOut"},"DeliveryListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/EventDeliveryOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"DeliveryListOut"},"DeliveryQuotaOut":{"properties":{"endpoints":{"$ref":"#/components/schemas/QuotaCounter"},"mcp_endpoints":{"$ref":"#/components/schemas/QuotaCounter"},"pushes_today":{"$ref":"#/components/schemas/QuotaCounter"}},"type":"object","required":["endpoints","mcp_endpoints","pushes_today"],"title":"DeliveryQuotaOut"},"DeliveryStatus":{"type":"string","enum":["pending","delivered","failed"],"title":"DeliveryStatus"},"DeliveryTestOut":{"properties":{"ok":{"type":"boolean","title":"Ok"},"duration_ms":{"type":"integer","title":"Duration Ms"},"status":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"tool":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool"},"input_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Schema"},"call_result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Call Result"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"attempt_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Attempt Id"}},"type":"object","required":["ok","duration_ms"],"title":"DeliveryTestOut"},"DeliveryTestRequest":{"properties":{"args":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Args"}},"type":"object","title":"DeliveryTestRequest"},"DeliveryTickOut":{"properties":{"claimed":{"type":"integer","title":"Claimed"},"delivered":{"type":"integer","title":"Delivered"},"retried":{"type":"integer","title":"Retried"},"failed":{"type":"integer","title":"Failed"}},"type":"object","required":["claimed","delivered","retried","failed"],"title":"DeliveryTickOut"},"DirectCallCreate":{"properties":{"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contact Id"},"to_number":{"anyOf":[{"type":"string","pattern":"^\\+[1-9]\\d{1,14}$"},{"type":"null"}],"title":"To Number"},"lead_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lead Id"},"phone_number_id":{"type":"string","format":"uuid","title":"Phone Number Id"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["phone_number_id"],"title":"DirectCallCreate","description":"Create and immediately dial one campaign-less outbound call."},"DiscoveredToolOut":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"annotations":{"additionalProperties":true,"type":"object","title":"Annotations"},"oversized":{"type":"boolean","title":"Oversized","default":false}},"type":"object","required":["name","description","annotations"],"title":"DiscoveredToolOut"},"DocumentOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"kb_id":{"type":"string","format":"uuid","title":"Kb Id"},"source_id":{"type":"string","format":"uuid","title":"Source Id"},"status":{"$ref":"#/components/schemas/KbDocumentStatus"},"title":{"type":"string","title":"Title"},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mime Type"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"},"content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash"},"chunk_count":{"type":"integer","title":"Chunk Count"},"token_count":{"type":"integer","title":"Token Count"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"last_ingested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Ingested At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","kb_id","source_id","status","title","uri","filename","mime_type","size_bytes","content_hash","chunk_count","token_count","error","last_ingested_at","created_at","updated_at"],"title":"DocumentOut"},"DocumentPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DocumentOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"DocumentPage"},"EdgeIn":{"properties":{"from":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","title":"From"},"to":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","title":"To"},"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","title":"Key"},"description":{"type":"string","minLength":1,"title":"Description"}},"additionalProperties":false,"type":"object","required":["from","to","key","description"],"title":"EdgeIn"},"EdgeOut":{"properties":{"from":{"type":"string","title":"From"},"to":{"type":"string","title":"To"},"key":{"type":"string","title":"Key"},"description":{"type":"string","title":"Description"}},"type":"object","required":["from","to","key","description"],"title":"EdgeOut"},"EffectiveConfigOut":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"version_number":{"type":"integer","title":"Version Number"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"fields":{"items":{"$ref":"#/components/schemas/EffectiveFieldOut"},"type":"array","title":"Fields"},"provider_config":{"items":{"$ref":"#/components/schemas/EffectiveNativeFieldOut"},"type":"array","title":"Provider Config"}},"type":"object","required":["agent_id","version_number","provider","fields"],"title":"EffectiveConfigOut","description":"The resolved configuration, so the defaults that will govern the call\nare visible before the call rather than after it."},"EffectiveFieldOut":{"properties":{"path":{"type":"string","title":"Path"},"value":{"title":"Value"},"source":{"type":"string","title":"Source"},"provider_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Value"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["path","source"],"title":"EffectiveFieldOut"},"EffectiveNativeFieldOut":{"properties":{"path":{"type":"string","title":"Path"},"value":{"title":"Value"},"status":{"type":"string","enum":["applied","dropped","unknown"],"title":"Status"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["path","status"],"title":"EffectiveNativeFieldOut","description":"One path of ``provider_config`` and what becomes of it on the call."},"EmbeddingModelListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/EmbeddingModelOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"EmbeddingModelListOut"},"EmbeddingModelOut":{"properties":{"provider":{"type":"string","title":"Provider"},"model":{"type":"string","title":"Model"},"deprecated":{"type":"boolean","title":"Deprecated"}},"type":"object","required":["provider","model","deprecated"],"title":"EmbeddingModelOut"},"EnricherCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"display_name":{"type":"string","maxLength":255,"minLength":1,"title":"Display Name"},"description":{"type":"string","maxLength":1000,"title":"Description","default":""},"config":{"additionalProperties":true,"type":"object","title":"Config","default":{}},"integration_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Integration Id"},"source":{"$ref":"#/components/schemas/EnricherSource","default":"webhook"},"mcp_server_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Mcp Server Id"},"tool":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool"},"arguments":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Arguments"}},"type":"object","required":["name","display_name"],"title":"EnricherCreateRequest"},"EnricherLinkOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","name","display_name","status"],"title":"EnricherLinkOut"},"EnricherListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/EnricherOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"EnricherListOut"},"EnricherOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"description":{"type":"string","title":"Description"},"status":{"$ref":"#/components/schemas/EnricherStatus"},"source":{"$ref":"#/components/schemas/EnricherSource"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"mcp_server_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Mcp Server Id"},"connection_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection Name"},"tool":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool"},"arguments":{"additionalProperties":true,"type":"object","title":"Arguments"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"},"allowed_hosts":{"items":{"type":"string"},"type":"array","title":"Allowed Hosts"},"auth":{"additionalProperties":{"type":"string"},"type":"object","title":"Auth"},"has_credential":{"type":"boolean","title":"Has Credential"},"secret_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret Hint"},"integration_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Integration Id"},"used_by":{"items":{"$ref":"#/components/schemas/EnricherUseOut"},"type":"array","title":"Used By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","display_name","description","status","source","config","mcp_server_id","connection_name","tool","arguments","url","method","allowed_hosts","auth","has_credential","secret_hint","integration_id","used_by","created_at","updated_at"],"title":"EnricherOut"},"EnricherSource":{"type":"string","enum":["webhook","connector"],"title":"EnricherSource"},"EnricherStatus":{"type":"string","enum":["active","disabled"],"title":"EnricherStatus"},"EnricherTestOut":{"properties":{"ok":{"type":"boolean","title":"Ok"},"outcome":{"type":"string","title":"Outcome"},"http_status":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Http Status"},"duration_ms":{"type":"integer","title":"Duration Ms"},"rendered":{"type":"string","title":"Rendered"},"body_keys":{"items":{"type":"string"},"type":"array","title":"Body Keys"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"warning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warning"}},"type":"object","required":["ok","outcome","http_status","duration_ms","rendered","body_keys","error"],"title":"EnricherTestOut"},"EnricherTestRequest":{"properties":{"contact_number":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$","title":"Contact Number"},"direction":{"type":"string","enum":["inbound","outbound"],"title":"Direction","default":"inbound"}},"type":"object","required":["contact_number"],"title":"EnricherTestRequest"},"EnricherUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"display_name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Display Name"},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Description"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"},"integration_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Integration Id"},"status":{"anyOf":[{"type":"string","enum":["active","disabled"]},{"type":"null"}],"title":"Status"},"mcp_server_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Mcp Server Id"},"tool":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool"},"arguments":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Arguments"}},"type":"object","title":"EnricherUpdateRequest"},"EnricherUseOut":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"agent_name":{"type":"string","title":"Agent Name"},"version_number":{"type":"integer","title":"Version Number"}},"type":"object","required":["agent_id","agent_name","version_number"],"title":"EnricherUseOut"},"EventDeliveryOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"event_type":{"$ref":"#/components/schemas/DeliveryEventType"},"call_id":{"type":"string","format":"uuid","title":"Call Id"},"analysis_result_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Analysis Result Id"},"status":{"$ref":"#/components/schemas/DeliveryStatus"},"origin":{"type":"string","title":"Origin"},"replay_of_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Replay Of Id"},"attempt_count":{"type":"integer","title":"Attempt Count"},"next_attempt_at":{"type":"string","format":"date-time","title":"Next Attempt At"},"last_attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Attempt At"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"hold_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hold Reason"},"response_meta":{"additionalProperties":true,"type":"object","title":"Response Meta"},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivered At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"attempts":{"items":{"$ref":"#/components/schemas/AttemptOut"},"type":"array","title":"Attempts"}},"type":"object","required":["id","event_type","call_id","analysis_result_id","status","origin","replay_of_id","attempt_count","next_attempt_at","last_attempt_at","last_error","hold_reason","response_meta","delivered_at","created_at"],"title":"EventDeliveryOut"},"EvidenceOut":{"properties":{"event":{"type":"string","title":"Event"},"read":{"type":"string","title":"Read"},"fields":{"items":{"type":"string"},"type":"array","title":"Fields"},"protocols":{"items":{"type":"string"},"type":"array","title":"Protocols"}},"type":"object","required":["event","read"],"title":"EvidenceOut"},"ExchangeCodeRequest":{"properties":{"code":{"type":"string","title":"Code"},"tenant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tenant Id"}},"type":"object","required":["code"],"title":"ExchangeCodeRequest"},"ExchangeRequest":{"properties":{"code":{"type":"string","title":"Code"},"tenant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tenant Id"}},"type":"object","required":["code"],"title":"ExchangeRequest"},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest"},"FrozenToolOut":{"properties":{"name":{"type":"string","title":"Name"},"runtime_name":{"type":"string","title":"Runtime Name"}},"type":"object","required":["name","runtime_name"],"title":"FrozenToolOut"},"GraphIn":{"properties":{"entry":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","title":"Entry"},"nodes":{"items":{"$ref":"#/components/schemas/NodeIn"},"type":"array","title":"Nodes"},"edges":{"items":{"$ref":"#/components/schemas/EdgeIn"},"type":"array","title":"Edges"}},"additionalProperties":false,"type":"object","required":["entry","nodes"],"title":"GraphIn","description":"A whole workflow graph; every write replaces it entirely."},"GraphOut":{"properties":{"entry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entry"},"nodes":{"items":{"$ref":"#/components/schemas/NodeOut"},"type":"array","title":"Nodes"},"edges":{"items":{"$ref":"#/components/schemas/EdgeOut"},"type":"array","title":"Edges"}},"type":"object","required":["entry","nodes","edges"],"title":"GraphOut"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HomeStatsOut":{"properties":{"window":{"$ref":"#/components/schemas/WindowOut"},"calls":{"$ref":"#/components/schemas/MetricOut"},"answer_rate":{"$ref":"#/components/schemas/MetricOut"},"seconds":{"$ref":"#/components/schemas/MetricOut"},"spend_minor":{"$ref":"#/components/schemas/MetricOut"},"spend_cents":{"anyOf":[{"$ref":"#/components/schemas/MetricOut"},{"type":"null"}],"description":"Deprecated alias of spend_minor, present only in USD.","deprecated":true},"currency":{"type":"string","title":"Currency"},"spend_spans_conversion":{"type":"boolean","title":"Spend Spans Conversion"},"per_day":{"items":{"$ref":"#/components/schemas/DayOut"},"type":"array","title":"Per Day"},"outcomes":{"items":{"$ref":"#/components/schemas/ShareOut"},"type":"array","title":"Outcomes"},"languages":{"items":{"$ref":"#/components/schemas/ShareOut"},"type":"array","title":"Languages"},"active_agents":{"type":"integer","title":"Active Agents"}},"type":"object","required":["window","calls","answer_rate","seconds","spend_minor","currency","spend_spans_conversion","per_day","outcomes","languages","active_agents"],"title":"HomeStatsOut"},"HumanAnswerOut":{"properties":{"decision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision","description":"'approved' or 'rejected' for a decision; null for a question."},"text":{"type":"string","title":"Text","description":"The answer's text as written — the caller sees it too."},"by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"By","description":"Who answered, by the name they had when the request was sent."},"at":{"type":"string","format":"date-time","title":"At"}},"type":"object","required":["decision","text","by","at"],"title":"HumanAnswerOut"},"HumanRecipientOut":{"properties":{"name":{"type":"string","title":"Name","description":"The member's name as it was when the request was sent."},"opened_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Opened At","description":"When they first opened the link; null means they never did."}},"type":"object","required":["name","opened_at"],"title":"HumanRecipientOut"},"HumanRequestOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"kind":{"type":"string","title":"Kind","description":"'decision' (yes or no) or 'question' (information)."},"summary":{"type":"string","title":"Summary","description":"What the agent wrote about the call, as written."},"question":{"type":"string","title":"Question"},"spoken_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Spoken Label","description":"What the agent called the recipient out loud; null is 'the team'."},"recipients":{"items":{"$ref":"#/components/schemas/HumanRecipientOut"},"type":"array","title":"Recipients","description":"Who the request was sent to."},"status":{"type":"string","title":"Status","description":"'open' — waiting, still answerable; 'answered'; 'expired' — nobody answered within a day of the call's end; 'undeliverable' — nobody could be reached, and the agent told the caller so."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"answer":{"anyOf":[{"$ref":"#/components/schemas/HumanAnswerOut"},{"type":"null"}]},"customer_notified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Customer Notified At","description":"When the answer's link reached the caller by SMS or email; null when it has not, or no channel could carry it."},"connect_attempts":{"type":"integer","title":"Connect Attempts","description":"How many times a recipient asked to talk to the caller directly."},"connect_state":{"type":"string","title":"Connect State","description":"Where talking to the caller stands: 'idle' (never asked), 'calling_recipient', 'recipient_ready' (they pressed 1 and wait in the room), 'moving' (the live call is moving to them), 'dialing_customer' (the caller is being called into the room — their call had ended, or was not moved in time), 'bridged' (they talked) or 'failed' (the last attempt ended without a conversation)."}},"type":"object","required":["id","kind","summary","question","spoken_label","recipients","status","created_at","answer","customer_notified_at","connect_attempts","connect_state"],"title":"HumanRequestOut","description":"One mid-call request to a person at the business (ask_human) — the\nsame shape in get_call and in the webhook payload's data.human_requests."},"IntegrationAuthType":{"type":"string","enum":["api_key","oauth2","custom"],"title":"IntegrationAuthType"},"IntegrationCreateRequest":{"properties":{"provider":{"type":"string","maxLength":50,"minLength":1,"title":"Provider"},"secret":{"type":"string","maxLength":4096,"minLength":8,"title":"Secret"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","default":"default"}},"type":"object","required":["provider","secret"],"title":"IntegrationCreateRequest"},"IntegrationListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/IntegrationOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"IntegrationListOut"},"IntegrationOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"provider":{"type":"string","title":"Provider"},"name":{"type":"string","title":"Name"},"status":{"$ref":"#/components/schemas/IntegrationStatus"},"auth_type":{"$ref":"#/components/schemas/IntegrationAuthType"},"secret_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret Hint"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","provider","name","status","auth_type","secret_hint","created_at","updated_at"],"title":"IntegrationOut"},"IntegrationStatus":{"type":"string","enum":["active","error","disabled"],"title":"IntegrationStatus"},"IntegrationUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"secret":{"anyOf":[{"type":"string","maxLength":4096,"minLength":8},{"type":"null"}],"title":"Secret"},"status":{"anyOf":[{"type":"string","enum":["active","disabled"]},{"type":"null"}],"title":"Status"}},"type":"object","title":"IntegrationUpdateRequest"},"InternalToolAttachmentUpsertRequest":{"properties":{"runtime_name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Runtime Name"},"enabled":{"type":"boolean","title":"Enabled","default":true},"config_override":{"additionalProperties":true,"type":"object","title":"Config Override"}},"type":"object","title":"InternalToolAttachmentUpsertRequest"},"InternalToolOut":{"properties":{"kind":{"type":"string","const":"internal","title":"Kind","default":"internal"},"key":{"type":"string","title":"Key"},"display_name":{"type":"string","title":"Display Name"},"description":{"type":"string","title":"Description"},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"config_schema":{"additionalProperties":true,"type":"object","title":"Config Schema"},"billing_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Note"}},"type":"object","required":["key","display_name","description","input_schema","config_schema"],"title":"InternalToolOut"},"InvitationAcceptRequest":{"properties":{"token":{"type":"string","maxLength":255,"minLength":8,"title":"Token"}},"type":"object","required":["token"],"title":"InvitationAcceptRequest"},"InvitationAcceptedOut":{"properties":{"tenant_id":{"type":"string","format":"uuid","title":"Tenant Id"},"tenant_name":{"type":"string","title":"Tenant Name"},"role":{"type":"string","enum":["owner","admin","agent_manager","viewer","billing_admin"],"title":"Role"}},"type":"object","required":["tenant_id","tenant_name","role"],"title":"InvitationAcceptedOut"},"InvitationCreateRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"role":{"type":"string","enum":["admin","agent_manager","viewer","billing_admin"],"title":"Role","default":"viewer"}},"type":"object","required":["email"],"title":"InvitationCreateRequest"},"InvitationListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/InvitationOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"InvitationListOut"},"InvitationLookupOut":{"properties":{"tenant_name":{"type":"string","title":"Tenant Name"},"email":{"type":"string","title":"Email"},"role":{"type":"string","enum":["owner","admin","agent_manager","viewer","billing_admin"],"title":"Role"},"status":{"type":"string","enum":["pending","expired","accepted","revoked"],"title":"Status"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"inviter_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inviter Name"}},"type":"object","required":["tenant_name","email","role","status","expires_at","inviter_name"],"title":"InvitationLookupOut","description":"What the link holder sees before signing in (PLAN-console D22)."},"InvitationOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"role":{"type":"string","enum":["owner","admin","agent_manager","viewer","billing_admin"],"title":"Role"},"status":{"type":"string","enum":["pending","expired","accepted","revoked"],"title":"Status"},"invited_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invited By","description":"The inviter's name, or email."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"last_sent_at":{"type":"string","format":"date-time","title":"Last Sent At"}},"type":"object","required":["id","email","role","status","invited_by","created_at","expires_at","last_sent_at"],"title":"InvitationOut"},"KbAttachmentListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/KbAttachmentOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"KbAttachmentListOut"},"KbAttachmentOut":{"properties":{"knowledge_base_id":{"type":"string","format":"uuid","title":"Knowledge Base Id"},"name":{"type":"string","title":"Name"},"kb_status":{"$ref":"#/components/schemas/KnowledgeBaseStatus"},"enabled":{"type":"boolean","title":"Enabled"},"retrieval_override":{"additionalProperties":true,"type":"object","title":"Retrieval Override"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["knowledge_base_id","name","kb_status","enabled","retrieval_override","created_at","updated_at"],"title":"KbAttachmentOut"},"KbAttachmentUpsertRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":true},"retrieval_override":{"additionalProperties":true,"type":"object","title":"Retrieval Override"}},"additionalProperties":false,"type":"object","title":"KbAttachmentUpsertRequest"},"KbDocumentStatus":{"type":"string","enum":["pending","processing","ready","failed","tombstoned"],"title":"KbDocumentStatus"},"KbRunKind":{"type":"string","enum":["full","delta","reindex"],"title":"KbRunKind"},"KbRunStatus":{"type":"string","enum":["pending","running","completed","failed","canceled"],"title":"KbRunStatus"},"KbSourceKind":{"type":"string","enum":["website","file_upload","text"],"title":"KbSourceKind"},"KbSourceStatus":{"type":"string","enum":["active","disabled"],"title":"KbSourceStatus"},"KnobOut":{"properties":{"path":{"type":"string","title":"Path"},"direction":{"type":"string","title":"Direction"},"note":{"type":"string","title":"Note"},"document":{"type":"string","title":"Document","default":"runtime_config"},"protocols":{"items":{"type":"string"},"type":"array","title":"Protocols"}},"type":"object","required":["path","direction","note"],"title":"KnobOut"},"KnowledgeBaseCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"type":"string","title":"Description","default":""},"embedding_provider":{"type":"string","title":"Embedding Provider","default":"google"},"embedding_model":{"type":"string","title":"Embedding Model","default":"gemini-embedding-2"},"embedding_dimensions":{"type":"integer","title":"Embedding Dimensions","default":1536},"retrieval_config":{"additionalProperties":true,"type":"object","title":"Retrieval Config"}},"type":"object","required":["name"],"title":"KnowledgeBaseCreateRequest"},"KnowledgeBaseDetailOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"status":{"$ref":"#/components/schemas/KnowledgeBaseStatus"},"embedding_provider":{"type":"string","title":"Embedding Provider"},"embedding_model":{"type":"string","title":"Embedding Model"},"embedding_dimensions":{"type":"integer","title":"Embedding Dimensions"},"retrieval_config":{"additionalProperties":true,"type":"object","title":"Retrieval Config"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"document_count":{"type":"integer","title":"Document Count"},"ready_document_count":{"type":"integer","title":"Ready Document Count"}},"type":"object","required":["id","name","description","status","embedding_provider","embedding_model","embedding_dimensions","retrieval_config","created_at","updated_at","document_count","ready_document_count"],"title":"KnowledgeBaseDetailOut"},"KnowledgeBaseListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/KnowledgeBaseOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"KnowledgeBaseListOut"},"KnowledgeBaseOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"status":{"$ref":"#/components/schemas/KnowledgeBaseStatus"},"embedding_provider":{"type":"string","title":"Embedding Provider"},"embedding_model":{"type":"string","title":"Embedding Model"},"embedding_dimensions":{"type":"integer","title":"Embedding Dimensions"},"retrieval_config":{"additionalProperties":true,"type":"object","title":"Retrieval Config"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","description","status","embedding_provider","embedding_model","embedding_dimensions","retrieval_config","created_at","updated_at"],"title":"KnowledgeBaseOut"},"KnowledgeBaseStatus":{"type":"string","enum":["active","archived"],"title":"KnowledgeBaseStatus"},"KnowledgeBaseUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeBaseStatus"},{"type":"null"}]},"retrieval_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Retrieval Config"}},"additionalProperties":false,"type":"object","title":"KnowledgeBaseUpdateRequest","description":"PATCH body; ``embedding_*`` is immutable, so those fields don't exist\nhere — sending one fails validation."},"KnowledgeLinkOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["id","name","status","enabled"],"title":"KnowledgeLinkOut"},"LastDeliveryOut":{"properties":{"status":{"$ref":"#/components/schemas/DeliveryStatus"},"at":{"type":"string","format":"date-time","title":"At"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"deferred_by_quota":{"type":"boolean","title":"Deferred By Quota"}},"type":"object","required":["status","at","error","deferred_by_quota"],"title":"LastDeliveryOut"},"LeadCounts":{"properties":{"total":{"type":"integer","title":"Total"},"by_status":{"additionalProperties":{"type":"integer"},"propertyNames":{"$ref":"#/components/schemas/LeadStatus"},"type":"object","title":"By Status"}},"type":"object","required":["total","by_status"],"title":"LeadCounts"},"LeadCreateRequest":{"properties":{"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contact Id"},"contact":{"anyOf":[{"$ref":"#/components/schemas/ContactCreateRequest"},{"type":"null"}]},"priority":{"type":"integer","maximum":2147483647.0,"minimum":-2147483648.0,"title":"Priority","default":0},"attributes":{"additionalProperties":true,"type":"object","title":"Attributes"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","title":"LeadCreateRequest","description":"Attach a contact to the list: reference an existing one by\n``contact_id``, or embed ``contact`` to resolve it inline — with an\nexternal_ref the embedded contact create-or-replaces (same semantics as\nthe contacts upsert endpoint), without one it always creates a new\ncontact."},"LeadImportRequest":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/LeadImportRow"},"type":"array","maxItems":1000,"minItems":1,"title":"Rows"}},"type":"object","required":["rows"],"title":"LeadImportRequest"},"LeadImportResult":{"properties":{"created":{"type":"integer","title":"Created"},"updated":{"type":"integer","title":"Updated"}},"type":"object","required":["created","updated"],"title":"LeadImportResult"},"LeadImportRow":{"properties":{"contact":{"$ref":"#/components/schemas/ContactCreateRequest"},"priority":{"type":"integer","maximum":2147483647.0,"minimum":-2147483648.0,"title":"Priority","default":0},"attributes":{"additionalProperties":true,"type":"object","title":"Attributes","description":"Values for the list's custom columns (field_definitions)."}},"type":"object","required":["contact"],"title":"LeadImportRow"},"LeadListCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"source":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Source"},"field_definitions":{"items":{},"type":"array","title":"Field Definitions","description":"The batch's custom column definitions; each lead carries its values in `attributes`."},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["name"],"title":"LeadListCreateRequest"},"LeadListDetailOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"field_definitions":{"items":{},"type":"array","title":"Field Definitions"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"lead_counts":{"$ref":"#/components/schemas/LeadCounts"}},"type":"object","required":["id","name","source","field_definitions","metadata","created_at","updated_at","lead_counts"],"title":"LeadListDetailOut"},"LeadListOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"field_definitions":{"items":{},"type":"array","title":"Field Definitions"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","source","field_definitions","metadata","created_at","updated_at"],"title":"LeadListOut"},"LeadListPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LeadListOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"LeadListPage"},"LeadListUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"source":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Source"},"field_definitions":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Field Definitions"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","title":"LeadListUpdateRequest","description":"PATCH body: omitted fields keep their value; ``field_definitions`` and\n``metadata`` are replaced as a whole, null resets them to empty."},"LeadOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"lead_list_id":{"type":"string","format":"uuid","title":"Lead List Id"},"contact":{"$ref":"#/components/schemas/ContactOut"},"status":{"$ref":"#/components/schemas/LeadStatus"},"priority":{"type":"integer","title":"Priority"},"attempt_count":{"type":"integer","title":"Attempt Count"},"last_attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Attempt At"},"next_retry_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Retry At"},"last_call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Last Call Id"},"attributes":{"additionalProperties":true,"type":"object","title":"Attributes"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","lead_list_id","contact","status","priority","attempt_count","last_attempt_at","next_retry_at","last_call_id","attributes","metadata","created_at","updated_at"],"title":"LeadOut"},"LeadPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LeadOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"LeadPage"},"LeadStatus":{"type":"string","enum":["pending","in_progress","called","converted","failed","do_not_call"],"title":"LeadStatus"},"LeadUpdateRequest":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/LeadStatus"},{"type":"null"}]},"priority":{"anyOf":[{"type":"integer","maximum":2147483647.0,"minimum":-2147483648.0},{"type":"null"}],"title":"Priority"},"attributes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attributes"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","title":"LeadUpdateRequest","description":"PATCH body: omitted fields keep their value; ``attributes`` and\n``metadata`` are replaced as a whole, null resets them to empty."},"LedgerEntryOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"entry_type":{"type":"string","title":"Entry Type"},"currency":{"type":"string","title":"Currency"},"amount_minor":{"type":"integer","title":"Amount Minor"},"balance_after_minor":{"type":"integer","title":"Balance After Minor"},"amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount Cents","description":"Deprecated alias of the *_minor field, present only on a USD wallet.","deprecated":true},"balance_after_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Balance After Cents","description":"Deprecated alias of the *_minor field, present only on a USD wallet.","deprecated":true},"usage_record_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Usage Record Id"},"description":{"type":"string","title":"Description"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","entry_type","currency","amount_minor","balance_after_minor","usage_record_id","description","created_at"],"title":"LedgerEntryOut"},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":256,"title":"Password"},"tenant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tenant Id"},"device_token":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Device Token"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"MarketOut":{"properties":{"code":{"type":"string","title":"Code"},"currency":{"type":"string","title":"Currency"},"countries":{"items":{"type":"string"},"type":"array","title":"Countries"},"purchasable":{"type":"boolean","title":"Purchasable"},"packages":{"items":{"$ref":"#/components/schemas/MarketPackageOut"},"type":"array","title":"Packages"},"rates":{"$ref":"#/components/schemas/MarketRatesOut"}},"type":"object","required":["code","currency","countries","purchasable","packages","rates"],"title":"MarketOut"},"MarketPackageOut":{"properties":{"code":{"type":"string","title":"Code"},"tier":{"type":"string","title":"Tier"},"currency":{"type":"string","title":"Currency"},"price_minor":{"type":"integer","title":"Price Minor"},"credit_minor":{"type":"integer","title":"Credit Minor"}},"type":"object","required":["code","tier","currency","price_minor","credit_minor"],"title":"MarketPackageOut"},"MarketRatesOut":{"properties":{"currency":{"type":"string","title":"Currency"},"platform_base_per_minute":{"type":"integer","title":"Platform Base Per Minute"},"number_month_local":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Number Month Local"},"sms_segment":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sms Segment"}},"type":"object","required":["currency","platform_base_per_minute","number_month_local","sms_segment"],"title":"MarketRatesOut"},"McpAuthType":{"type":"string","enum":["none","bearer","oauth"],"title":"McpAuthType"},"McpLinkOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"url":{"type":"string","title":"Url"},"status":{"type":"string","title":"Status"},"enabled":{"type":"boolean","title":"Enabled"},"tool_allowlist":{"items":{},"type":"array","title":"Tool Allowlist"}},"type":"object","required":["id","name","url","status","enabled","tool_allowlist"],"title":"McpLinkOut"},"McpServerCreateRequest":{"properties":{"catalog_key":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Catalog Key"},"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"url":{"anyOf":[{"type":"string","maxLength":2048,"minLength":1},{"type":"null"}],"title":"Url"},"transport":{"anyOf":[{"$ref":"#/components/schemas/McpTransport"},{"type":"null"}]},"auth_type":{"anyOf":[{"$ref":"#/components/schemas/McpAuthType"},{"type":"null"}]},"bearer_token":{"anyOf":[{"type":"string","maxLength":4096,"minLength":1},{"type":"null"}],"title":"Bearer Token"},"oauth_issuer":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Oauth Issuer"},"oauth_client_id":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Oauth Client Id"},"oauth_client_secret":{"anyOf":[{"type":"string","maxLength":4096,"minLength":1},{"type":"null"}],"title":"Oauth Client Secret"},"oauth_scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Oauth Scopes"}},"type":"object","title":"McpServerCreateRequest"},"McpServerListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/McpServerOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"McpServerListOut"},"McpServerOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"catalog_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Catalog Key"},"name":{"type":"string","title":"Name"},"url":{"type":"string","title":"Url"},"transport":{"$ref":"#/components/schemas/McpTransport"},"auth_type":{"$ref":"#/components/schemas/McpAuthType"},"status":{"$ref":"#/components/schemas/McpServerStatus"},"oauth_issuer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Oauth Issuer"},"oauth_client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Oauth Client Id"},"oauth_scopes":{"items":{"type":"string"},"type":"array","title":"Oauth Scopes"},"token_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Hint"},"authorized_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Authorized At"},"oauth_token_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oauth Token Expires At"},"tools":{"items":{"$ref":"#/components/schemas/DiscoveredToolOut"},"type":"array","title":"Tools"},"tools_discovered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Tools Discovered At"},"last_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Checked At"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","catalog_key","name","url","transport","auth_type","status","oauth_issuer","oauth_client_id","oauth_scopes","token_hint","authorized_at","oauth_token_expires_at","tools","tools_discovered_at","last_checked_at","last_error","created_at","updated_at"],"title":"McpServerOut"},"McpServerStatus":{"type":"string","enum":["pending_auth","active","auth_expired","disabled"],"title":"McpServerStatus"},"McpServerUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"status":{"anyOf":[{"type":"string","enum":["active","disabled"]},{"type":"null"}],"title":"Status"},"bearer_token":{"anyOf":[{"type":"string","maxLength":4096,"minLength":1},{"type":"null"}],"title":"Bearer Token"}},"type":"object","title":"McpServerUpdateRequest"},"McpTransport":{"type":"string","enum":["streamable_http","sse"],"title":"McpTransport"},"MeResponse":{"properties":{"user":{"$ref":"#/components/schemas/UserOut"},"tenant_id":{"type":"string","format":"uuid","title":"Tenant Id"},"tenant":{"$ref":"#/components/schemas/TenantOut"},"role":{"type":"string","title":"Role"},"memberships":{"items":{"$ref":"#/components/schemas/MembershipOut"},"type":"array","title":"Memberships"}},"type":"object","required":["user","tenant_id","tenant","role","memberships"],"title":"MeResponse"},"MemberListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MemberOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"MemberListOut"},"MemberOut":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"type":"string","title":"Email"},"role":{"type":"string","enum":["owner","admin","agent_manager","viewer","billing_admin"],"title":"Role"},"email_verified":{"type":"boolean","title":"Email Verified"},"phone_e164":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone E164"},"phone_verified":{"type":"boolean","title":"Phone Verified"},"joined_at":{"type":"string","format":"date-time","title":"Joined At"}},"type":"object","required":["user_id","name","email","role","email_verified","phone_e164","phone_verified","joined_at"],"title":"MemberOut"},"MemberRoleUpdateRequest":{"properties":{"role":{"type":"string","enum":["owner","admin","agent_manager","viewer","billing_admin"],"title":"Role"}},"type":"object","required":["role"],"title":"MemberRoleUpdateRequest"},"MembershipOut":{"properties":{"tenant_id":{"type":"string","format":"uuid","title":"Tenant Id"},"tenant_name":{"type":"string","title":"Tenant Name"},"role":{"type":"string","title":"Role"}},"type":"object","required":["tenant_id","tenant_name","role"],"title":"MembershipOut"},"MetricOut":{"properties":{"value":{"type":"number","title":"Value"},"previous":{"type":"number","title":"Previous"}},"type":"object","required":["value","previous"],"title":"MetricOut"},"NativeOptionOut":{"properties":{"path":{"type":"string","title":"Path"},"type":{"type":"string","title":"Type"},"note":{"type":"string","title":"Note"},"settable":{"type":"boolean","title":"Settable"},"mutability":{"type":"string","title":"Mutability"},"runtime_support":{"type":"string","title":"Runtime Support"},"applies_to":{"items":{"type":"string"},"type":"array","title":"Applies To"},"enum":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Enum"},"minimum":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Minimum"},"maximum":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maximum"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"use_instead":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Use Instead"},"verified_on":{"type":"string","title":"Verified On"},"source":{"type":"string","title":"Source"},"protocols":{"items":{"type":"string"},"type":"array","title":"Protocols"}},"type":"object","required":["path","type","note","settable","mutability","runtime_support","applies_to","verified_on","source"],"title":"NativeOptionOut"},"NodeIn":{"properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","title":"Key"},"display_name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Display Name"},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"config":{"additionalProperties":true,"type":"object","title":"Config"}},"additionalProperties":false,"type":"object","required":["key","agent_id"],"title":"NodeIn"},"NodeOut":{"properties":{"key":{"type":"string","title":"Key"},"display_name":{"type":"string","title":"Display Name"},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"agent_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Version Id"},"config":{"additionalProperties":true,"type":"object","title":"Config"}},"type":"object","required":["key","display_name","agent_id","agent_version_id","config"],"title":"NodeOut"},"NotificationRuleCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","default":"default"},"channel":{"type":"string","enum":["email","sms"],"title":"Channel","default":"email"},"targets":{"items":{"type":"string"},"type":"array","maxItems":5,"minItems":1,"title":"Targets"},"locale":{"type":"string","maxLength":35,"pattern":"^[A-Za-z]{2,8}(-[A-Za-z0-9]{1,8})*$","title":"Locale","default":"en"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"call_sources":{"items":{"$ref":"#/components/schemas/CommCallSource"},"type":"array","maxItems":3,"minItems":1,"title":"Call Sources","default":["inbound","outbound_direct"]},"include_transcript":{"type":"boolean","title":"Include Transcript","default":false},"include_recording":{"type":"boolean","title":"Include Recording","default":false}},"type":"object","required":["targets"],"title":"NotificationRuleCreateRequest"},"NotificationRuleListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/NotificationRuleOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"NotificationRuleListOut"},"NotificationRuleOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"event_type":{"type":"string","title":"Event Type"},"channel":{"$ref":"#/components/schemas/CommChannel"},"status":{"$ref":"#/components/schemas/NotificationRuleStatus"},"targets":{"items":{"type":"string"},"type":"array","title":"Targets"},"locale":{"type":"string","title":"Locale"},"rendered_locale":{"type":"string","title":"Rendered Locale"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"call_sources":{"items":{"type":"string"},"type":"array","title":"Call Sources"},"include_transcript":{"type":"boolean","title":"Include Transcript"},"include_recording":{"type":"boolean","title":"Include Recording"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","event_type","channel","status","targets","locale","rendered_locale","agent_id","workflow_id","call_sources","include_transcript","include_recording","created_at","updated_at"],"title":"NotificationRuleOut"},"NotificationRuleStatus":{"type":"string","enum":["active","paused"],"title":"NotificationRuleStatus"},"NotificationRuleUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"status":{"anyOf":[{"type":"string","enum":["active","paused"]},{"type":"null"}],"title":"Status"},"targets":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":5,"minItems":1},{"type":"null"}],"title":"Targets"},"locale":{"anyOf":[{"type":"string","maxLength":35,"pattern":"^[A-Za-z]{2,8}(-[A-Za-z0-9]{1,8})*$"},{"type":"null"}],"title":"Locale"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"call_sources":{"anyOf":[{"items":{"$ref":"#/components/schemas/CommCallSource"},"type":"array","maxItems":3,"minItems":1},{"type":"null"}],"title":"Call Sources"},"include_transcript":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Transcript"},"include_recording":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Recording"}},"type":"object","title":"NotificationRuleUpdateRequest"},"OnboardingOut":{"properties":{"step":{"anyOf":[{"type":"string","enum":["business","team","assistant","number","agent"]},{"type":"null"}],"title":"Step"},"done":{"items":{"type":"string","enum":["business","team","assistant","number","agent"]},"type":"array","title":"Done","default":[]},"skipped":{"items":{"type":"string","enum":["business","team","assistant","number","agent"]},"type":"array","title":"Skipped","default":[]},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"hidden":{"type":"boolean","title":"Hidden","default":false}},"type":"object","title":"OnboardingOut","description":"The owner's first-login wizard (PLAN-onboarding-billing D4). The\nconsole sends the owner to ``step`` until ``completed_at`` is set."},"OnboardingUpdateRequest":{"properties":{"action":{"type":"string","enum":["done","skip","hide"],"title":"Action"},"step":{"anyOf":[{"type":"string","enum":["business","team","assistant","number","agent"]},{"type":"null"}],"title":"Step"}},"type":"object","required":["action"],"title":"OnboardingUpdateRequest","description":"Move the first-login wizard (PLAN-onboarding-billing D4): ``done`` or\n``skip`` a step (team, assistant or number), or ``hide`` the\nwhole wizard without finishing it."},"OtpResendResponse":{"properties":{"resend_after_seconds":{"type":"integer","title":"Resend After Seconds"}},"type":"object","required":["resend_after_seconds"],"title":"OtpResendResponse"},"PasswordResetChallengeResponse":{"properties":{"challenge_id":{"type":"string","format":"uuid","title":"Challenge Id"},"resend_after_seconds":{"type":"integer","title":"Resend After Seconds"}},"type":"object","required":["challenge_id","resend_after_seconds"],"title":"PasswordResetChallengeResponse"},"PhoneChallengeResponse":{"properties":{"challenge_id":{"type":"string","format":"uuid","title":"Challenge Id"}},"type":"object","required":["challenge_id"],"title":"PhoneChallengeResponse"},"PhoneDirection":{"type":"string","enum":["inbound","outbound","both"],"title":"PhoneDirection"},"PhoneNumberImportRequest":{"properties":{"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"phone_number":{"type":"string","pattern":"^\\+[1-9]\\d{1,14}$","title":"Phone Number"},"account_sid":{"type":"string","pattern":"^AC[0-9a-fA-F]{32}$","title":"Account Sid"},"auth_token":{"type":"string","maxLength":255,"minLength":16,"title":"Auth Token"},"label":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Label"}},"type":"object","required":["phone_number","account_sid","auth_token"],"title":"PhoneNumberImportRequest"},"PhoneNumberOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"phone_number":{"type":"string","title":"Phone Number"},"provider":{"type":"string","title":"Provider"},"ownership":{"$ref":"#/components/schemas/PhoneNumberOwnership"},"direction":{"$ref":"#/components/schemas/PhoneDirection"},"status":{"$ref":"#/components/schemas/PhoneNumberStatus"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"assigned_agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned Agent Id"},"assigned_workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned Workflow Id"},"recording_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Mode"},"recording_disposition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Disposition"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","phone_number","provider","ownership","direction","status","label","assigned_agent_id","assigned_workflow_id","created_at","updated_at"],"title":"PhoneNumberOut"},"PhoneNumberOwnership":{"type":"string","enum":["platform","byo"],"title":"PhoneNumberOwnership"},"PhoneNumberPurchaseRequest":{"properties":{"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"phone_number":{"type":"string","pattern":"^\\+[1-9]\\d{1,14}$","title":"Phone Number"},"number_type":{"type":"string","enum":["local","mobile","toll_free"],"title":"Number Type","default":"local"},"label":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Label"}},"type":"object","required":["phone_number"],"title":"PhoneNumberPurchaseRequest"},"PhoneNumberStatus":{"type":"string","enum":["active","inactive","released"],"title":"PhoneNumberStatus"},"PhoneNumberUpdateRequest":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Label"},"status":{"anyOf":[{"type":"string","enum":["active","inactive"]},{"type":"null"}],"title":"Status"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"recording_disposition":{"anyOf":[{"type":"string","enum":["keep","delete_after_ingest"]},{"type":"null"}],"title":"Recording Disposition"}},"type":"object","title":"PhoneNumberUpdateRequest","description":"PATCH semantics: only fields present in the body change. Setting one\ntarget kind clears the other; a PATCH may not carry both; an explicit\nnull clears. Assigning an inbound target to an outbound-only number\nenables inbound on it — direction flips to ``both`` and its voice\nwebhooks are (re)pointed at this API; verified caller IDs are rejected\nwith 409."},"PrincipalOut":{"properties":{"type":{"type":"string","enum":["user","api_key","oauth"],"title":"Type"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"api_key_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Api Key Id"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"}},"type":"object","required":["type"],"title":"PrincipalOut"},"ProbeScheduledOut":{"properties":{"status":{"type":"string","title":"Status","default":"scheduled"}},"type":"object","title":"ProbeScheduledOut"},"ProblemOut":{"properties":{"path":{"type":"string","title":"Path"},"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"}},"type":"object","required":["path","code","message"],"title":"ProblemOut","description":"The same shape a 422 returns, so a warning reads like a problem the\ncaller already knows how to render."},"PromptFixOut":{"properties":{"field":{"type":"string","title":"Field"},"section":{"type":"string","title":"Section"},"note":{"type":"string","title":"Note"},"protocols":{"items":{"type":"string"},"type":"array","title":"Protocols"}},"type":"object","required":["field","section","note","protocols"],"title":"PromptFixOut"},"PromptPreviewOut":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"version_number":{"type":"integer","title":"Version Number"},"protocol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Protocol"},"delegating":{"type":"boolean","title":"Delegating"},"conversation":{"type":"string","title":"Conversation"},"delegation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delegation"},"placeholders":{"items":{"type":"string"},"type":"array","title":"Placeholders"},"time_zone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time Zone"}},"type":"object","required":["agent_id","version_number","protocol","delegating","conversation","delegation","placeholders","time_zone"],"title":"PromptPreviewOut","description":"The prompt a call on this version would receive, composed by the\nruntime's own composer without call data (PLAN-console D21). The lead's\ndetails, the previous-conversations block and the enrichment values are\nper call and appear on each call's own record; ``placeholders`` names the\nenrichments the text waits for. ``delegation`` is the backend's half on a\nLive version and null elsewhere."},"ProviderListResponse":{"properties":{"providers":{"items":{"$ref":"#/components/schemas/ProviderOut"},"type":"array","title":"Providers"}},"type":"object","required":["providers"],"title":"ProviderListResponse"},"ProviderOptionsCatalogOut":{"properties":{"providers":{"items":{"$ref":"#/components/schemas/ProviderOptionsOut"},"type":"array","title":"Providers"},"limits":{"additionalProperties":{"type":"integer"},"type":"object","title":"Limits"}},"type":"object","required":["providers","limits"],"title":"ProviderOptionsCatalogOut","description":"The provider-native surface: what each provider accepts that the others\ndo not, and what cannot be set there at all."},"ProviderOptionsOut":{"properties":{"provider":{"type":"string","title":"Provider"},"options":{"items":{"$ref":"#/components/schemas/NativeOptionOut"},"type":"array","title":"Options"},"runtime_owned":{"items":{"type":"string"},"type":"array","title":"Runtime Owned"},"normalized_owned":{"additionalProperties":{"type":"string"},"type":"object","title":"Normalized Owned"}},"type":"object","required":["provider","options","runtime_owned","normalized_owned"],"title":"ProviderOptionsOut"},"ProviderOut":{"properties":{"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"start_url":{"type":"string","title":"Start Url"}},"type":"object","required":["name","display_name","start_url"],"title":"ProviderOut"},"ProviderResolutionOut":{"properties":{"note":{"type":"string","title":"Note"},"by_provider":{"additionalProperties":{"type":"string"},"type":"object","title":"By Provider"}},"type":"object","required":["note","by_provider"],"title":"ProviderResolutionOut"},"PurchaseOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","title":"Status"},"package":{"type":"string","title":"Package"},"market":{"type":"string","title":"Market"},"currency":{"type":"string","title":"Currency"},"price_minor":{"type":"integer","title":"Price Minor"},"credit_currency":{"type":"string","title":"Credit Currency"},"credit_minor":{"type":"integer","title":"Credit Minor"},"credit_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credit Cents","description":"Deprecated alias of the *_minor field, present only on a USD wallet.","deprecated":true},"receipt_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Receipt Number"},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"},"card_last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card Last4"},"credited":{"type":"boolean","title":"Credited"}},"type":"object","required":["id","status","package","market","currency","price_minor","credit_currency","credit_minor","receipt_number","paid_at","card_last4","credited"],"title":"PurchaseOut"},"QueryOut":{"properties":{"results":{"items":{"$ref":"#/components/schemas/ChunkResultOut"},"type":"array","title":"Results"},"timings":{"$ref":"#/components/schemas/QueryTimings"}},"type":"object","required":["results","timings"],"title":"QueryOut"},"QueryRequest":{"properties":{"query":{"type":"string","maxLength":1000,"minLength":1,"title":"Query"},"top_k":{"anyOf":[{"type":"integer","maximum":20.0,"minimum":1.0},{"type":"null"}],"title":"Top K"},"source_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Source Ids"}},"type":"object","required":["query"],"title":"QueryRequest"},"QueryTimings":{"properties":{"embed_ms":{"type":"integer","title":"Embed Ms"},"search_ms":{"type":"integer","title":"Search Ms"}},"type":"object","required":["embed_ms","search_ms"],"title":"QueryTimings"},"QuickstartAgentRequest":{"properties":{"template":{"type":"string","enum":["receptionist","lead_intake"],"title":"Template"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"voice":{"type":"string","maxLength":64,"minLength":1,"title":"Voice","default":"marin"},"greeting":{"type":"string","maxLength":400,"minLength":1,"title":"Greeting"},"facts":{"type":"string","maxLength":4000,"title":"Facts","default":""},"phone_number_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Phone Number Id"}},"type":"object","required":["template","name","greeting"],"title":"QuickstartAgentRequest","description":"An agent from a short form, published on a number in one step\n(PLAN-onboarding-billing D9): the instructions are composed by the\nplatform from ``template`` and what the owner typed."},"QuotaCounter":{"properties":{"used":{"type":"integer","title":"Used"},"max":{"type":"integer","title":"Max"}},"type":"object","required":["used","max"],"title":"QuotaCounter"},"ReindexOut":{"properties":{"knowledge_base":{"$ref":"#/components/schemas/KnowledgeBaseOut"},"runs":{"items":{"$ref":"#/components/schemas/RunOut"},"type":"array","title":"Runs"}},"type":"object","required":["knowledge_base","runs"],"title":"ReindexOut"},"ReindexRequest":{"properties":{"embedding_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embedding Provider"},"embedding_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embedding Model"}},"additionalProperties":false,"type":"object","title":"ReindexRequest","description":"The only way to change a knowledge base's embedding model: the switch\nand the re-embedding that backs it happen together."},"ResendOtpRequest":{"properties":{"challenge_id":{"type":"string","format":"uuid","title":"Challenge Id"}},"type":"object","required":["challenge_id"],"title":"ResendOtpRequest"},"ResetPasswordRequest":{"properties":{"challenge_id":{"type":"string","format":"uuid","title":"Challenge Id"},"code":{"type":"string","maxLength":16,"minLength":1,"title":"Code"},"password":{"type":"string","maxLength":256,"minLength":8,"title":"Password"}},"type":"object","required":["challenge_id","code","password"],"title":"ResetPasswordRequest"},"RunOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"kb_id":{"type":"string","format":"uuid","title":"Kb Id"},"source_id":{"type":"string","format":"uuid","title":"Source Id"},"kind":{"$ref":"#/components/schemas/KbRunKind"},"status":{"$ref":"#/components/schemas/KbRunStatus"},"stats":{"additionalProperties":true,"type":"object","title":"Stats"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","kb_id","source_id","kind","status","stats","error","started_at","completed_at","created_at"],"title":"RunOut"},"RunPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RunOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"RunPage"},"RuntimeConfigCatalogOut":{"properties":{"fields":{"items":{"$ref":"#/components/schemas/RuntimeFieldOut"},"type":"array","title":"Fields"},"symptoms":{"items":{"$ref":"#/components/schemas/SymptomOut"},"type":"array","title":"Symptoms"},"inert_on_protocol":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Inert On Protocol"}},"type":"object","required":["fields","symptoms"],"title":"RuntimeConfigCatalogOut"},"RuntimeFieldOut":{"properties":{"path":{"type":"string","title":"Path"},"type":{"type":"string","title":"Type"},"tier":{"type":"string","title":"Tier"},"description":{"type":"string","title":"Description"},"default":{"title":"Default"},"enum":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Enum"},"minimum":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Minimum"},"maximum":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maximum"},"provider_conditional":{"anyOf":[{"$ref":"#/components/schemas/ProviderResolutionOut"},{"type":"null"}]},"symptoms":{"items":{"type":"string"},"type":"array","title":"Symptoms"},"inert_on":{"items":{"type":"string"},"type":"array","title":"Inert On"},"inert_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inert Note"}},"type":"object","required":["path","type","tier","description"],"title":"RuntimeFieldOut","description":"One ``runtime_config`` key as the dashboard needs it: what it is, what\nit does, what happens if nobody sets it, and which providers resolve it\nfor themselves."},"SessionResponse":{"properties":{"token":{"$ref":"#/components/schemas/SessionTokenOut"},"user":{"$ref":"#/components/schemas/UserOut"},"tenant":{"$ref":"#/components/schemas/TenantOut"},"memberships":{"items":{"$ref":"#/components/schemas/MembershipOut"},"type":"array","title":"Memberships"}},"type":"object","required":["token","user","tenant","memberships"],"title":"SessionResponse"},"SessionTokenOut":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"Bearer"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["access_token","expires_in"],"title":"SessionTokenOut"},"ShareOut":{"properties":{"key":{"type":"string","title":"Key"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["key","count"],"title":"ShareOut"},"SignupRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":256,"minLength":8,"title":"Password"},"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Name"},"tenant_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Tenant Name"},"country":{"anyOf":[{"type":"string","pattern":"^[A-Za-z]{2}$"},{"type":"null"}],"title":"Country","description":"ISO 3166-1 alpha-2 of the business: the workspace prices in that country's market (PLAN-markets D4). 422 for a country no open market serves; omitted, the workspace lands in the default market and the console asks."}},"type":"object","required":["email","password"],"title":"SignupRequest"},"SourceCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"kind":{"$ref":"#/components/schemas/KbSourceKind"},"root_url":{"anyOf":[{"type":"string","maxLength":2048,"minLength":1},{"type":"null"}],"title":"Root Url"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"sync_interval_hours":{"anyOf":[{"type":"integer","maximum":720.0,"minimum":1.0},{"type":"null"}],"title":"Sync Interval Hours"}},"type":"object","required":["name","kind"],"title":"SourceCreateRequest"},"SourceListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SourceOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"SourceListOut"},"SourceOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"kb_id":{"type":"string","format":"uuid","title":"Kb Id"},"name":{"type":"string","title":"Name"},"kind":{"$ref":"#/components/schemas/KbSourceKind"},"status":{"$ref":"#/components/schemas/KbSourceStatus"},"root_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Root Url"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"sync_interval_hours":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sync Interval Hours"},"next_sync_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Sync At"},"last_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Synced At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","kb_id","name","kind","status","root_url","config","sync_interval_hours","next_sync_at","last_synced_at","created_at","updated_at"],"title":"SourceOut"},"SourceUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"status":{"anyOf":[{"$ref":"#/components/schemas/KbSourceStatus"},{"type":"null"}]},"root_url":{"anyOf":[{"type":"string","maxLength":2048,"minLength":1},{"type":"null"}],"title":"Root Url"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"},"sync_interval_hours":{"anyOf":[{"type":"integer","maximum":720.0,"minimum":1.0},{"type":"null"}],"title":"Sync Interval Hours"}},"additionalProperties":false,"type":"object","title":"SourceUpdateRequest","description":"PATCH body: omitted fields keep their value; explicit null clears\n``root_url``/``sync_interval_hours``; ``config`` is replaced whole."},"Speaker":{"type":"string","enum":["user","assistant","tool","system","human_agent"],"title":"Speaker"},"StartPhoneVerificationRequest":{"properties":{"phone":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$","title":"Phone"}},"type":"object","required":["phone"],"title":"StartPhoneVerificationRequest"},"SwitchTenantRequest":{"properties":{"tenant_id":{"type":"string","format":"uuid","title":"Tenant Id"}},"type":"object","required":["tenant_id"],"title":"SwitchTenantRequest"},"SymptomOut":{"properties":{"key":{"type":"string","title":"Key"},"complaint":{"type":"string","title":"Complaint"},"also_said_as":{"items":{"type":"string"},"type":"array","title":"Also Said As"},"knobs":{"items":{"$ref":"#/components/schemas/KnobOut"},"type":"array","title":"Knobs"},"evidence":{"items":{"$ref":"#/components/schemas/EvidenceOut"},"type":"array","title":"Evidence"},"prompt_fixes":{"items":{"$ref":"#/components/schemas/PromptFixOut"},"type":"array","title":"Prompt Fixes"},"protocols":{"items":{"type":"string"},"type":"array","title":"Protocols"}},"type":"object","required":["key","complaint","also_said_as","knobs","evidence"],"title":"SymptomOut","description":"A complaint in a caller's words, the keys to try in order, and the call\nevent that says whether it worked — each scoped by the protocol the\nversion's model runs on."},"SyncRequest":{"properties":{"kind":{"anyOf":[{"$ref":"#/components/schemas/KbRunKind"},{"type":"null"}]}},"type":"object","title":"SyncRequest"},"TenantOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"timezone":{"type":"string","title":"Timezone","default":"UTC"},"default_locale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Locale"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"market":{"type":"string","title":"Market","default":"us"},"currency":{"type":"string","title":"Currency","default":"USD"},"onboarding":{"$ref":"#/components/schemas/OnboardingOut","default":{"done":[],"skipped":[],"hidden":false}}},"type":"object","required":["id","name","slug"],"title":"TenantOut"},"TenantSettingsOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"timezone":{"type":"string","title":"Timezone"},"default_locale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Locale"},"transcript_source":{"type":"string","title":"Transcript Source"},"recording_enabled":{"type":"boolean","title":"Recording Enabled"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"market":{"type":"string","title":"Market"},"currency":{"type":"string","title":"Currency"},"country_locked":{"type":"boolean","title":"Country Locked"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"website_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website Url"},"default_agent_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Agent Language"},"billing_details":{"$ref":"#/components/schemas/BillingDetails"},"onboarding":{"$ref":"#/components/schemas/OnboardingOut"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","slug","timezone","default_locale","transcript_source","recording_enabled","country","market","currency","country_locked","industry","website_url","default_agent_language","billing_details","onboarding","created_at"],"title":"TenantSettingsOut"},"TenantUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"default_locale":{"anyOf":[{"type":"string","maxLength":35,"pattern":"^[A-Za-z]{2,8}(-[A-Za-z0-9]{1,8})*$"},{"type":"null"}],"title":"Default Locale"},"country":{"anyOf":[{"type":"string","pattern":"^[A-Za-z]{2}$"},{"type":"null"}],"title":"Country"},"industry":{"anyOf":[{"type":"string","enum":["clinic","real_estate","insurance_finance","automotive","hospitality","retail","customer_service","other"]},{"type":"null"}],"title":"Industry"},"website_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Website Url"},"default_agent_language":{"anyOf":[{"type":"string","maxLength":35,"pattern":"^[A-Za-z]{2,8}(-[A-Za-z0-9]{1,8})*$"},{"type":"null"}],"title":"Default Agent Language"},"billing_details":{"anyOf":[{"$ref":"#/components/schemas/BillingDetails"},{"type":"null"}]}},"type":"object","title":"TenantUpdateRequest","description":"Omitted fields stay; ``default_locale`` set to null clears it."},"TestSendOut":{"properties":{"sent":{"type":"integer","title":"Sent"}},"type":"object","required":["sent"],"title":"TestSendOut"},"TextDocumentCreateRequest":{"properties":{"title":{"type":"string","maxLength":255,"minLength":1,"title":"Title"},"text":{"type":"string","maxLength":1000000,"minLength":1,"title":"Text"}},"type":"object","required":["title","text"],"title":"TextDocumentCreateRequest"},"TickSummaryOut":{"properties":{"promoted":{"type":"integer","title":"Promoted"},"completed":{"type":"integer","title":"Completed"},"reconciled":{"type":"integer","title":"Reconciled"},"campaigns_dialed":{"type":"integer","title":"Campaigns Dialed"},"calls_created":{"type":"integer","title":"Calls Created"}},"type":"object","required":["promoted","completed","reconciled","campaigns_dialed","calls_created"],"title":"TickSummaryOut"},"ToolAttachmentListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ToolAttachmentOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"ToolAttachmentListOut"},"ToolAttachmentOut":{"properties":{"kind":{"type":"string","enum":["internal","webhook"],"title":"Kind"},"tool_installation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tool Installation Id"},"installation_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Installation Name"},"internal_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Internal Key"},"runtime_name":{"type":"string","title":"Runtime Name"},"enabled":{"type":"boolean","title":"Enabled"},"config_override":{"additionalProperties":true,"type":"object","title":"Config Override"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["kind","tool_installation_id","installation_name","internal_key","runtime_name","enabled","config_override","created_at","updated_at"],"title":"ToolAttachmentOut"},"ToolAttachmentUpsertRequest":{"properties":{"runtime_name":{"type":"string","maxLength":100,"minLength":1,"title":"Runtime Name"},"enabled":{"type":"boolean","title":"Enabled","default":true},"config_override":{"additionalProperties":true,"type":"object","title":"Config Override"}},"type":"object","required":["runtime_name"],"title":"ToolAttachmentUpsertRequest"},"ToolDefinitionCreateRequest":{"properties":{"key":{"type":"string","maxLength":100,"minLength":1,"title":"Key"},"display_name":{"type":"string","maxLength":255,"minLength":1,"title":"Display Name"},"description":{"type":"string","title":"Description","default":""},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"config":{"additionalProperties":true,"type":"object","title":"Config"}},"type":"object","required":["key","display_name"],"title":"ToolDefinitionCreateRequest"},"ToolDefinitionListOut":{"properties":{"items":{"items":{"oneOf":[{"$ref":"#/components/schemas/InternalToolOut"},{"$ref":"#/components/schemas/WebhookToolDefinitionOut"}],"discriminator":{"propertyName":"kind","mapping":{"internal":"#/components/schemas/InternalToolOut","webhook":"#/components/schemas/WebhookToolDefinitionOut"}}},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"ToolDefinitionListOut"},"ToolDefinitionUpdateRequest":{"properties":{"display_name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"input_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Schema"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"}},"type":"object","title":"ToolDefinitionUpdateRequest"},"ToolInstallationCreateRequest":{"properties":{"tool_definition_id":{"type":"string","format":"uuid","title":"Tool Definition Id"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"scope":{"$ref":"#/components/schemas/ToolScope","default":"tenant"},"credentials":{"anyOf":[{"type":"string","maxLength":4096,"minLength":1},{"type":"null"}],"title":"Credentials"}},"type":"object","required":["tool_definition_id","name"],"title":"ToolInstallationCreateRequest"},"ToolInstallationListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ToolInstallationOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"ToolInstallationListOut"},"ToolInstallationOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"tool_definition_id":{"type":"string","format":"uuid","title":"Tool Definition Id"},"definition_key":{"type":"string","title":"Definition Key"},"name":{"type":"string","title":"Name"},"scope":{"$ref":"#/components/schemas/ToolScope"},"status":{"$ref":"#/components/schemas/ToolInstallationStatus"},"has_credentials":{"type":"boolean","title":"Has Credentials"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","tool_definition_id","definition_key","name","scope","status","has_credentials","created_at","updated_at"],"title":"ToolInstallationOut"},"ToolInstallationStatus":{"type":"string","enum":["active","disabled"],"title":"ToolInstallationStatus"},"ToolInstallationUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"status":{"anyOf":[{"$ref":"#/components/schemas/ToolInstallationStatus"},{"type":"null"}]},"credentials":{"anyOf":[{"type":"string","maxLength":4096,"minLength":1},{"type":"null"}],"title":"Credentials"}},"type":"object","title":"ToolInstallationUpdateRequest"},"ToolLinkOut":{"properties":{"runtime_name":{"type":"string","title":"Runtime Name"},"internal_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Internal Key"},"installation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Installation Id"},"installation_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Installation Name"},"display_name":{"type":"string","title":"Display Name"},"handler_type":{"type":"string","title":"Handler Type"},"enabled":{"type":"boolean","title":"Enabled"},"runs_7d":{"type":"integer","title":"Runs 7D"},"failures_7d":{"type":"integer","title":"Failures 7D"},"p50_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"P50 Ms"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"}},"type":"object","required":["runtime_name","internal_key","installation_id","installation_name","display_name","handler_type","enabled","runs_7d","failures_7d","p50_ms","last_error"],"title":"ToolLinkOut"},"ToolRunListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ToolRunOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"ToolRunListOut"},"ToolRunOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"tool_name":{"type":"string","title":"Tool Name"},"status":{"$ref":"#/components/schemas/ToolRunStatus"},"tool_installation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tool Installation Id"},"input":{"additionalProperties":true,"type":"object","title":"Input"},"output":{"additionalProperties":true,"type":"object","title":"Output"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"meter":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meter"}},"type":"object","required":["id","tool_name","status","tool_installation_id","input","output","error","started_at","ended_at","duration_ms","created_at"],"title":"ToolRunOut"},"ToolRunStatus":{"type":"string","enum":["pending","success","failed","timeout"],"title":"ToolRunStatus"},"ToolScope":{"type":"string","enum":["tenant","user"],"title":"ToolScope"},"ToolSigningSecretOut":{"properties":{"configured":{"type":"boolean","title":"Configured"},"secret_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret Hint"},"signing_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signing Secret"}},"type":"object","required":["configured","secret_hint"],"title":"ToolSigningSecretOut","description":"The workspace's tool-signing secret (PLAN-caller-auth D9)."},"TranscriptBasis":{"type":"string","enum":["recording","live"],"title":"TranscriptBasis"},"TranscriptItemOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"speaker":{"$ref":"#/components/schemas/Speaker"},"source":{"$ref":"#/components/schemas/TranscriptSource"},"agent_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Version Id"},"speaker_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Speaker Label"},"text":{"type":"string","title":"Text"},"text_translated":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text Translated"},"started_at_ms":{"type":"integer","title":"Started At Ms"},"ended_at_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ended At Ms"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["id","speaker","source","agent_version_id","speaker_label","text","text_translated","started_at_ms","ended_at_ms","language","confidence","metadata"],"title":"TranscriptItemOut"},"TranscriptOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TranscriptItemOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"TranscriptOut"},"TranscriptSource":{"type":"string","enum":["live","recording","dtmf","form"],"title":"TranscriptSource","description":"Where a transcript row came from (PLAN-transcripts D6). A column and\nnot metadata: every consumer needs to know whether a row is provisional,\nand one that has to look inside a JSON blob will forget."},"UpdateMeRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Name"},"locale":{"anyOf":[{"type":"string","maxLength":35,"pattern":"^[A-Za-z]{2,8}(-[A-Za-z0-9]{1,8})*$"},{"type":"null"}],"title":"Locale"}},"type":"object","title":"UpdateMeRequest","description":"PATCH semantics: only the fields sent change; ``locale: null`` clears\nthe personal choice back to the workspace default."},"UsagePageOut":{"properties":{"currency":{"type":"string","title":"Currency"},"balance_minor":{"type":"integer","title":"Balance Minor"},"balance_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Balance Cents","description":"Deprecated alias of the *_minor field, present only on a USD wallet.","deprecated":true},"items":{"items":{"$ref":"#/components/schemas/UsageRecordOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["currency","balance_minor","items","next_cursor"],"title":"UsagePageOut"},"UsageRecordOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Call Id"},"usage_type":{"type":"string","title":"Usage Type"},"quantity":{"type":"integer","title":"Quantity"},"currency":{"type":"string","title":"Currency"},"unit_price_minor":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unit Price Minor"},"total_minor":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Minor"},"unit_price_cents":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unit Price Cents","description":"Deprecated alias of the *_minor field, present only on a USD wallet.","deprecated":true},"total_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Cents","description":"Deprecated alias of the *_minor field, present only on a USD wallet.","deprecated":true},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","call_id","usage_type","quantity","currency","unit_price_minor","total_minor","metadata","created_at"],"title":"UsageRecordOut"},"UserOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email_verified":{"type":"boolean","title":"Email Verified"},"locale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locale"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"phone_verified":{"type":"boolean","title":"Phone Verified","default":false}},"type":"object","required":["id","email","name","email_verified"],"title":"UserOut"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifiedSessionResponse":{"properties":{"token":{"$ref":"#/components/schemas/SessionTokenOut"},"user":{"$ref":"#/components/schemas/UserOut"},"tenant":{"$ref":"#/components/schemas/TenantOut"},"memberships":{"items":{"$ref":"#/components/schemas/MembershipOut"},"type":"array","title":"Memberships"},"device_token":{"type":"string","title":"Device Token"}},"type":"object","required":["token","user","tenant","memberships","device_token"],"title":"VerifiedSessionResponse"},"VerifyOtpRequest":{"properties":{"challenge_id":{"type":"string","format":"uuid","title":"Challenge Id"},"code":{"type":"string","maxLength":16,"minLength":1,"title":"Code"},"tenant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tenant Id"}},"type":"object","required":["challenge_id","code"],"title":"VerifyOtpRequest"},"VersionCreateRequest":{"properties":{"from_version":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"From Version"}},"type":"object","title":"VersionCreateRequest"},"WebhookToolDefinitionOut":{"properties":{"kind":{"type":"string","const":"webhook","title":"Kind","default":"webhook"},"id":{"type":"string","format":"uuid","title":"Id"},"key":{"type":"string","title":"Key"},"display_name":{"type":"string","title":"Display Name"},"description":{"type":"string","title":"Description"},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","key","display_name","description","input_schema","config","created_at","updated_at"],"title":"WebhookToolDefinitionOut"},"WindowOut":{"properties":{"days":{"type":"integer","title":"Days"},"timezone":{"type":"string","title":"Timezone"},"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"}},"type":"object","required":["days","timezone","start","end"],"title":"WindowOut"},"WorkflowCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"graph":{"anyOf":[{"$ref":"#/components/schemas/GraphIn"},{"type":"null"}]}},"type":"object","required":["name"],"title":"WorkflowCreateRequest"},"WorkflowDetailOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"$ref":"#/components/schemas/WorkflowStatus"},"active_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Active Version Number"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"active_version":{"anyOf":[{"$ref":"#/components/schemas/app__routes__workflows__schemas__VersionOut"},{"type":"null"}]},"latest_version_number":{"type":"integer","title":"Latest Version Number"},"has_draft":{"type":"boolean","title":"Has Draft"}},"type":"object","required":["id","name","status","active_version_number","created_at","updated_at","active_version","latest_version_number","has_draft"],"title":"WorkflowDetailOut"},"WorkflowOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"$ref":"#/components/schemas/WorkflowStatus"},"active_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Active Version Number"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","status","active_version_number","created_at","updated_at"],"title":"WorkflowOut"},"WorkflowPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WorkflowOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"WorkflowPage"},"WorkflowStatus":{"type":"string","enum":["draft","active","archived"],"title":"WorkflowStatus"},"WorkflowUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"status":{"anyOf":[{"type":"string","enum":["active","archived"]},{"type":"null"}],"title":"Status"}},"type":"object","title":"WorkflowUpdateRequest","description":"PATCH body: ``status`` accepts only ``archived`` (archive) or\n``active`` (unarchive — the server recomputes the real status)."},"WorkflowVersionStatus":{"type":"string","enum":["draft","published","archived"],"title":"WorkflowVersionStatus"},"app__routes__agents__schemas__VersionListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/app__routes__agents__schemas__VersionSummaryOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"VersionListOut"},"app__routes__agents__schemas__VersionOut":{"properties":{"version_number":{"type":"integer","title":"Version Number"},"status":{"$ref":"#/components/schemas/AgentVersionStatus"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"instructions":{"type":"string","title":"Instructions"},"delegation_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delegation Instructions"},"voice_config":{"additionalProperties":true,"type":"object","title":"Voice Config"},"runtime_config":{"additionalProperties":true,"type":"object","title":"Runtime Config"},"provider_config":{"additionalProperties":true,"type":"object","title":"Provider Config"},"analysis_config":{"additionalProperties":true,"type":"object","title":"Analysis Config"},"warnings":{"items":{"$ref":"#/components/schemas/ProblemOut"},"type":"array","title":"Warnings"}},"type":"object","required":["version_number","status","published_at","created_at","updated_at","instructions","delegation_instructions","voice_config","runtime_config","provider_config","analysis_config"],"title":"VersionOut"},"app__routes__agents__schemas__VersionSummaryOut":{"properties":{"version_number":{"type":"integer","title":"Version Number"},"status":{"$ref":"#/components/schemas/AgentVersionStatus"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["version_number","status","published_at","created_at","updated_at"],"title":"VersionSummaryOut"},"app__routes__agents__schemas__VersionUpdateRequest":{"properties":{"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"delegation_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delegation Instructions"},"voice_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Voice Config"},"runtime_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Runtime Config"},"provider_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Provider Config"},"analysis_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Analysis Config"}},"type":"object","title":"VersionUpdateRequest","description":"PATCH body for a draft: omitted fields keep their value; each provided\nconfig replaces the whole document (never deep-merged); null resets a\nconfig to ``{}``, instructions to ``\"\"`` and delegation_instructions to\nnull."},"app__routes__workflows__schemas__VersionListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/app__routes__workflows__schemas__VersionSummaryOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"VersionListOut"},"app__routes__workflows__schemas__VersionOut":{"properties":{"version_number":{"type":"integer","title":"Version Number"},"status":{"$ref":"#/components/schemas/WorkflowVersionStatus"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"graph":{"$ref":"#/components/schemas/GraphOut"},"warnings":{"items":{"$ref":"#/components/schemas/ProblemOut"},"type":"array","title":"Warnings"}},"type":"object","required":["version_number","status","published_at","created_at","updated_at","graph"],"title":"VersionOut"},"app__routes__workflows__schemas__VersionSummaryOut":{"properties":{"version_number":{"type":"integer","title":"Version Number"},"status":{"$ref":"#/components/schemas/WorkflowVersionStatus"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["version_number","status","published_at","created_at","updated_at"],"title":"VersionSummaryOut"},"app__routes__workflows__schemas__VersionUpdateRequest":{"properties":{"graph":{"anyOf":[{"$ref":"#/components/schemas/GraphIn"},{"type":"null"}]}},"type":"object","title":"VersionUpdateRequest","description":"PATCH body for a draft: the graph is replaced whole; null resets it to\nempty."}},"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"X-API-Key","description":"A workspace API key (`tp_live_…`). Carries the scopes chosen when it was created."},"OAuth2":{"type":"oauth2","description":"OAuth 2.1 authorization code with PKCE (S256 only). Clients register at the registration endpoint (RFC 7591).","flows":{"authorizationCode":{"authorizationUrl":"https://api.sinwan.ai/oauth/authorize","tokenUrl":"https://api.sinwan.ai/oauth/token","refreshUrl":"https://api.sinwan.ai/oauth/token","scopes":{"agents:read":"Read agents","agents:write":"Create and change agents","billing:read":"Read billing","calls:read":"Read calls","calls:write":"Create and change calls","campaigns:read":"Read campaigns","campaigns:write":"Create and change campaigns","contacts:read":"Read contacts","contacts:write":"Create and change contacts","deliveries:read":"Read deliveries","deliveries:write":"Create and change deliveries","knowledge_bases:read":"Read knowledge bases","knowledge_bases:write":"Create and change knowledge bases","leads:read":"Read leads","leads:write":"Create and change leads","mcp_servers:read":"Read mcp servers","mcp_servers:write":"Create and change mcp servers","notifications:read":"Read notifications","notifications:write":"Create and change notifications","phone_numbers:read":"Read phone numbers","phone_numbers:write":"Create and change phone numbers","tools:read":"Read tools","tools:write":"Create and change tools","transcripts:read":"Read transcripts","workflows:read":"Read workflows","workflows:write":"Create and change workflows"}}}}}}}