readyDocs Open the app

Conversations

The inbox has one thread per contact. To reply, send to the contact with POST /v1/messages; it lands in the same thread. View-only teammates can read conversations but not change them. Reading a thread still marks it read (see List a thread’s messages). An id that isn’t on your account returns 404 CONVERSATION_NOT_FOUND. An id that isn’t a whole number returns 400 invalid_field.

#The Conversation object

List conversations returns this object. Find a contact’s conversation returns a shorter row (see there). Ignore fields you don’t recognize.

idinteger
The conversation id.
contact_idinteger
The contact id.
first_namestring
The contact’s first name.
last_namestring
The contact’s last name.
phoneE.164 string
The contact’s phone.
statusstring
open, closed or archived. null and active mean open: treat them the same. Set it with Set a conversation’s status.
unread_countinteger
Unread messages in the thread. Mark read and Archive clear it; Mark unread sets it to 1.
starredinteger
1 or 0. Toggle it with Star or unstar a conversation.
pinnedinteger
1 or 0.
assigned_tointeger | null
Who the thread is assigned to, or null. This is the contact’s owner when the contact has one, else the thread’s own assignee. Set it with Assign a conversation.
last_message_atISO 8601 string
When the newest message was sent or received. The list is sorted by it, newest first.
last_message_previewstring
The start of the most recent message.
phone_number_idinteger
The id of your number the thread uses, as in GET /v1/numbers and line_ids.
from_numberE.164 string
Your number the thread uses.
tagsstring
The contact’s tags as a JSON array in a string, like "[\"vip\"]". Parse it before you use it.
contact_statusstring | null
The contact’s status.
dnd_smsinteger | null
1 when the contact is on do not disturb for texts.
page_keystring
Where this thread sits in the list. Pass the last one as before to get the next page.
opt_out_atISO 8601 string | null
When the contact opted out, or null.

#List conversations

Your inbox threads, newest message first. Starring doesn’t change the order; use filter=starred. Returns a list of Conversation objects in data.

Parameters

limitinteger · queryDefault 50Max 1000
Page size.
offsetinteger · queryDefault 0
Rows to skip: a whole number, 0 or more. Each page skipped makes the next one slower, and with search it reaches only the first 2,000 matches. A page too deep to read in time answers 503 offset_too_deep. To walk the whole list, page with before.
beforestring · query
The next page: pass the page_key of the last thread you got. Works at any depth and with search; leave offset out.
filterenum · query
Which view; default is every thread that isn’t archived, closed ones included. Unknown values are ignored.
  • unread
  • starred
  • archived
  • spam
  • blocked
line_idsstring · query
Comma-separated number ids from GET /v1/numbers (not phone numbers), up to 100, for example line_ids=2647,2648. Invalid values are ignored. When none of them is a number id the whole inbox comes back, and the answer has ignored_filters: ["line_ids"] to say the filter was dropped.
freshinteger · query
Lists are cached up to 30 seconds, and longer when the server is slow to refresh them. Send 1 after a change to read live.

Filters

Every filter below is optional and they combine with AND. Comma-separated values are trimmed. A filter with an unknown or malformed value is ignored, not refused (the exceptions are marked), so a typo returns the unfiltered list: check total and the rows.

