readyDocs Open the appOpen the app

Messages

Send one text with POST /v1/messages or many with POST /v1/messages/bulk, then read them back or delete them. For what a text costs, see How a text is priced.

#The Message object

Get a message and List messages return this object. List messages also returns the same value as id, and adds direction and cost_usd; Get a message adds sent_at.

message_idstring
The id a send returned. Opaque: don’t parse it or assume a format. Webhooks and GET /v1/messages/:id use the same value, including when Ready resends a failed text for you: the public id stays the same.
directionenum
inbound or outbound.
statusstring
queued, delivered, failed, undelivered or unknown for outbound; received for inbound. unknown means carrier acceptance could not be confirmed and does not prove the text was unsent. failed isn’t always final: Ready resends some failed texts itself.
Failures Ready resends for you

Don’t resend a text while Ready still might, or the recipient gets it twice and you pay twice. Ready resends only the kinds below and only inside their windows. If a text is still failed after its window, resend it yourself with a new key.

  • expired and undeliverable with no more specific carrier reason: Ready resends the same text about 15 minutes after the send and again 30 minutes after that; a drip campaign or automation text can get a third try 6 hours later. Each try is billed. By default, campaign and unclassified texts are not resent more than 6 hours after the original send, so time-sensitive copy isn’t sent late; drip campaign and automation texts have a 24-hour window. A campaign keeps the 6-hour window even if it also belongs to a drip campaign.
  • rejected or carrier_rejected, only when the carrier refused your sending number: resent once, within 3 hours of sending, possibly from another of your numbers. Other rejected texts aren’t resent.
  • Each resend is billed like the original send.
  • The resend keeps the same public message_id; your original id still resolves. Its status goes from failed back to queued, then to delivered or failed.
  • Webhooks: message_failed, then message_delivered or message_failed for the resend, under the same public message_id.
error_reasonstring | null
A stable cause to branch on and count by, null unless status is failed or undelivered. When no specific cause was recorded, you get a general reason instead.
Possible values
error_reasonMeaningRetry?
blocked_before_sendReady held it before sending (see blocked).No. It was never sent, and the text wasn’t charged (see blocked). Fix or remove the number.
recipient_destination_rejectedDestination rejected.No. Check the number and its text service with the contact.
recipient_cannot_receive_smsText service unavailable or inactive.No. Check the number with the contact.
recipient_unreachablePhone off or out of coverage.No. Check the number with the contact.
recipient_blockedThe recipient’s carrier blocks texts to this number.No. Check the number with the contact.
recipient_out_of_creditPrepaid plan with no credit.Yes, a day later with a new key, once you’ve checked it’s still failed: by then the recipient may have topped up. Ready may resend some of these itself.
recipient_network_unknownNew, ported or out-of-service number.not specified
carrier_delivery_failedAccepted, then not delivered, no reason given.No. Check the number with the contact.
carrier_filtered_contentSpam filter.Reword the text first.
sender_network_not_provisionedYour sending account lacks network coverage.No. Contact support.
expired, undeliverable, rejected, carrier_rejectedGeneral: the carrier gave no specific cause.Not yet: Ready resends some of these (see status). If it’s still failed 6 hours after you sent it (24 for drip and automation texts), Ready won’t resend it, so resend it yourself with a new key.
temporary_failureGeneral: the carrier gave no specific cause.Yes, later, with a new key. Ready doesn’t resend it.
invalid_destinationGeneral: the carrier gave no specific cause.No. Check the number with the contact.
unknownGeneral: the carrier gave no specific cause.not specified
error_detailstring | null
A plain sentence to show a person, null when error_reason is. Its wording can change, so don’t match on it.
blockedboolean
true when Ready held the text before sending it: a bad or landline number, a known litigator (with TCPA scrubbing on), an opt-out, or the content filter. No carrier saw it, and the text itself wasn’t charged. A text the content filter blocked carries the compliance fee, and with number validation on the number check is charged: see Billing. Its error_reason is blocked_before_send and status still reads failed. Leave these out of your delivery rate: they’re a list problem, not a delivery problem.
fromE.164 string
Sender.
toE.164 string
Recipient.
bodystring
The text you asked to send.
sent_bodystring
The exact text sent, which can be longer than body: Ready may add your opt-out line and business name to meet carrier rules. Include your own opt-out in body to stop us adding ours.
media_urlstring | null
The attached image’s URL, or null.
segmentsinteger
Billed segments, counted on sent_body.
cost_usdnumber
What the text cost, in USD.
created_atISO 8601 string
When it was created.
sent_atISO 8601 string | null
When Ready handed it to the carrier.
delivered_atISO 8601 string | null
When it was delivered.
reply_categorystring | null
The label AI reply sorting gave an inbound reply, such as interested. null for outbound texts and for replies that weren’t sorted.

