AI
AI agents, reply drafting and conversation summaries.
GET
/ai/agentsBetaPOST/conversations/{conversation_id}/ai/composeComing soonPOST/conversations/{conversation_id}/ai/summaryComing soonPOST/ai/knowledge-sourcesComing soonList AI agents
Section titled “List AI agents”GET
/v1/ai/agentsBetacurl "https://api.waasl.io/v1/ai/agents" \ -H "Authorization: Bearer $WAASL_API_KEY"const res = await fetch("https://api.waasl.io/v1/ai/agents", { headers: { Authorization: `Bearer ${process.env.WAASL_API_KEY}` },});if (!res.ok) throw new Error((await res.json()).code);const data = await res.json();import osimport requests
r = requests.get( "https://api.waasl.io/v1/ai/agents", headers={"Authorization": f"Bearer {os.environ['WAASL_API_KEY']}"},)r.raise_for_status()print(r.json())Response 200 — AI agents
{ "data": [ { "id": "ai_support", "name": "Support agent", "status": "active", "languages": [ "ar", "en" ] } ]}Draft a reply with AI
Section titled “Draft a reply with AI”POST
/v1/conversations/{conversation_id}/ai/composeComing soonReturns a suggested reply grounded in the conversation and your knowledge sources. Nothing is sent.
Path parameters
| Field | Type | Description |
|---|---|---|
conversation_id required |
string |
Request body
| Field | Type | Description |
|---|---|---|
instruction |
string | |
tone |
“friendly” | “formal” | “concise” | |
dialect |
string | Arabic dialect to write in. |
curl -X POST "https://api.waasl.io/v1/conversations/cv_3PzA91/ai/compose" \ -H "Authorization: Bearer $WAASL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "instruction": "Apologise for the late delivery and offer a free day", "tone": "friendly", "dialect": "kuwaiti"}'const res = await fetch("https://api.waasl.io/v1/conversations/cv_3PzA91/ai/compose", { method: "POST", headers: { Authorization: `Bearer ${process.env.WAASL_API_KEY}`, "Content-Type": "application/json" }, body: JSON.stringify({ "instruction": "Apologise for the late delivery and offer a free day", "tone": "friendly", "dialect": "kuwaiti" }),});if (!res.ok) throw new Error((await res.json()).code);const data = await res.json();import osimport requests
r = requests.post( "https://api.waasl.io/v1/conversations/cv_3PzA91/ai/compose", headers={"Authorization": f"Bearer {os.environ['WAASL_API_KEY']}"}, json={ "instruction": "Apologise for the late delivery and offer a free day", "tone": "friendly", "dialect": "kuwaiti" },)r.raise_for_status()print(r.json())Response 200 — Draft
{ "draft": "string", "sources": [ "string" ]}Summarise a conversation
Section titled “Summarise a conversation”POST
/v1/conversations/{conversation_id}/ai/summaryComing soonPath parameters
| Field | Type | Description |
|---|---|---|
conversation_id required |
string |
curl -X POST "https://api.waasl.io/v1/conversations/cv_3PzA91/ai/summary" \ -H "Authorization: Bearer $WAASL_API_KEY"const res = await fetch("https://api.waasl.io/v1/conversations/cv_3PzA91/ai/summary", { method: "POST", headers: { Authorization: `Bearer ${process.env.WAASL_API_KEY}` },});if (!res.ok) throw new Error((await res.json()).code);const data = await res.json();import osimport requests
r = requests.post( "https://api.waasl.io/v1/conversations/cv_3PzA91/ai/summary", headers={"Authorization": f"Bearer {os.environ['WAASL_API_KEY']}"},)r.raise_for_status()print(r.json())Response 200 — Summary
{ "summary": "string", "sentiment": "positive", "intent": "renewal"}Add a knowledge source
Section titled “Add a knowledge source”POST
/v1/ai/knowledge-sourcesComing soonTeach AI agents from a URL, a file you uploaded through /media, or raw text (FAQ, menu, policies).
Request body
| Field | Type | Description |
|---|---|---|
type |
“url” | “file” | “text” | |
url |
string (uri) | |
media_id |
string | |
text |
string | |
ai_agent_ids |
string[] |
curl -X POST "https://api.waasl.io/v1/ai/knowledge-sources" \ -H "Authorization: Bearer $WAASL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "url", "url": "https://example.com", "media_id": "string", "text": "string", "ai_agent_ids": [ "string" ]}'const res = await fetch("https://api.waasl.io/v1/ai/knowledge-sources", { method: "POST", headers: { Authorization: `Bearer ${process.env.WAASL_API_KEY}`, "Content-Type": "application/json" }, body: JSON.stringify({ "type": "url", "url": "https://example.com", "media_id": "string", "text": "string", "ai_agent_ids": [ "string" ] }),});if (!res.ok) throw new Error((await res.json()).code);const data = await res.json();import osimport requests
r = requests.post( "https://api.waasl.io/v1/ai/knowledge-sources", headers={"Authorization": f"Bearer {os.environ['WAASL_API_KEY']}"}, json={ "type": "url", "url": "https://example.com", "media_id": "string", "text": "string", "ai_agent_ids": ["string"] },)r.raise_for_status()print(r.json())Returns 202 — Accepted for indexing.