tagstring · query
Contact tags, comma-separated. With tag_mode=and a thread must carry every tag; otherwise any one tag matches.
tag_modeenum · query
and or or (the default). Only used with tag.
tag_excludestring · query
Comma-separated tags. Threads whose contact has any of them are left out; contacts with no tags stay in.
pipeline_stagestring · query
One pipeline stage id, or several separated by commas (any of them).
categoryinteger · query
An inbox category id.
reply_categorystring · query
Comma-separated reply categories (lower case); any of them matches.
assigned_tostring · query
Comma-separated user ids and/or unassigned; a thread matches when any of them is its assignee or a co-assignee.
assigned_excludestring · query
Comma-separated user ids. Threads assigned to any of them are left out; unassigned threads stay in.
contact_statusstring · query
Comma-separated contact statuses; any of them matches.
contact_status_excludestring · query
Comma-separated contact statuses to leave out.
source, state, companystring · query
Case-insensitive "contains" match on the contact’s source, state or company. Add _not (source_not, state_not, company_not) to leave out matches.
reply_textstring · query
The lead has sent an inbound message containing this text (case-insensitive).
reply_text_excludestring · query
The lead has sent no inbound message containing this text.
area_codestring · query
Contact phone area code (first 3 digits of the 10-digit number).
area_code_notstring · query
Leaves out contacts with that area code.
dndenum · query
1: contacts you can’t text (opted out or do-not-disturb). 0: contacts you can.
score_min, score_maxinteger · query
Contact score range, inclusive. A value that is not a whole number is ignored.
enrolled_seqstring · query
Contacts enrolled in this drip campaign.
last_activity, la_from, la_tostring · query
Last message activity. last_activity is none (never messaged), before (with la_to), after (with la_from) or between (both). Dates are YYYY-MM-DD or a UTC instant ending in Z. An unknown mode or malformed date answers 400.
starred, pinned, litigator, landline, opted_outboolean · query
Send 1 to keep only threads with that flag. Any other value adds no filter. Flags combine with AND.
carrierstring · query
Exact contact carrier name.
reply_statusstring · query
Comma-separated: needs_reply, replied, unanswered, positive, negative. Any of them matches (OR).
reply_status_allstring · query
Same values; every one listed must hold (AND).
reply_status_excludestring · query
Same values; a thread matching any of them is left out.
last_directionenum · query
inbound (the lead spoke last) or outbound.
deliveryenum · query
failed: at least one outbound message failed. delivered: at least one was delivered.
ai_draftboolean · query
1: an AI draft reply is waiting. 0: none.
drip_sequence_id, campaign_blast_idinteger · query
Threads that replied to that drip campaign or one-time campaign. drip_sequence_id wins when both are sent. A value that is not a whole number is ignored.
campaign_days, campaign_sincestring · query
Narrow the campaign filter: sends in the last campaign_days days (1 to 3650, default all), or since the date in campaign_since, which wins.
Returns
data[]object[]
Conversation objects.
has_moreboolean
Keep paging while true.
search_timed_outboolean
true when a search ran out of time. If data is empty, that is not "no matches": narrow the search and retry.
search_partialboolean
true means some matches may be missing.
search_offset_cappedboolean
true when offset paged a search past its first 2,000 matches. More exist: page on with before.
did_you_meanobject[]
Only on an empty first page of a phone number search: up to 5 conversations whose number is one digit off (one digit changed, or two neighbouring digits swapped), newest first, as Conversation objects. Show them as suggestions. Left out when there are none.
totalinteger
Threads matching filter and search, counted up to 1,000. While searching, or filtering by tag, assignee or campaign, total is the rows returned so far, not a count, so use has_more. With line_ids, total and counts cover only those numbers.
total_cappedboolean
true when the count passed the cap.
count_capinteger
The cap, 1000.
countsobject
Thread counts per view: all (the default view, without archived), unread, starred, pinned, archived, spam.
Errors
HTTPCodeWhen
400invalid_offsetNot a whole number, 0 or more (in error_code).
503offset_too_deepAn offset page without search ran out of time. Nothing was skipped: page with before from the last thread you got.
curl "https://api.tryready.com/conversations?limit=50&filter=unread" \
  -H "X-API-Key: $READY_API_KEY"
Returns:
{
  "success": true,
  "data": [
    {
      "id": 5521,
      "contact_id": 101,
      "first_name": "Ada",
      "last_name": "Lovelace",
      "phone": "+12125550199",
      "status": "open",
      "unread_count": 1,
      "starred": 0,
      "pinned": 0,
      "assigned_to": null,
      "last_message_at": "2026-10-01T20:40:12.004Z",
      "last_message_preview": "Yes, I'm interested!",
      "phone_number_id": 2647,
      "from_number": "+14155550100"
    }
  ],
  "total": 1,
  "has_more": false,
  "total_capped": false,
  "count_cap": 1000,
  "counts": {
    "all": 238,
    "unread": 1,
    "starred": 0,
    "pinned": 0,
    "archived": 10,
    "spam": 0
  }
}

#List messages in a conversation

One thread’s messages: the newest page, oldest first within the page. Returns a list of Message objects in data, with the differences under Returns.

Reading any page marks the thread as read, for everyone on the account, unless a reply came in after the newest message on that page. Sync jobs should add mark_read=0. A test key never marks a thread read.

Parameters

idinteger · pathRequired
The conversation id.
mark_readinteger · query
Send 0 to leave the unread state alone.
limitinteger · queryDefault 50Max 500
Page size.
offsetinteger · queryDefault 0
Increase to go further back in time.
Returns
data[].idinteger
This thread’s message id, the one quoted_message_id takes on Send a message.
data[].to_numberE.164 string
Recipient.
data[].from_numberE.164 string
Sender.
data[].costnumber
What the message cost, in USD.
data[].failed_atISO 8601 string | null
When it failed, or null.
data[].senderobject
On an outbound text, who sent it: kind (team, campaign, automation or integration) and name (the teammate, campaign, automation or integration, or null when it isn’t known). Left out when we can’t tell.
data[].can_reactboolean
true on a received iMessage to your iMessage line that you can react to with a tapback. Left out otherwise.
Errors
HTTPCodeWhen
403CONVERSATION_NOT_ASSIGNEDTeammate access doesn’t cover this thread: it’s assigned to someone else. Also CONVERSATION_NOT_ALLOCATED: the thread’s number isn’t allocated to you.
curl "https://api.tryready.com/conversations/5521/messages?mark_read=0&limit=50" \
  -H "X-API-Key: $READY_API_KEY"
