API reference
AI
The AI endpoint answers a prompt with a Saleso agent, using the calls and customer you name as context. Each request uses AI tokens, so it has a lower rate limit.
Run AI Agent
/api/make/ai/{teamId}Runs a Saleso AI agent on your prompt, using call and customer data as context.
- Rate limit:
- 30 requests / minute
- Used by:
- Make: AI Action · Zapier: Run AI Agent
Parameters
teamIdstringrequiredYour Team ID.
promptstring· BodyrequiredWhat should the AI do? e.g. 'Write a follow-up email', 'Summarize key points', 'Create coaching feedback'
agent_idstring· BodyOptional. An agent
idfrom List AI Agents. Defaultgeneral.Default:
generalcall_idsarray of string· BodyOptional. Up to 10 call IDs; extra IDs are ignored.
customer_idstring· BodyCustomer ID to include profile and history as context.
languagestring· Bodyauto(answer in the prompt’s language),hebreworenglish. Defaultauto.One of:
auto,hebrew,englishDefault:
autooutput_formatstring· Bodytext,json(raw JSON, no markdown) ormarkdown. Defaulttext.One of:
text,json,markdownDefault:
textinclude_transcriptboolean· BodyInclude call transcript in AI context.
Default:
trueinclude_analysisboolean· BodyInclude call analysis results in AI context.
Default:
trueinclude_profileboolean· BodyInclude customer profile data in AI context.
Default:
true
Response
3 response fieldsShowHide
resultstringThe agent’s answer, in the format you asked for.
agent_usedstringName of the agent that answered.
tokens_usedintegerTotal AI tokens the request used.
- Answers can take several seconds. Calls and customers from other teams are ignored.
Errors
400prompt is required.401The API key is missing, wrong, or belongs to another team (Invalid API key).429The team is over its per-minute budget for this endpoint. Wait for theRetry-Afterseconds (60).500Unexpected server error. Theerrorfield carries the message.
curl -X POST "https://try.saleso.io/api/make/ai/$SALESO_TEAM_ID" \
-H "x-api-key: $SALESO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Summarize the objections in this call in three bullet points.",
"agent_id": "general",
"call_ids": [
"b263551b-19d2-42d6-b4dc-ca56ec59b769"
],
"customer_id": "8b258f8b-4228-40fa-8d24-5b16428e686d",
"language": "auto",
"output_format": "text",
"include_transcript": true,
"include_analysis": true,
"include_profile": true
}'{
"result": "Dana is ready to buy; send the quote today and confirm the delivery date.",
"agent_used": "General",
"tokens_used": 1840
}List AI Agents
/api/make/agents/{teamId}Lists the AI agents you can pass as agent_id: the built-in ones and your team’s active custom agents.
- Used by:
- Make and Zapier: agent picker in Run AI Agent
Parameters
teamIdstringrequiredYour Team ID.
Response
4 response fieldsShowHide
agents[].idstringSend as
agent_id.agents[].namestringDisplay name (built-in agents are named in Hebrew).
agents[].descriptionstringWhat the agent does.
agents[].is_custombooleanTrue for agents your team created.
Errors
401The API key is missing, wrong, or belongs to another team (Invalid API key).500Unexpected server error. Theerrorfield carries the message.
curl -X GET "https://try.saleso.io/api/make/agents/$SALESO_TEAM_ID" \
-H "x-api-key: $SALESO_API_KEY"{
"agents": [
{
"id": "general",
"name": "מנהל כללי",
"description": "סקירה רחבה של השיחה ותובנות עיקריות.",
"is_custom": false
}
]
}