#Send a message

Sends one text. A 200 means accepted, not delivered. Billed at segments × your rate, plus fees (pricing).

Parameters

Idempotency-Keystring, headerRecommended
Unique per message; reuse only to retry (Idempotency).
toE.164 stringRequired
Recipient, E.164 recommended (+12125550199). A 10-digit US number is treated as +1. Ready texts recipients in the United States, Canada, Australia and the United Kingdom (Terms of Service, section 8).
bodystringRequired
The text, up to 25 segments. message is an alias. Leave it out only when you send a media_url: a picture can go alone.
Details25 segments is about 3,825 plain characters, or about 1,675 with emoji or other Unicode.
More parameters
fromE.164 string
One of your numbers; omit it and Ready picks. from_phone_number_id isn’t supported here.
media_urlstring
A public http or https URL of an image to attach. No public link for your file? Upload it with Upload a file and pass the url it returns. Anything else is refused with 400 invalid_media_url. With an image, the text is limited to 1,600 characters and the message is billed as one image message.
from_strategyenum
How Ready picks the number when you don’t set from. Leave it out and Ready keeps the number this contact already texts with, and otherwise matches the recipient’s area code when it can. Setting any value, local included, ignores the conversation’s saved number, but Ready still sends from the number you last texted or called this person with, if it’s still one of your numbers. The strategy picks the number for someone you haven’t reached yet.
  • local match the recipient’s area code
  • even spread across your numbers, least used first
  • random pick one of your numbers at random
confirm_empty_mergeboolean
Send true to send even though a merge field is blank (see empty_merge_field below).
override_quiet_hoursboolean
Send anyway after a 409 QUIET_HOURS_BLOCK that has "can_override": true. It lifts only the quiet hours set on your account, never the federal and state quiet hours. Ready records it as your statement that this is a consented, conversational text.
conversation_idinteger
File the text in this conversation (from GET /conversations). Unless you set from, Ready prefers the number that conversation uses. An id that isn’t on your account is ignored.
quoted_message_idinteger
Message id in that conversation to quote (inbox only), from GET /conversations/:id/messages. Ready saves its first 200 characters as quoted_text on the new message. The text the recipient gets is unchanged.
Returns
data.message_idstring
Store it. The message_id of the Message object.
data.statusstring
queued; delivered or failed follows when the carrier reports back (the message_delivered or message_failed webhook, or GET /v1/messages/:id).
data.fromstring
The number it went from, the one Ready picked when you left from out.
data.tostring
The number it went to.
data.segmentsinteger
What you’re billed for, counted on sent_body.
data.sent_bodystring
The exact text sent (sent_body).
data.compliance_text_addedstring | null
Just the text Ready added, such as Reply STOP to opt out. -Acme Co, or null when nothing was added.
data.sent_atISO 8601 string
When Ready handed it to the carrier. sent_at_unix is the same time in Unix seconds.
data.carrier_feenumber
Carrier fee in USD. For a text it is segments × carrier_fee_usd_per_segment. A text with an image has one flat fee instead. It is 0 on a free account and on a test key.
data.balance_usdnumber
Your balance after this send. carrier_balance is the same number (legacy; use balance_usd).
data.credits_remaininginteger
Legacy; use balance_usd. Approximate 1-segment texts your balance covers, counted at the rate this text was charged at, carrier fee included.
What the response means
  • 202 with data.status: "held": quiet hours where the recipient is, so Ready holds the text and sends it at data.send_at. Don’t send it again.
    MoreThe body has "success": true, data.status, data.send_at (ISO 8601) and data.queue_id, the held text. data.message_id is null: no message exists until it sends. You’re charged only when it sends. The same body also has held: true, code: "QUIET_HOURS_HELD", queued_for (the same time as send_at), recipient_tz and a warning sentence. Read data.status: the older top-level status says queued. When the text can’t be held, you get 409 QUIET_HOURS_BLOCK instead and nothing is sent.
  • 202, error_code: "send_outcome_unknown": it may have been delivered and charged. The body also has "success": false and outcome: "unknown". A retry with the same key returns this 202 again; see When to retry before you send it with a new key.
  • 200, error_code: "empty_merge_field": a blank merge field; nothing sent. The body has "success": false, needs_confirmation and empty_fields. Send again with "confirm_empty_merge": true to send it with the blank.
  • Rarely, 200 with "recorded": false, a warning and no message_id: sent and charged, not saved. Don’t resend.
  • Opt-outs, blocklisted numbers and known landlines are refused up front; the text isn’t charged (the number check is, with number validation on).