Returns:
{
  "success": true,
  "data": [
    {
      "id": 19292894,
      "direction": "outbound",
      "body": "Your order #1042 has shipped.",
      "status": "delivered",
      "to_number": "+12125550199",
      "from_number": "+14155550100",
      "segments": 1,
      "cost": 0.012,
      "media_url": null,
      "created_at": "2026-10-01T20:32:03.473Z",
      "sent_at": "2026-10-01T20:32:04.102Z",
      "delivered_at": "2026-10-01T20:32:09.856Z",
      "failed_at": null
    },
    {
      "id": 19408828,
      "direction": "inbound",
      "body": "Yes, I'm interested!",
      "status": "received",
      "to_number": "+14155550100",
      "from_number": "+12125550199",
      "segments": 1,
      "cost": 0.0105,
      "media_url": null,
      "created_at": "2026-10-01T20:40:12.004Z",
      "sent_at": null,
      "delivered_at": null,
      "failed_at": null
    }
  ]
}

#Find a contact’s conversation

The thread for one contact, or null if there isn’t one. An unknown contact id also returns null, not a 404.

Parameters

contactIdinteger · pathRequired
The contact id.
Returns
dataobject | null
A shorter Conversation object, or null. It has no tags. Its assigned_to is the thread’s own assignee, and contact_assigned_to is the contact’s owner, so it can differ from the list’s assigned_to.
Errors
HTTPCodeWhen
403CONVERSATION_NOT_ASSIGNEDTeammate access doesn’t cover this thread: it’s assigned to someone else. Also CONVERSATION_NOT_ALLOCATED: the thread’s number isn’t allocated to you.
curl "https://api.tryready.com/conversations/by-contact/101" \
  -H "X-API-Key: $READY_API_KEY"
Returns:
{
  "success": true,
  "data": {
    "id": 5521,
    "contact_id": 101,
    "first_name": "Ada",
    "last_name": "Lovelace",
    "phone": "+12125550199",
    "status": "open",
    "unread_count": 0,
    "contact_status": "active",
    "dnd_sms": 0,
    "opt_out_at": null,
    "last_message_at": "2026-10-01T20:40:12.004Z"
  }
}

#Best time to text a contact

A 2-hour window when this contact has replied to you most, from the hours of their past replies. It needs at least 3 replies; with fewer you get best: null. The window always falls between 9:00 AM and 7:00 PM in your account’s time zone. Read only.

Parameters

contactIdinteger · pathRequired
The contact id.
Returns
bestobject | null
The window, at the top level, or null when there aren’t enough replies.
best.start_hhmmstring
Start of the window, like 14:00.
best.end_hhmmstring
End of the window, 2 hours later.
best.labelstring
The window in words, like 2 PM to 4 PM.
best.sampleinteger
How many replies it’s based on.
best.sourcestring
Always contact.
best.reasonstring
A short sentence you can show.
timezonestring
Your account’s IANA time zone. The window’s hours are in this zone.
dataobject
The same best and timezone again, for clients that read every answer from data.
Errors
HTTPCodeWhen
400INVALID_CONTACT_IDNot a contact id (for example a phone number).
403CONVERSATION_NOT_ASSIGNEDTeammate access doesn’t cover this thread: it’s assigned to someone else. Also CONVERSATION_NOT_ALLOCATED: the thread’s number isn’t allocated to you.
500best_time_unavailableWe couldn’t work it out right now. This is a failure, not "no data"; retry.
curl "https://api.tryready.com/conversations/by-contact/101/best-time" \
  -H "X-API-Key: $READY_API_KEY"
Returns:
{
  "success": true,
  "best": {
    "source": "contact",
    "start_hhmm": "14:00",
    "end_hhmm": "16:00",
    "label": "2 PM to 4 PM",
    "sample": 7,
    "reason": "When this contact has replied to you before."
  },
  "timezone": "America/Chicago",
  "data": {
    "best": {
      "source": "contact",
      "start_hhmm": "14:00",
      "end_hhmm": "16:00",
      "label": "2 PM to 4 PM",
      "sample": 7,
      "reason": "When this contact has replied to you before."
    },
    "timezone": "America/Chicago"
  }
}