דלג לתוכן הראשי
Reference indexShow

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

POST/api/make/ai/{teamId}

Runs a Saleso AI agent on your prompt, using call and customer data as context.

Used by:
Make: AI Action · Zapier: Run AI Agent

Parameters

  • teamIdstringrequired

    Your Team ID.

  • promptstring· Bodyrequired

    What should the AI do? e.g. 'Write a follow-up email', 'Summarize key points', 'Create coaching feedback'

  • agent_idstring· Body

    Optional. An agent id from List AI Agents. Default general.

    Default: general

  • call_idsarray of string· Body

    Optional. Up to 10 call IDs; extra IDs are ignored.

  • customer_idstring· Body

    Customer ID to include profile and history as context.

  • languagestring· Body

    auto (answer in the prompt’s language), hebrew or english. Default auto.

    One of: auto, hebrew, english

    Default: auto

  • output_formatstring· Body

    text, json (raw JSON, no markdown) or markdown. Default text.

    One of: text, json, markdown

    Default: text

  • include_transcriptboolean· Body

    Include call transcript in AI context.

    Default: true

  • include_analysisboolean· Body

    Include call analysis results in AI context.

    Default: true

  • include_profileboolean· Body

    Include customer profile data in AI context.

    Default: true

Response

3 response fieldsShow
  • resultstring

    The agent’s answer, in the format you asked for.

  • agent_usedstring

    Name of the agent that answered.

  • tokens_usedinteger

    Total 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 the Retry-After seconds (60).
  • 500Unexpected server error. The error field carries the message.
Request
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
}'
Response · 200
{
  "result": "Dana is ready to buy; send the quote today and confirm the delivery date.",
  "agent_used": "General",
  "tokens_used": 1840
}

List AI Agents

GET/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

  • teamIdstringrequired

    Your Team ID.

Response

4 response fieldsShow
  • agents[].idstring

    Send as agent_id.

  • agents[].namestring

    Display name (built-in agents are named in Hebrew).

  • agents[].descriptionstring

    What the agent does.

  • agents[].is_customboolean

    True for agents your team created.

Errors

  • 401The API key is missing, wrong, or belongs to another team (Invalid API key).
  • 500Unexpected server error. The error field carries the message.
Request
curl -X GET "https://try.saleso.io/api/make/agents/$SALESO_TEAM_ID" \
  -H "x-api-key: $SALESO_API_KEY"
Response · 200
{
  "agents": [
    {
      "id": "general",
      "name": "מנהל כללי",
      "description": "סקירה רחבה של השיחה ותובנות עיקריות.",
      "is_custom": false
    }
  ]
}