Speko Docs
SMS

Shared SMS inbox

Work inbound and outbound conversations with humans and agents without duplicate replies.

Open Messages in the dashboard to search organization-scoped conversations by remote number, inspect delivery state and segment charges, assign work, add internal notes, reply, and start a new conversation. Each agent has its own Messages tab, and each number whose messaging profile is ready links to its conversations. The API mirrors the same model under /v1/sms/conversations.

Every workspace can read and work its inbox: search, filters, paging, notes, assignment, and status changes. Replies, new conversations, the Batch send and Settings tabs, and new consent records need a number on an approved 10DLC campaign. Until then the page shows one notice that links to registration. See who can send.

Inbound texts from short codes and named senders, such as verification codes, are stored like any other. Their conversations are receive-only: those senders cannot be texted back, so a reply is refused with INVALID_RECIPIENT and no automatic reply starts.

One conversation exists per workspace, local number, and remote number. It snapshots the active campaign while retaining the selected sender. Inbound messages remain visible even if the campaign later drifts or is unassigned; outbound sending stays blocked until readiness is restored.

GET /v1/sms/conversations filters by status, phone_number_id, campaign_id, assigned_user_id, assigned_agent_id, agent_id, recipient, unread, and last_message_after. It returns the most recent conversations first and pages with next_cursor.

Agents and numbers

A conversation belongs to its number, not to an agent. assigned_agent_id is the agent handling it: the agent in agent_override_id when one is pinned, otherwise the number's current agent. When you move a number to another agent, its conversations move with it.

Every message records the agent handling its conversation at the moment the message was written, in agent_id. That holds whether a person, a program, or the agent wrote it, and origin tells you which. The value never changes afterward.

Filter conversations by agent in one of two ways:

  • assigned_agent_id=agent_x returns the conversations the agent handles now.
  • agent_id=agent_x returns the agent's inbox: the conversations it handles now, plus every conversation holding a message recorded with that agent.

After a number moves from agent A to agent B, A's inbox still lists the number's conversations with A's messages in them, and their assigned_agent_id reads B. GET /v1/sms/messages?agent_id=agent_x returns only the messages recorded with that agent. Replies always go out from the conversation's number.

Human workflow

  • PATCH /v1/sms/conversations/{id} changes status (open, closed, or spam), assigned_user_id, assigned_agent_id, recipient_timezone, or automation_status. Setting assigned_agent_id pins that agent to the conversation. Setting it to null removes the pin, and the conversation follows its number's agent again.
  • POST /v1/sms/conversations/{id}/read clears unread state.
  • POST /v1/sms/conversations/{id}/notes adds an internal note that is never sent to the recipient.
  • POST /v1/sms/conversations/{id}/messages queues a reply using the conversation's sender and recipient.
  • Both writes accept expected_agent_id, and so does POST /v1/sms/messages, which writes to the conversation between its number and recipient. Send it from a view scoped to one agent, and the write is refused with 409 SMS_THREAD_AGENT_CHANGED unless that agent handles the conversation. An agent's Messages tab sends it, for a new conversation too. The workspace Messages page does not.
  • DELETE /v1/sms/conversations/{id} immediately redacts message and note content. It is owner/admin-only and retains minimal billing/compliance facts. Texts in the conversation still queued or scheduled are canceled with the error code CONVERSATION_REDACTED, and their credit holds are released.

A dashboard human reply pauses automation. New inbound messages do not resume it. Use an explicit automation_status: "enabled" update when handing the thread back to the agent.

Agent automation

An inbound message other than a STOP, START, or HELP keyword gets an automatic reply when three things hold: the conversation's automation_status is enabled, the conversation has an agent in assigned_agent_id that still exists, and the conversation's number can send (it is on an approved 10DLC campaign). Speko checks all three when the message arrives, and the first two again before the reply is sent. A number that cannot send stores the inbound message and starts no reply.

The two switches above the conversation only set its starting state:

  • A number's smsAutomationEnabled (owner or admin only) decides whether a conversation created on that number starts with automation_status: "enabled" or "disabled". Changing it later leaves existing conversations as they are. Pause those with PATCH /v1/sms/conversations/{id}.
  • The organization's default_automation_enabled in PATCH /v1/sms/settings sets a number's smsAutomationEnabled once, when the number's messaging profile first becomes ready. It never changes a number or a conversation after that.

Both start off, so automation is off by default. A number with no agent still collects inbound messages, and nothing replies automatically unless the conversation has an agent pinned in agent_override_id. Deleting an agent removes its pins, and its conversations go back to their numbers' agents. An agent message still waiting to be sent when its agent stops handling the conversation is canceled with the error code AGENT_NO_LONGER_HANDLES_THREAD, and its credit hold is released. An auto-reply still waiting to be sent when automation is paused, because a person took the conversation over or the recipient opted out, is canceled with AUTOMATION_PAUSED the same way. A pause does not cancel a message the agent sent with a tool during a call.

Speko coalesces short inbound bursts, serializes turns with a conversation lease, supplies recent SMS history, and instructs the agent to answer in concise plain text. Failed model turns are not retried automatically, preventing duplicate replies and duplicate LLM charges.

STOP/START/HELP processing always runs before customer webhooks or agent execution. Suppression pauses automation and cannot be bypassed by assigning another sender.

On this page