{"openapi":"3.1.0","info":{"title":"Sell Whisper AI Public API","description":"Chat with your agents, read and export conversations, and manage agents, sources and end-user profiles from your own systems.\n\nAuthenticate with an API key from Dashboard → Settings → API Keys, sent as `Authorization: Bearer sk-...`. Every call is scoped to the key's account. Each key is rate limited; over the limit you get `429` with a `Retry-After` header. The Public API needs the Starter plan or above (`402` otherwise).","version":"1.0"},"servers":[{"url":"https://api.sellwhisperai.com"}],"paths":{"/v1/agents/{agent_id}/chat":{"post":{"tags":["public-api"],"summary":"Chat with an agent","description":"Send the end user's message and get the agent's reply. By default the\nreply streams as server-sent events while the model writes it:\n``conversation`` (the ``conversation_id``), then ``token`` events\n(``text`` pieces to append), possibly ``reset`` (clear what you\nappended: that text was not the reply), then ``done`` (the full response\nbelow; its ``text`` is the stored reply and always equals the tokens\nsince the last ``reset``). With ``\"stream\": false`` the response is that\nJSON instead. Pass the returned ``conversation_id`` to continue the\nconversation.","operationId":"chat_with_agent_v1_agents__agent_id__chat_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatResponse"}},"text/event-stream":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/conversations":{"get":{"tags":["public-api"],"summary":"List conversations","description":"The account's conversations, newest first, filtered by agent, end\nuser, search text and start time.","operationId":"list_account_conversations_v1_conversations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Per Page"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The end user's id in your system.","title":"User Id"},"description":"The end user's id in your system."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Search message text and end-user name/email.","title":"Q"},"description":"Search message text and end-user name/email."},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Conversations started at or after this time (UTC if no offset).","title":"Created After"},"description":"Conversations started at or after this time (UTC if no offset)."},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Conversations started before this time (UTC if no offset).","title":"Created Before"},"description":"Conversations started before this time (UTC if no offset)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["public-api"],"summary":"Delete an end user's conversations","description":"Delete every conversation of one end user, e.g. for a deletion\nrequest. Conversations without that ``user_id`` are never touched.","operationId":"delete_conversations_by_end_user_v1_conversations_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"The end user's id in your system.","title":"User Id"},"description":"The end user's id in your system."},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only this agent's conversations.","title":"Agent Id"},"description":"Only this agent's conversations."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/conversations/export":{"get":{"tags":["public-api"],"summary":"Export conversations","description":"Matching conversations with their messages, newest conversation first,\nat most ``limit``. CSV has one row per message.","operationId":"export_account_conversations_v1_conversations_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"format","in":"query","required":false,"schema":{"enum":["json","csv"],"type":"string","default":"json","title":"Format"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":1000,"title":"Limit"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The end user's id in your system.","title":"User Id"},"description":"The end user's id in your system."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Search message text and end-user name/email.","title":"Q"},"description":"Search message text and end-user name/email."},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Conversations started at or after this time (UTC if no offset).","title":"Created After"},"description":"Conversations started at or after this time (UTC if no offset)."},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Conversations started before this time (UTC if no offset).","title":"Created Before"},"description":"Conversations started before this time (UTC if no offset)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationExport"}},"text/csv":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/conversations/{conversation_id}/messages/{message_id}/feedback":{"post":{"tags":["public-api"],"summary":"Rate an agent reply","description":"Thumbs up or down on one of the agent's replies, e.g. from your own\nchat UI. The latest rating is the message's feedback.","operationId":"rate_agent_reply_v1_conversations__conversation_id__messages__message_id__feedback_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}":{"get":{"tags":["public-api"],"summary":"Get an agent","description":"The agent's settings.","operationId":"get_agent_v1_agents__agent_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["public-api"],"summary":"Update an agent","description":"Change only the settings sent, with the Dashboard's validation.","operationId":"update_agent_v1_agents__agent_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/sources":{"post":{"tags":["public-api"],"summary":"Create a source","description":"Add a text snippet, a Q&A (with optional question variations) or a\nwebsite to crawl, chosen by ``type``. Processing runs in the background:\npoll ``GET /v1/agents/{agent_id}/sources`` for its ``status``.","operationId":"create_source_v1_agents__agent_id__sources_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TextSourceCreate"},{"$ref":"#/components/schemas/QASourceCreate"},{"$ref":"#/components/schemas/WebsiteSourceCreate"}],"discriminator":{"propertyName":"type","mapping":{"text":"#/components/schemas/TextSourceCreate","qa":"#/components/schemas/QASourceCreate","website":"#/components/schemas/WebsiteSourceCreate"}},"title":"Body"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Source"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["public-api"],"summary":"List sources","description":"The agent's sources, newest first.","operationId":"list_sources_v1_agents__agent_id__sources_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/sources/{source_id}":{"delete":{"tags":["public-api"],"summary":"Delete a source","description":"Delete a source and everything learned from it.","operationId":"delete_source_v1_agents__agent_id__sources__source_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/sources/files":{"post":{"tags":["public-api"],"summary":"Upload a file source","description":"Upload a file (PDF, DOCX, TXT, MD, CSV, XLSX or PPTX; 50 MB at most).","operationId":"upload_source_file_v1_agents__agent_id__sources_files_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_source_file_v1_agents__agent_id__sources_files_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Source"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/profiles":{"get":{"tags":["public-api"],"summary":"List profiles","description":"The account's profiles, most recently seen first.","operationId":"list_profiles_v1_profiles_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Match user id, email or name.","title":"Search"},"description":"Match user id, email or name."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["public-api"],"summary":"Create a profile","description":"Create the profile for ``user_id``; 409 if it already exists (update\nit with ``PATCH /v1/profiles/{user_id}``).","operationId":"create_profile_v1_profiles_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/profiles/{user_id}":{"get":{"tags":["public-api"],"summary":"Get a profile","description":"The profile of the end user with this ``user_id``.","operationId":"read_profile_v1_profiles__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["public-api"],"summary":"Update a profile","description":"Update ``email``/``name`` when given and the given ``attributes``\n(``null`` clears one); attributes not named are kept.","operationId":"update_profile_v1_profiles__user_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileFields"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["public-api"],"summary":"Delete a profile","description":"Delete the profile. Its conversations stay, unlinked (delete those\nwith ``DELETE /v1/conversations?user_id=``).","operationId":"remove_profile_v1_profiles__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AgentResponse":{"properties":{"id":{"type":"string","title":"Id"},"account_id":{"type":"string","title":"Account Id"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"},"name":{"type":"string","title":"Name"},"system_prompt":{"type":"string","title":"System Prompt"},"tone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tone"},"personality":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Personality"},"temperature":{"type":"number","title":"Temperature"},"data_source_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Source Id"},"is_active":{"type":"boolean","title":"Is Active"},"widget_config":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Widget Config"},"model_provider":{"type":"string","title":"Model Provider"},"model_name":{"type":"string","title":"Model Name"},"custom_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Domain"},"allowed_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Domains"},"security_settings":{"$ref":"#/components/schemas/AgentSecuritySettings"},"notification_preferences":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Notification Preferences"},"channel_instructions":{"additionalProperties":{"type":"string"},"type":"object","title":"Channel Instructions"},"utm_parameters":{"additionalProperties":{"type":"string"},"type":"object","title":"Utm Parameters"},"answer_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Answer Language"},"monthly_conversation_cap":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Monthly Conversation Cap"},"idle_auto_end_days":{"type":"integer","title":"Idle Auto End Days","default":7},"public_comment_replies":{"type":"boolean","title":"Public Comment Replies","default":false},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"last_trained_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Trained At"}},"type":"object","required":["id","account_id","name","system_prompt","tone","personality","temperature","is_active","widget_config","model_provider","model_name"],"title":"AgentResponse"},"AgentSecuritySettings":{"properties":{"rate_limit":{"anyOf":[{"$ref":"#/components/schemas/RateLimitSettings"},{"type":"null"}]},"spam_detection":{"type":"boolean","title":"Spam Detection","default":true},"blocked_countries":{"items":{"type":"string"},"type":"array","maxItems":250,"title":"Blocked Countries"}},"type":"object","title":"AgentSecuritySettings"},"AgentUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt"},"tone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tone"},"personality":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Personality"},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature"},"data_source_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Source Id"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"widget_config":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Widget Config"},"model_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Provider"},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name"},"custom_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Domain"},"allowed_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Domains"},"security_settings":{"anyOf":[{"$ref":"#/components/schemas/AgentSecuritySettings"},{"type":"null"}]},"notification_preferences":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Notification Preferences"},"channel_instructions":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Channel Instructions"},"utm_parameters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Utm Parameters"},"answer_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Answer Language"},"monthly_conversation_cap":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Monthly Conversation Cap"},"idle_auto_end_days":{"anyOf":[{"type":"integer","maximum":365,"minimum":1},{"type":"null"}],"title":"Idle Auto End Days"},"public_comment_replies":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Public Comment Replies"}},"type":"object","title":"AgentUpdate"},"Body_upload_source_file_v1_agents__agent_id__sources_files_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_source_file_v1_agents__agent_id__sources_files_post"},"ChatRequest":{"properties":{"message":{"type":"string","maxLength":10000,"minLength":1,"title":"Message"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id","description":"Continue this conversation; omit to start a new one."},"user_id":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"User Id","description":"The end user's id in your system, for a new conversation. Lets you list or delete that end user's conversations later."},"stream":{"type":"boolean","title":"Stream","description":"Stream the reply as server-sent events, token by token as the model generates it.","default":true}},"type":"object","required":["message"],"title":"ChatRequest"},"ChatResponse":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"},"message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message Id"},"text":{"type":"string","title":"Text"},"outcome":{"type":"string","title":"Outcome","description":"replied, new_conversation, over_limit, paused, escalated or queued"}},"type":"object","required":["conversation_id","text","outcome"],"title":"ChatResponse"},"ConversationExport":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ExportedConversationOut"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"ConversationExport"},"ConversationList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ConversationOut"},"type":"array","title":"Data"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"per_page":{"type":"integer","title":"Per Page"}},"type":"object","required":["data","total","page","per_page"],"title":"ConversationList"},"ConversationOut":{"properties":{"id":{"type":"string","title":"Id"},"agent_id":{"type":"string","title":"Agent Id"},"channel":{"type":"string","title":"Channel"},"status":{"type":"string","title":"Status"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Email"},"page_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Url"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","agent_id","channel","status","created_at","updated_at"],"title":"ConversationOut"},"DeleteResponse":{"properties":{"deleted":{"type":"integer","title":"Deleted"}},"type":"object","required":["deleted"],"title":"DeleteResponse"},"ExcludeRule":{"properties":{"type":{"$ref":"#/components/schemas/ExcludeRuleType"},"value":{"type":"string","maxLength":2048,"title":"Value"}},"type":"object","required":["type","value"],"title":"ExcludeRule"},"ExcludeRuleType":{"type":"string","enum":["starts_with","ends_with","contains","exact","wildcard"],"title":"ExcludeRuleType"},"ExportedConversationOut":{"properties":{"id":{"type":"string","title":"Id"},"agent_id":{"type":"string","title":"Agent Id"},"channel":{"type":"string","title":"Channel"},"status":{"type":"string","title":"Status"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Email"},"page_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Url"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"messages":{"items":{"$ref":"#/components/schemas/MessageOut"},"type":"array","title":"Messages"}},"type":"object","required":["id","agent_id","channel","status","created_at","updated_at","messages"],"title":"ExportedConversationOut"},"FeedbackRequest":{"properties":{"feedback":{"type":"string","enum":["thumbs_up","thumbs_down"],"title":"Feedback"}},"type":"object","required":["feedback"],"title":"FeedbackRequest"},"FeedbackResponse":{"properties":{"message_id":{"type":"string","title":"Message Id"},"feedback":{"type":"string","enum":["thumbs_up","thumbs_down"],"title":"Feedback"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["message_id","feedback","created_at"],"title":"FeedbackResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"MessageOut":{"properties":{"id":{"type":"string","title":"Id"},"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"feedback":{"anyOf":[{"type":"string","enum":["thumbs_up","thumbs_down"]},{"type":"null"}],"title":"Feedback"}},"type":"object","required":["id","role","content","created_at"],"title":"MessageOut"},"ProfileCreate":{"properties":{"email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Email"},"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Name"},"attributes":{"type":"object","title":"Attributes"},"user_id":{"type":"string","maxLength":255,"minLength":1,"title":"User Id"}},"type":"object","required":["user_id"],"title":"ProfileCreate"},"ProfileFields":{"properties":{"email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Email"},"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Name"},"attributes":{"type":"object","title":"Attributes"}},"type":"object","title":"ProfileFields"},"ProfileList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ProfileOut"},"type":"array","title":"Data"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["data","total","limit","offset"],"title":"ProfileList"},"ProfileOut":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"attributes":{"type":"object","title":"Attributes"},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["user_id","attributes","created_at","updated_at"],"title":"ProfileOut"},"QASourceCreate":{"properties":{"type":{"type":"string","const":"qa","title":"Type"},"question":{"type":"string","title":"Question"},"answer":{"type":"string","title":"Answer"},"variations":{"items":{"type":"string"},"type":"array","title":"Variations"}},"type":"object","required":["type","question","answer"],"title":"QASourceCreate"},"RateLimitSettings":{"properties":{"messages":{"type":"integer","maximum":10000,"minimum":1,"title":"Messages"},"window_seconds":{"type":"integer","maximum":86400,"minimum":1,"title":"Window Seconds"}},"type":"object","required":["messages","window_seconds"],"title":"RateLimitSettings","description":"At most ``messages`` widget messages per device every ``window_seconds``."},"Source":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type","description":"text, qa, website, file, or another kind"},"status":{"type":"string","title":"Status","description":"processing, completed, failed, embedding_pending, ..."},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","type","status","created_at"],"title":"Source"},"SourceList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Source"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"SourceList"},"TextSourceCreate":{"properties":{"type":{"type":"string","const":"text","title":"Type"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"content":{"type":"string","title":"Content"}},"type":"object","required":["type","name","content"],"title":"TextSourceCreate"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WebsiteSourceCreate":{"properties":{"url":{"type":"string","title":"Url"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"scraping_strategy":{"type":"string","title":"Scraping Strategy","default":"article_only"},"render_javascript":{"type":"boolean","title":"Render Javascript","default":true},"wait_for_selector":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wait For Selector"},"wait_timeout":{"type":"integer","title":"Wait Timeout","default":30000},"enable_crawling":{"type":"boolean","title":"Enable Crawling","default":false},"max_pages":{"type":"integer","title":"Max Pages","default":50},"max_depth":{"type":"integer","title":"Max Depth","default":3},"same_domain_only":{"type":"boolean","title":"Same Domain Only","default":true},"respect_robots":{"type":"boolean","title":"Respect Robots","default":true},"delay_between_requests":{"type":"number","title":"Delay Between Requests","default":0.2},"extract_tables":{"type":"boolean","title":"Extract Tables","default":true},"extract_metadata":{"type":"boolean","title":"Extract Metadata","default":true},"include_patterns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Include Patterns"},"exclude_patterns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Exclude Patterns"},"exclude_rules":{"items":{"$ref":"#/components/schemas/ExcludeRule"},"type":"array","maxItems":100,"title":"Exclude Rules"},"slow_crawl":{"type":"boolean","title":"Slow Crawl","default":false},"ignore_query_params":{"type":"boolean","title":"Ignore Query Params","default":false},"cookie_header":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cookie Header"},"type":{"type":"string","const":"website","title":"Type"}},"type":"object","required":["url","type"],"title":"WebsiteSourceCreate"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}