Errors
HTTPCodeWhen
400invalid_requestMissing to or body.
400invalid_fieldWrong type (field names it), or to is not a phone number.
400invalid_fromNot one of your numbers.
400NO_APPROVED_CAMPAIGNYour registration isn’t approved yet. Also NUMBER_SETUP_UNCONFIRMED, when Ready can’t confirm the number’s setup.
400country_not_supportedThe recipient is outside the United States, Canada, Australia and the United Kingdom. Nothing sent, not charged.
400no_sender_numberNo number to send from. Also no_country_sender: none of your numbers can text the recipient’s country.
400MESSAGE_TOO_LONGOver 25 segments (1,600 characters with an image).
400CONTENT_BLOCKEDBlocked content; a compliance fee may apply.
402insufficient_balanceBalance too low. Nothing sent, not charged. Top up in Billing, or turn on Auto top-up (Billing and pricing). Also CARD_REQUIRED, client_card_required (a sub-account that pays with its own card and has not added one yet), MONTHLY_CAP_REACHED, and BILLING_PAST_DUE or FRAUD_HOLD (these two in code).
403opt_out_lockedContact opted out. reason is the contact’s opt_out_source, such as sms_stop_keyword or tcpa_scrub. Also dnc_list (on your Do Not Call list), tcpa_block, global_blocklist, number_not_assigned.
403api_consent_attested_requiredconsent_attested missing, once enforced.
409QUIET_HOURS_BLOCKQuiet hours and the text can’t be held (with next_allowed_at). With "can_override": true, send again with override_quiet_hours to send it now.
409RAMP_CAP_REACHEDWarm-up cap used up.
409duplicate_sendSame text and number within 60 seconds, no key.
409number_activatingNumber still activating. Wait Retry-After.
422INVALID_DESTINATIONThe carrier rejected the destination as not a valid number. Nothing sent, not charged.
429rate_limitedOver carrier pace. Wait Retry-After, same key.
429daily_capDaily cap hit; resets midnight Pacific. Also number_daily_cap. No Retry-After.
500send_failedNot sent. New key, in a minute. Also hold_not_returned and reservation_unconfirmed (check your balance first).
500INTERNAL_ERROR_OUTCOME_UNKNOWNOutcome unknown, like a 202 (in code).
503provider_busyCarrier busy. Wait Retry-After, new key.
503gate_check_failedA check couldn’t run; not sent. Also carrier_capacity_busy, contact_unavailable, consent_check_failed, sending_paused, permission_check_unavailable, ADMISSION_SHED, send_dedupe_unavailable (Ready couldn’t check for a repeat send).
504REQUEST_TIMEOUT_OUTCOME_UNKNOWNOver 30 seconds, may still send. Check whether it did before you send again with a new key; a retry with the same key answers 409 idempotency_in_progress until it finishes, then its real result.

#Upload a file

Stores a photo, video, PDF, Office doc, CSV, text file or voice note on Ready and returns a public url. Pass that url as media_url in Send a message, Send to many or Voice messages. Uploading costs nothing; the send is billed as usual.

Parameters

filefile, multipartRequired
The file, sent as multipart/form-data. Up to 20 MB. Until your registration is approved, photos and documents have a smaller limit, and the error says what it is.
Returns
urlstring
The public link to the file. Anyone with the link can open it.
content_typestring
The file’s type, like image/jpeg.
sizeinteger
Bytes stored.

Each upload stores a new copy, so a retry is safe. You can upload 60 files every 10 minutes.

Errors
HTTPCodeWhen
400NO_FILENo file in file.
400UNSUPPORTED_FILE_TYPEReady can’t send this kind of file.
400FILE_CONTENT_MISMATCHThe file’s contents don’t match its type.
400UPLOAD_FAILEDThe upload couldn’t be read. Send the file again.
400media_malwareThe file failed the malware check.
400media_flaggedThe file failed the safety check.
403attachments_need_registrationStart your business registration first.
413FILE_TOO_LARGEOver 20 MB. Also FILE_TOO_SCAN_LARGE: over the smaller limit before your registration is approved.
429UPLOAD_RATE_LIMITEDToo many uploads in 10 minutes. Wait a few minutes.
503media_scan_unavailableThe safety check couldn’t finish. Try again in a minute. Also media_account_read_failed and media_registration_read_failed.

#List messages

Your account’s sent and received messages, newest first, including texts your team members sent. Returns a list of Message objects in data, paged with a cursor.

Parameters

