Skip to main content

Overview

A chat agent answers your customers in writing, on SMS, WhatsApp and email. You build and tune it in the Sendora app: its instructions, knowledge, tools and channels. The API lets you see your chat agents, turn them on or off, and have one write first to a contact. They use the same agent endpoints as voice agents: List or get agents (type=chat), Update agent (live) and Send a message or start a chat (chat_agent_id). Chat agents are switched on per workspace. Until they are on for yours, every chat agent endpoint answers 404. The API never returns an agent’s instructions, tools or any internal identifier. Each agent has a public id, the same value you see in the app address bar.

Listing and reading agents

Returns an array, newest first. X-Total-Count, X-Page and X-Per-Page report where you are in the list. See Pagination.
  • connected means a number or mailbox is assigned to the agent for that channel.
  • enabled means the agent is answering on it now.
  • mode is auto when the agent replies right away and draft when it writes a draft for a person to approve.
Read one agent with GET /api/v1/public/agents?id={agent_id}.

Turning an agent on or off

Turning on switches the agent on for every channel that has an account connected, and the response lists channels_on and channels_missing. It needs at least one connected channel (422 otherwise). If a channel’s account already belongs to another agent the call answers 409. Turning off stops the agent on every channel.

Starting a chat

The agent writes first. It sends an opening message on SMS or WhatsApp and then carries the conversation, with its own instructions, knowledge and tools.
Give phone (with country code) or lead_id, not neither. Leave opening out and the agent writes the first message from its instructions. The response returns the text that was sent. A chat is refused when: Starting a chat sends a real message and uses the workspace’s messaging balance.

In a campaign

A chat agent can answer a campaign’s replies on email, SMS and WhatsApp. Set the campaign’s reply_mode and reply_agent_id, see Answering replies. An SMS or WhatsApp step can also let a chat agent write its opening message. In the step’s configuration set chat_agent_id to the agent’s id:
  • Leave the step’s message empty and the agent writes the opening from its instructions, for each lead, when the step runs.
  • Write a message and it is sent as written.
Everything else about the step stays the same: send windows, sender rotation, limits and timeline entries all apply. Launch checks warn when the campaign’s replies are off or go to a different agent, and block a step whose chat agent cannot be found.