Conversations
A conversation is a text thread between one of your numbers and one other person. It is how the message center groups messages together, and each thread has a resolved status your team works through (the portal's "Unresolved" filter). You can read the messages in a conversation, and change the thread's status.
A conversation is identified by both numbers: your line and the other person's. That is why these endpoints take two values in the URL instead of a single id.
If you are reacting to an AccountSMS webhook,
you already have both numbers, so you can act right away without looking anything
up first.
Formatting in the URL is fine — +1 (212) 555-0188 works — and the response gives
back the cleaned-up digits, so you can see exactly which conversation was used.
Resolving
curl -X POST \
https://api.account.telebroad.com/api/public/v1/sms/conversations/12125550188/13475550123/resolve \
-H "Authorization: Bearer $TB_KEY"
You do not need to send a body — an empty POST is a complete request.
Two behaviours you can rely on:
- It works on threads no one has touched yet. Most conversations have no saved
status until someone acts on them. Resolving one creates that status instead
of returning
404, so you can close a brand-new incoming thread that your integration already handled somewhere else. (An endpoint that returned404here would fail on the most common case.) - It is idempotent (safe to repeat). Resolving a conversation that is already
resolved returns
200with the saved status, and does not overwrite who closed it or when — so retrying after a timeout cannot change the record.
Who gets recorded as resolving it
| Credential | resolvedBy |
|---|---|
| OAuth token | Always its own owner. You cannot name someone else. |
| API key | Absent, unless you pass resolvedBy explicitly. |
resolvedBy is left out entirely — not set to 0 — when an integration
resolved a thread without naming a person. An API key has no user behind it, and a
0 there could be mistaken for a real user id.
If resolvedBy is not a user on your account, you get a 400.
Reading a conversation
Use this to read the messages inside one specific conversation you already know — you request it by its two numbers (your line, then the other party):
curl 'https://api.account.telebroad.com/api/public/v1/sms/conversations/12125550188/13475550123' -H "Authorization: Bearer $TB_KEY"
Needs messages:read — reading the contents of a conversation is a separate
permission from the settings scope (sms:read), the same way call recordings are.
markRead defaults to false — unlike the portal, where opening a thread marks
it read.
If it defaulted to true, an integration that just polls for new messages would
silently clear the unread badges your staff rely on, and nothing would explain why
the inbox kept emptying itself. Only pass markRead=true when a person has
actually seen the messages.
Read status is tracked per user, not per account: a thread your colleague has
read is still unread for you. That is why read on each message and unread on
each conversation reflect your own credential, while readBy lists everyone else
who has read it.
Listing conversations (the inbox)
Use this to get a list of conversations — for an inbox or queue view — rather
than the messages inside one. Call GET /sms/conversations with filters and no
specific numbers:
curl 'https://api.account.telebroad.com/api/public/v1/sms/conversations?unresolved=true&assignedToMe=true' -H "Authorization: Bearer $TB_KEY"
Each conversation in the list already includes its status — resolved or not, who it
is assigned to, and so on. So you can build a whole inbox or queue view from this
one request, instead of fetching the list and then making a separate call for
each conversation just to look up its status. Filters combine with
AND — unresolved + assignedToMe means "my open threads," which is the message
center's default view.
The optional lines parameter lets you narrow the list to specific numbers. If you
leave it out, every texting number on the account is included — so a new
integration does not have to call GET /sms/lines first to find out what numbers it
has, and it keeps working automatically when the account buys a new number (there is
no fixed list to update).
unresolved, assignedToMe and unassigned are checked against a thread's saved
status — so a thread that has never had any status at all (never resolved,
never assigned) is not returned by them, not even by unassigned. This is the same
set the portal's Unresolved queue shows, for the same reason.
List without those filters to see every thread.
Opening at a specific message
A webhook like AccountSMS gives you a message id, but not where that message
falls in the thread — is it the 5th message, or the 500th? You normally page through
a thread with limit and offset (offset = how many messages to skip from the
start), but that only works if you know the message's position, and you do not. So
instead, pass the id straight to
GET /sms/conversations/{line}/{number}/messages/{id}: it finds that message and
returns the chunk of messages around it, so you can show it in context without
knowing its position.
Assigning
curl -X POST https://api.account.telebroad.com/api/public/v1/sms/conversations/12125550188/13475550123/assign -H "Authorization: Bearer $TB_KEY" -H 'Content-Type: application/json' -d '{"userId": 481920}'
A null or missing userId unassigns the thread, sending it back to the
unassigned queue — which is why there is no separate unassign endpoint.
Assigning is not the same as resolving. They are two independent things: a
resolved thread can stay assigned to whoever closed it, and an open thread can sit
unassigned. That is why you can filter on unresolved and unassigned separately.
Reopening
POST /sms/conversations/{line}/{number}/reopen moves a resolved thread back into
the open queue — the other half of resolve, for when a customer replies to
something you already closed. It is idempotent, and a thread no one ever resolved is
already open, so it succeeds there too.
Deleting
DELETE on a conversation, or on a single message, is permanent — it cannot be
undone through this API. It needs messages:delete — messages:write alone
is not enough.
Delete a single message (by its message id):
curl -X DELETE \
https://api.account.telebroad.com/api/public/v1/sms/conversations/12125550188/13475550123/messages/88214417 \
-H "Authorization: Bearer $TB_KEY"
Delete a whole conversation (every message in the thread):
curl -X DELETE \
https://api.account.telebroad.com/api/public/v1/sms/conversations/12125550188/13475550123 \
-H "Authorization: Bearer $TB_KEY"
If the account has restrict deleting SMS turned on, a delete returns 403 even
with messages:delete. That setting exists precisely so an account owner can stop
their own staff and integrations from destroying message history.
What is missing today
There is no notification when a colleague resolves or assigns a thread in the
portal. The AccountSMS webhook fires on new messages, not on changes to a
conversation's status — so an app that wants to mirror the queue has to poll the
inbox.
If you need this, let us know — the more people ask for it, the sooner we build it.
Errors
| Status | type | Cause |
|---|---|---|
400 | invalid_request | Any of: a path segment is not a phone number; an unknown body field; resolvedBy / userId is not a user on your account; or marking a line read with an API key (read state needs a user — authorize with OAuth). |
403 | insufficient_scope | The credential lacks the scope the endpoint needs |
403 | permission_denied | line is not a number your credential is authorized for, or the account restricts deleting messages |
The permission check is on the line, not the conversation — the other party's
number is just an outside phone number. It is the same check as POST /sms/messages,
so a line you are allowed to send from is a line you are allowed to resolve on.