directionenum, query
inbound or outbound.
toE.164 string, query
Only messages to this number.
fromE.164 string, query
Only messages from this number.
statusstring, query
queued, delivered, failed, undelivered, unknown or received. failed returns failed and rejected attempts; undelivered returns older undelivered or expired ones.
MoreAny other word isn’t refused: it only matches messages stored with exactly that word, so a typo returns an empty list. The answer then carries a warnings sentence listing the valid words.
limitinteger, queryDefault 50Max 200
Page size.
before_idinteger | string, query
The next_before_id from the previous page. The id of the last message on the page also works.
Moreoffset and page aren’t supported and are ignored, so you get the newest page again. When you send either one (other than offset=0 or page=1), the answer carries a warnings sentence saying so.
Returns
data[]object[]
Message objects.
has_moreboolean
Keep paging while true. It’s true on an exactly full page, so the last page can be empty.
next_before_idinteger | null
Pass as before_id for the next page; null on an empty page.
warningsstring[]
Only present when part of your query was ignored or may not do what you meant, such as offset, page or an unknown status. Plain sentences for a person to read: their wording can change, so log them and don’t match on them.
Specific delivery failures

Every failed or undelivered message includes error_reason, a stable cause to group on, and error_detail, a readable explanation to display or show on hover. Both are null for messages that did not fail. These match GET /v1/messages/:id and the message_failed webhook. Display error_detail; match and count by error_reason, because the wording can change.

The full list of error_reason values, and what to do for each, is under GET /v1/messages/:id.

For a campaign you track in your app, keep the message_id returned for each attempt and count matching messages by error_reason. Read every page using next_before_id, or update each message’s latest outcome from webhooks; do not count a repeated webhook as a new failure. status=failed returns attempts Ready or the carrier refused; status=undelivered returns attempts the carrier accepted but could not deliver, including expired ones. A page’s counts alone are not the campaign’s complete breakdown. If no specific cause was recorded, the API preserves a general or unknown reason instead of inventing one. A text Ready refused before sending has blocked: true and error_reason blocked_before_send.

Errors
HTTPCodeWhen
400invalid_toto has no digits. Also invalid_from for from.
400invalid_fieldA filter was sent twice, like ?status=a&status=b. Send each one once.
400invalid_before_idbefore_id is a message id that names no message on your account. Pass the next_before_id from the previous page.
429rate_limitedOver the per-account limit.

#Delete a message

Removes one message from your account’s message log for good. If it was the last text in its conversation, the empty conversation goes too. Needs the delete_messages permission. Test keys can’t delete.

Path parameters

idintegerRequired
The message’s id from GET /v1/messages, the message_id you got when you sent it, or the message_id of an inbound_reply webhook.

Returns { "success": true, "data": { "id": 19408828 } }, where id is the deleted message’s row id (the number next_before_id pages by). Calling it again for the same id answers 404, so a retry never removes anything else.

Errors
HTTPCodeWhen
400INVALID_MESSAGE_IDThe id is longer than 100 characters.
403MESSAGE_NOT_ASSIGNEDThe key’s user can’t open this message: it is a teammate’s contact, or on a number that user isn’t given. Nothing was deleted.
403test_key_not_allowedA test key. Use a live key.
404MESSAGE_NOT_FOUNDNo message with this id in your account, or it was already deleted.
423LITIGATION_HOLDA legal hold is on the account or on this message’s numbers. Nothing was deleted.
503message_reference_ambiguousThe id matches more than one message. Nothing was deleted. Contact support.
503WALL_READ_FAILEDWe couldn’t check who the message belongs to. Nothing was deleted. Try again in a minute.
503HOLD_CHECK_UNAVAILABLEWe couldn’t check for a legal hold. Nothing was deleted. Try again in a minute.

#Delete many messages

Removes up to 5,000 messages from your account’s message log for good. Ids that aren’t in your account are skipped and nothing of theirs is touched. Conversations left empty go too. Needs the delete_messages permission. Test keys can’t delete.

Body parameters

idsinteger[]Required
1 to 5,000 message ids, the same ids Delete a message takes. An id that isn’t in your account is skipped.
Returns
data.deletedinteger
How many messages were deleted.
data.requestedinteger
How many of your ids were looked for in your account. A retry deletes nothing more and answers deleted: 0.
Errors
HTTPCodeWhen
400NO_MESSAGES_SELECTEDids is empty or missing.
400TOO_MANY_MESSAGESMore than 5,000 ids.
400INVALID_MESSAGE_IDSAn id isn’t a string or a whole number, or is longer than 100 characters. Nothing was deleted.
403MESSAGE_NOT_ASSIGNEDThe key’s user can’t open one of these messages. Nothing was deleted.
403test_key_not_allowedA test key. Use a live key.
423LITIGATION_HOLDA legal hold is on the account or on one of these messages’ numbers. Nothing was deleted.
429rate_limitedToo many bulk deletes in a short time. Wait and try again.
503message_reference_ambiguousAn id matches more than one message. Nothing was deleted. Contact support.
503WALL_READ_FAILEDWe couldn’t check who the messages belong to. Nothing was deleted. Try again in a minute.
503HOLD_CHECK_UNAVAILABLEWe couldn’t check for a legal hold. Nothing was deleted. Try again in a minute.