TuCloudAPI aichat
Appearance
TuCloudAPI function to manage FuturePBX (the cloud PBX). Available to: SuperRoot, Operator, Client.
Description
AI assistant for this PBX (Spanish). Agentic loop over DeepSeek that uses a curated subset of this API's own endpoints as tools (each executed through the (ukey,pbx) tenant binding). READ tools auto-run; create/edit/delete are PROPOSED (needs_confirmation) and executed only on a confirm={tool,args} re-post. v1 non-streaming. POST the message (+ optional history/confirm).
Call
GET https://tucloudapi.7kas.com:9087/tucloud?func=aichat&ukey=YOUR_KEY
Requires the ukey parameter.
Parameters
| Parameter | Type | Required | Default | Meaning |
|---|---|---|---|---|
pbx |
string | Yes | — | FuturePBX name (tenant boundary; the assistant only touches this PBX). |
message |
string | Yes | — | The user's message (POST body). |
history |
string | No | — | JSON array of prior turns [{role,content}] (the client keeps state). |
confirm |
string | No | — | JSON {tool,args} of a proposed write the user has confirmed. |
Example
https://tucloudapi.7kas.com:9087/tucloud?func=aichat&ukey=KEY&pbx=tucall (message in POST body)
Response
{ok, text, tools_used:[{tool,ok,error?}], widgets:[{type:"simflow",data:{...simulatecall...}}], needs_confirmation:{tool,args,summary}|null, history:[...]}.
Back to TuCloudAPI