Messages
Send one SMS with POST /v1/messages, an X-API-Key header and a JSON body with the number, the text and consent_attested. A segment is $0.0075 plus a $0.0045 carrier fee.
Key facts
- Send one: POST /v1/messages
- Send many: POST /v1/messages/bulk, up to 100 numbers a call
- Auth: X-API-Key header
- Retries: send an Idempotency-Key header
- Rate: $0.0075 a segment plus a $0.0045 carrier fee
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/:iduse the same value, including when Ready resends a failed text for you: the public id stays the same. directionenuminboundoroutbound.statusstringqueued,delivered,failed,undeliveredorunknownfor outbound;receivedfor inbound.unknownmeans carrier acceptance could not be confirmed and does not prove the text was unsent.failedisn’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
failedafter its window, resend it yourself with a new key.expiredandundeliverablewith no more specific carrier reason: Ready resends the same text about 15 minutes after the send and again 6 hours after that; a drip campaign or automation text can get a third try 24 hours later. The second try comes 6 hours after the first resend, so a campaign or unclassified text, which is not resent once it is 6 hours old, gets one resend and never a second. 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.rejectedorcarrier_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 at the send rate and carrier fee of the original, without the compliance surcharge (a text pays that once), as its own line in your transactions. The message’s
cost_usdstays the first send’s cost. - The resend keeps the same public
message_id; your original id still resolves. Itsstatusgoes fromfailedback toqueued, then todeliveredorfailed. - Webhooks:
message_failed, thenmessage_deliveredormessage_failedfor the resend, under the same publicmessage_id.
error_reasonstring | null- A stable cause to branch on and count by,
nullunlessstatusisfailedorundelivered. When no specific cause was recorded, you get a general reason instead.Possible values
error_reasonMeaning Retry? 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. The one exception: a text withblocked_reasoncontent_review_heldwas held because the content check couldn’t finish (CONTENT_REVIEW_UNAVAILABLE), so send it again shortly.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 does not resend these itself.recipient_network_unknownNew, ported or out-of-service number. No. Ready doesn’t resend it and a resend almost never delivers. Check the number with the contact. 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_provisionedThe recipient’s number is on a network or in a country your numbers can’t text. No. Check the country code; if the number is right, 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 stillfailed6 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. Check the number with the contact first, then resend once with a new key. If it fails again, contact support with the message id. error_detailstring | null- A plain sentence to show a person,
nullwhenerror_reasonis. Its wording can change, so don’t match on it. blockedbooleantruewhen 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. Itserror_reasonisblocked_before_sendandstatusstill readsfailed. Leave these out of your delivery rate: they’re a list problem, not a delivery problem.blocked_reasonstring | null- Which check held a
blockedtext:content_review_held(the content check couldn’t finish; send it again shortly),content_blocked(the content filter blocked the wording; change it before you send again), the codePOST /v1/messagesanswers for the same refusal (for examplenumber_disconnected,sms_invalid,landline_no_sms,opt_out_locked,dnc_list,tcpa_block,quiet_hours; see Errors), orother(any other check; seeerror_detail).nullwhen the text wasn’t blocked. New values may be added, so treat an unknown one asother. fromE.164 string- Sender. On a cold email, or a reply to one,
fromandtoare email addresses, and an outbound email’sstatuscan also besendingorbounced. toE.164 string- Recipient. An email address on a cold email row.
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 inbodyto stop us adding ours. The default opt-out line isReply STOP to opt out. It goes on the first text to each contact and again after 30 days unless the account sets otherwise (periodic_daysinPUT /settings/compliance:-2every text,-1campaigns only,0first text to each contact only, or1to90for the first text and then every that many days). The business name is added as-Nameunless it already starts with Thanks, From or Sent by. These add characters, so they can add a segment. A change to any of them is announced in the changelog. media_urlstring | null- The attached image’s URL, or
null. segmentsinteger- Billed segments, counted on
sent_body. cost_usdnumber or null- What the first send of the text cost, in USD. It does not include the overseas carrier fee, the compliance surcharge or a resend Ready made on its own after a carrier error; each is billed as its own transaction row, so add those rows from Transaction history to reconcile your spend. It is
nullfor a sub-account its agency pays for. 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.nullfor outbound texts and for replies that weren’t sorted.
#Merge fields
Put a token in message and Ready fills it per recipient when the text sends: {{contact.first_name}}, or {{contact.first_name|there}} to use there when the value is blank. Tokens are case-insensitive. Every token below is supported and stays supported.
| Token | Filled from |
|---|---|
{{contact.first_name}}, {{contact.last_name}}, {{contact.name}}, {{contact.full_name}}, {{contact.phone}}, {{contact.email}}, {{contact.company}}, {{contact.company_name}} | The recipient’s contact. Each also works without the contact. prefix. |
{{address}}, {{city}}, {{state}}, {{zip}}, {{postal_code}}, contact.address1, contact.country, contact.date_of_birth, contact.lot_size, contact.source, contact.stage, contact.tags | The recipient’s contact. {{address}} prints address1, else the property address. |
{{property_address}}, {{property_city}}, {{property_state}}, {{property_zip}} | The contact’s property columns (also as contact.property_*). |
{{user.first_name}}, {{user.last_name}}, {{user.name}}, {{user.full_name}}, {{user.email}}, {{user.phone}}, {{user.company}}, {{user.company_name}} | The sending account. |
{{assigned_user.first_name}}, .last_name, .name, .email, .company_name | The team member the contact is assigned to. |
{{location.name}}, {{location.company_name}} | The sending account’s company name (the same value as {{user.company_name}}). |
{{message.from_number}}, {{message.to_number}} | The sending number and the recipient’s number. |
{{now.date}}, {{now.time}}, {{system.today}} | The send time in the recipient’s time zone. |
{{custom.<key>}} | A custom field on the contact, by key. |
A single-brace form also works for {first_name}, {last_name}, {name}, {phone}, {email}, {company} and {rep} (the first name of the team member the contact is assigned to, else the account owner’s). A blank value holds the send until you confirm (see confirm_empty_merge below).
#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.
messageis an alias. Spintax like{Hi|Hello}is not expanded here: it is sent as typed. Leave it out only when you send amedia_url: a picture can go alone.Details
25 segments is about 3,825 plain characters, or about 1,675 with emoji or other Unicode.Before sending, Ready swaps curly quotes, dashes (en, em), ellipses and no-break or other odd spaces for plain ones, and drops zero-width characters, but only when that makes the whole text plain GSM-7 and costs no more segments. A text that keeps an emoji or another Unicode character goes out as typed. The recipient gets, and
segmentsand the charge count, the swapped text;bodyin the response is the text you asked to send. consent_attestedbooleanRequired- Your promise this recipient agreed to texts from you. Refused from January 20, 2027.
Details
From January 20, 2027 (UTC), a send with an API key and without it is refused with403 api_consent_attested_required. Until then it still goes through, and the response carries awarningslist, aWarningheader andDeprecationandSunsetheaders that name the date."true"and1are also accepted.
More parameters
fromE.164 string- One of your numbers, or one of your iMessage lines to send it as iMessage (that answer is the one from Send an iMessage:
data.message_idis Ready’s own integer id, withpublic_message_id(the id the delivery webhooks andGET /v1/messagesuse),conversation_id,channel: "imessage",status: "queued", andtoandfromas you sent them, and none of the other fields below); omit it and Ready picks. Ready can send from a different number of yours than the one you name, and the answer’sfromis the number it used, so key your threads and logs on that, not on what you sent. When the recipient is in another country thanfromand you own a number in their country, Ready sends from that one; if you own none there the send is refused withno_country_sender. An account on a carrier overflow plan may also send past its daily allowance from its overflow numbers.from_phone_number_idisn’t supported here. media_urlstring- A public
httporhttpsURL of an image to attach. No public link for your file? Upload it with Upload a file and pass theurlit returns. Anything else is refused with400 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 sends from your primary number, or from the number closest to the recipient’s area code if local presence is on (local presence is off for accounts opened since November 16, 2026; older accounts have it on). Setting any value,localincluded, 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.localmatch the recipient’s area codeevenspread across your numbers, least used firstdeliverabilityspread across your numbers, taking the least-loaded onerandompick one of your numbers at random
confirm_empty_mergeboolean- Send
trueto send even though a merge field is blank (seeempty_merge_fieldbelow). override_quiet_hoursboolean- Send anyway after a
409 QUIET_HOURS_BLOCKthat 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. hold_until_allowedboolean- Accepted, and changes nothing: every text that quiet hours block is held until the recipient’s window opens, up to 24 hours ahead, whether you send it or not. Past that, you get
409 QUIET_HOURS_BLOCK. A held text gets the202held answer below. Ready checks opt-out and quiet hours again when it sends, and you’re charged only then. Cancel it before then withDELETE /sms/held/:queue_id. conversation_idinteger- File the text in this conversation (from
GET /conversations). Unless you setfrom, Ready prefers the number that conversation uses. An id that isn’t on your account is ignored. quoted_message_idinteger- Message
idin that conversation to quote (inbox only), fromGET /conversations/:id/messages. Ready saves its first 200 characters asquoted_texton the new message. The text the recipient gets is unchanged.
Returns
data.message_idstring- Store it. The
message_idof the Message object. data.conversation_idinteger- The conversation the text was saved in, the same one your inbox shows for this contact.
data.statusstringqueued;deliveredorfailedfollows when the carrier reports back (themessage_deliveredormessage_failedwebhook, orGET /v1/messages/:id).data.fromstring- The number it went from, the one Ready picked when you left
fromout. 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, ornullwhen nothing was added. data.sent_atISO 8601 string- When Ready handed it to the carrier.
sent_at_unixis 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 is0on a free account and on a test key. data.balance_usdnumber | null- Your balance after this send.
carrier_balanceis the same number (legacy; usebalance_usd; it stays, with no end date). Null, withcarrier_balanceandcredits_remaining, for an account whose agency pays for it. data.credits_remaininginteger | null- Legacy; use
balance_usd. It stays, with no end date. Approximate 1-segment texts your balance covers, counted at the rate this text was charged at, carrier fee included.
What the response means
202withdata.status: "held": quiet hours where the recipient is, your sending number is still finishing activation (code: "NUMBER_ACTIVATING_HELD", a couple of minutes), or carrier capacity is busy (code: "CARRIER_BUSY_HELD", a few minutes; still busy after an hour, it fails withcarrier_capacity_busy), so Ready holds the text and sends it atdata.send_at. Don’t send it again.More
The body has"success": true,data.status,data.send_at(ISO 8601) anddata.queue_id, the held text.data.message_idisnull: no message exists until it sends. You’re charged only when it sends. The same body also hasheld: true,code: "QUIET_HOURS_HELD",queued_for(the same time assend_at),recipient_tzand awarningsentence. Readdata.status: the older top-levelstatussaysqueued. When the text can’t be held, you get409 QUIET_HOURS_BLOCKinstead and nothing is sent.202,error_code: "send_outcome_unknown": it may have been delivered and charged. The body also has"success": falseandoutcome: "unknown". A retry with the same key returns this202again; 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,empty_fields, a plain-wordsmessageandpreflight, the check behind it:total,blank_recipients,empty[](token,count,sample_contact_ids),did_you_mean[](token,suggestion,filled_count,checked,filled_text),no_suggestion,no_suggestion_textandsample_render(contact_idandbody, ornull). Thepreflightkeys are for showing a person what is blank; readempty_fieldsto decide in code. Send again with"confirm_empty_merge": trueto send it with the blank.- Rarely,
200with"recorded": false, awarningand nomessage_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
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_request | Missing to or body. |
| 400 | invalid_field | Wrong type (field names it), or to is not a phone number. |
| 400 | invalid_from | Not one of your numbers. |
| 400 | NO_APPROVED_CAMPAIGN | Your registration isn’t approved yet. A new account isn’t refused for this during its first 500 texts (see Sending caps); it applies to accounts that never had the trial. Once you’ve paid for a registration you can send from your new number as soon as it is set up (usually minutes); until then the answer is NUMBER_SETUP_UNCONFIRMED, when Ready can’t confirm the number’s setup. |
| 400 | country_not_supported | The recipient is outside the United States, Canada, Australia and the United Kingdom. Nothing sent, not charged. |
| 400 | no_sender_number | No number can send yet: buy one, or your registration isn’t approved yet. Open setup_url. Also no_country_sender: none of your numbers can text the recipient’s country. |
| 400 | MESSAGE_TOO_LONG | Over 25 segments (1,600 characters with an image). |
| 400 | CONTENT_BLOCKED | Blocked content; a compliance fee may apply. |
| 402 | insufficient_balance | Balance too low. Nothing sent, not charged. Top up in Billing, or turn on Auto top-up (Billing and pricing). When will_resend is true, the text was kept and sends by itself if you top up within 24 hours, under the id GET /v1/messages lists for it now: don’t send it again. Also 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). |
| 402 | CARD_REQUIRED | A trial account with no card or number. Click Buy number on Home (area code and card in one step); open setup_url. |
| 403 | opt_out_locked | Contact opted out. reason is the block code: opt_out_locked, status_opted_out, prior_opt_out, dnd_sms, dialer_dnc (the number is on your ban list) or tcpa_scrub. How the contact opted out is the contact’s opt_out_source, not the reason (see Opt-outs). Also dnc_list (on your Do Not Call list), tcpa_block, global_blocklist, number_not_assigned. |
| 403 | api_consent_attested_required | consent_attested missing, from January 20, 2027. |
| 409 | QUIET_HOURS_BLOCK | Quiet 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. To send it when the window opens, schedule it with POST /sms/schedule, send_at set to next_allowed_at, or send it again then with the same Idempotency-Key: this refusal isn’t stored under it. |
| 409 | RAMP_CAP_REACHED | Your registration is still in carrier review and the account sent the texts allowed until it is approved. Full volume opens on approval; ramp_ends_at is our estimate. |
| 409 | duplicate_send | Same text and number within 60 seconds, no key. |
| 409 | number_activating | Number still activating and the text can’t be held (an image with no words). Wait Retry-After. Any other text is held and answered 202. |
| 422 | INVALID_DESTINATION | The carrier rejected the destination as not a valid number. Nothing sent, not charged. |
| 429 | rate_limited | Over carrier pace. Wait Retry-After, same key. |
| 429 | daily_cap | Daily cap hit; resets midnight Pacific. Also number_daily_cap. No Retry-After. |
| 500 | send_failed | Not sent. Same key, in a minute. hold_not_returned and reservation_unconfirmed need a new key (check your balance first). |
| 500 | INTERNAL_ERROR_OUTCOME_UNKNOWN | Outcome unknown, like a 202 (in code). |
| 503 | provider_busy | Carrier busy. Wait Retry-After, new key. |
| 503 | gate_check_failed | A check couldn’t run; not sent. Also carrier_capacity_busy, contact_unavailable, consent_check_failed, sending_paused, permission_check_unavailable, CONTENT_REVIEW_UNAVAILABLE (the content check couldn’t finish; retry shortly), ADMISSION_SHED, send_dedupe_unavailable (Ready couldn’t check for a repeat send), billing_check_unavailable (the account’s billing status couldn’t be read; retry). |
| 504 | REQUEST_TIMEOUT_OUTCOME_UNKNOWN | Over 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. |
curl -X POST "https://api.tryready.com/v1/messages" \
-H "X-API-Key: $READY_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"to": "+12125550199",
"body": "Your order #1042 has shipped.",
"consent_attested": true
}'
const res = await fetch('https://api.tryready.com/v1/messages', {
method: 'POST',
headers: {
'X-API-Key': process.env.READY_API_KEY,
'Content-Type': 'application/json',
'Idempotency-Key': crypto.randomUUID(),
},
body: JSON.stringify({
"to": "+12125550199",
"body": "Your order #1042 has shipped.",
"consent_attested": true
}),
});
const json = await res.json().catch(() => ({}));
if (!res.ok || json.success === false) {
throw new Error(`${res.status}${json.error_code || json.code ? ' ' + (json.error_code || json.code) : ''}: ${json.error || json.message || res.statusText} (request ${res.headers.get('x-request-id')})`);
}
import os, uuid, requests
key = str(uuid.uuid4()) # make it once; reuse it if you retry
r = requests.post(
"https://api.tryready.com/v1/messages",
headers={"X-API-Key": os.environ["READY_API_KEY"], "Idempotency-Key": key},
json={
"to": "+12125550199",
"body": "Your order #1042 has shipped.",
"consent_attested": True
},
timeout=35, # 5 s past the request deadline
)
data = r.json() if r.headers.get("content-type", "").startswith("application/json") else {}
if not r.ok or data.get("success") is False:
raise RuntimeError(f'{r.status_code} {data.get("error_code") or data.get("code") or ""}: {data.get("error") or data.get("message") or r.reason} (request {r.headers.get("x-request-id")})')
{
"success": true,
"data": {
"message_id": "179088672338905475132359",
"conversation_id": 48213,
"from": "+12125550100",
"to": "+12125550199",
"segments": 1,
"sent_body": "Your order #1042 has shipped. Reply STOP to opt out. -Acme Co",
"compliance_text_added": "Reply STOP to opt out. -Acme Co",
"status": "queued",
"sent_at": "2026-10-01T20:32:03.473Z",
"sent_at_unix": 1790886723,
"credits_remaining": 4833,
"carrier_fee": 0.0045,
"balance_usd": 118.42
}
}
{
"success": false,
"outcome": "unknown",
"error": "We couldn't confirm this text went out. It may have been delivered, so check the conversation before you send it again.",
"error_code": "send_outcome_unknown"
}
{
"success": true,
"data": {
"status": "held",
"message_id": null,
"queue_id": 50213,
"send_at": "2026-10-02T12:00:00.000Z"
},
"held": true,
"status": "queued",
"code": "QUIET_HOURS_HELD",
"recorded": false,
"warning": "It's after 9 PM where this number is, so this text is held and sends at Fri 8:00 AM EDT. You're charged only if it sends.",
"message": "It's after 9 PM where this number is, so this text is held and sends at Fri 8:00 AM EDT. You're charged only if it sends.",
"reason": "after_9pm",
"queued_for": "2026-10-02T12:00:00.000Z",
"recipient_tz": "America/New_York"
}
{
"success": false,
"error": "This contact replied STOP and is opted out. They must reply START from their phone to opt back in.",
"error_code": "opt_out_locked"
}
#Upload a file
Stores a photo, video, PDF, Office doc, CSV, text file or voice message 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. Kept while a text, campaign, template or automation uses it; a file nothing in Ready uses is deleted a year after upload.
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
| HTTP | Code | When |
|---|---|---|
| 400 | NO_FILE | No file in file. |
| 400 | UNSUPPORTED_FILE_TYPE | Ready can’t send this kind of file. |
| 400 | FILE_CONTENT_MISMATCH | The file’s contents don’t match its type. |
| 400 | UPLOAD_FAILED | The upload couldn’t be read. Send the file again. |
| 400 | media_malware | The file failed the malware check. |
| 400 | media_flagged | The file failed the safety check. |
| 403 | attachments_need_registration | Attachments unlock once you have submitted and paid for your business registration (or hold a number on Ready’s shared campaign). |
| 413 | FILE_TOO_LARGE | Over 20 MB. Also FILE_TOO_SCAN_LARGE: over the smaller limit before your registration is approved. |
| 429 | UPLOAD_RATE_LIMITED | Too many uploads in 10 minutes. Wait a few minutes. |
| 503 | media_scan_unavailable | The safety check couldn’t finish. Try again in a minute. Also media_account_read_failed and media_registration_read_failed. |
curl -X POST "https://api.tryready.com/v1/media" \
-H "X-API-Key: $READY_API_KEY" \
-F "file=@photo.jpg"
{
"success": true,
"url": "https://api.tryready.com/media/3f9c2a7e.jpg",
"content_type": "image/jpeg",
"size": 184022
}
#List messages
Your account’s sent and received messages, newest first, including texts your team members sent. Cold emails aren’t listed. Returns a list of Message objects in data, paged with a cursor.
Parameters
directionenum · queryinboundoroutbound.toE.164 string · query- Only messages to this number. A full number matches the usual spellings Ready stores (
+12125550199,12125550199,212-555-0199,(212) 555-0199). A message saved to the number in another spelling, such as212 555 0199or212.555.0199, is not matched. fromE.164 string · query- Only messages from this number. Matches the same spellings as
to. statusstring · queryqueued,delivered,failed,undelivered,unknownorreceived.failedreturns failed and rejected attempts;undeliveredreturns older undelivered or expired ones.More
Any 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 awarningssentence listing the valid words.limitinteger · queryDefault50Max200- Page size.
before_idinteger | string · query- The
next_before_idfrom the previous page. Theidof the last message on the page also works.More
offsetandpagearen’t supported and are ignored, so you get the newest page again. When you send either one (other thanoffset=0orpage=1), the answer carries awarningssentence saying so.
Returns
data[]object[]- Message objects.
has_moreboolean- Keep paging while
true. It’strueon an exactly full page, so the last page can be empty. next_before_idinteger | null- Pass as
before_idfor the next page;nullon an empty page. warningsstring[]- Only present when part of your query was ignored or may not do what you meant, such as
offset,pageor an unknownstatus. 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
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_to | to has no digits. Also invalid_from for from. |
| 400 | invalid_field | A filter was sent twice, like ?status=a&status=b. Send each one once. |
| 400 | invalid_before_id | before_id is a message id that names no message on your account. Pass the next_before_id from the previous page. |
| 429 | rate_limited | Over the per-account limit. |
curl "https://api.tryready.com/v1/messages?direction=outbound&limit=50" \
-H "X-API-Key: $READY_API_KEY"
const res = await fetch('https://api.tryready.com/v1/messages?direction=outbound&limit=50', {
headers: {
'X-API-Key': process.env.READY_API_KEY,
},
signal: AbortSignal.timeout(35 * 1000),
});
const json = await res.json().catch(() => ({}));
if (!res.ok || json.success === false) {
throw new Error(`${res.status}${json.error_code || json.code ? ' ' + (json.error_code || json.code) : ''}: ${json.error || json.message || res.statusText} (request ${res.headers.get('x-request-id')})`);
}
import os, requests
r = requests.get(
"https://api.tryready.com/v1/messages",
headers={"X-API-Key": os.environ["READY_API_KEY"]},
params={
"direction": "outbound",
"limit": 50
},
timeout=35,
)
data = r.json() if r.headers.get("content-type", "").startswith("application/json") else {}
if not r.ok or data.get("success") is False:
raise RuntimeError(f'{r.status_code} {data.get("error_code") or data.get("code") or ""}: {data.get("error") or data.get("message") or r.reason} (request {r.headers.get("x-request-id")})')
{
"success": true,
"data": [
{
"id": "179088672338905475132359",
"direction": "outbound",
"from": "+14155550100",
"to": "+12125550199",
"body": "Your order #1042 has shipped.",
"sent_body": "Your order #1042 has shipped. Reply STOP to opt out. -Acme Co",
"status": "delivered",
"error_reason": null,
"error_detail": null,
"blocked": false,
"segments": 1,
"cost_usd": 0.012,
"media_url": null,
"created_at": "2026-10-01T20:32:03.473Z",
"delivered_at": "2026-10-01T20:32:09.856Z",
"reply_category": null
}
],
"has_more": true,
"next_before_id": 19408828
}
#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
idstringRequired- Send it as a string, exactly as you got it: a public id is often longer than 15 digits, which a number type rounds. The message’s
idfrom GET /v1/messages, themessage_idyou got when you sent it, or themessage_idof aninbound_replywebhook.
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
| HTTP | Code | When |
|---|---|---|
| 400 | INVALID_MESSAGE_ID | The id is longer than 100 characters. |
| 403 | MESSAGE_NOT_ASSIGNED | The 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. |
| 403 | test_key_not_allowed | A test key. Use a live key. |
| 404 | MESSAGE_NOT_FOUND | No message with this id in your account, or it was already deleted. Get a message answers the same case as message_not_found; both spellings are stable, so compare codes without regard to case. |
| 423 | LITIGATION_HOLD | A legal hold is on the account or on this message’s numbers. Nothing was deleted. |
| 503 | message_reference_ambiguous | The id matches more than one message. Nothing was deleted. Contact support. |
| 503 | WALL_READ_FAILED | We couldn’t check who the message belongs to. Nothing was deleted. Try again in a minute. |
| 503 | HOLD_CHECK_UNAVAILABLE | We couldn’t check for a legal hold. Nothing was deleted. Try again in a minute. |
curl -X DELETE "https://api.tryready.com/v1/messages/179088672338905475132359" \
-H "X-API-Key: $READY_API_KEY"
const res = await fetch('https://api.tryready.com/v1/messages/179088672338905475132359', {
method: 'DELETE',
headers: {
'X-API-Key': process.env.READY_API_KEY,
},
signal: AbortSignal.timeout(35 * 1000),
});
const json = await res.json().catch(() => ({}));
if (!res.ok || json.success === false) {
throw new Error(`${res.status}${json.error_code || json.code ? ' ' + (json.error_code || json.code) : ''}: ${json.error || json.message || res.statusText} (request ${res.headers.get('x-request-id')})`);
}
import os, requests
r = requests.delete(
"https://api.tryready.com/v1/messages/179088672338905475132359",
headers={"X-API-Key": os.environ["READY_API_KEY"]},
timeout=35,
)
data = r.json() if r.headers.get("content-type", "").startswith("application/json") else {}
if not r.ok or data.get("success") is False:
raise RuntimeError(f'{r.status_code} {data.get("error_code") or data.get("code") or ""}: {data.get("error") or data.get("message") or r.reason} (request {r.headers.get("x-request-id")})')
{
"success": true,
"data": {
"id": 19408828
}
}
#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
idsstring[]Required- 1 to 5,000 message ids, sent as strings exactly as you got them (a row id as a whole number is also accepted), 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 matched a message in your account (0 when none matched, as on a retry). A retry deletes nothing more and answers
deleted: 0.
Errors
| HTTP | Code | When |
|---|---|---|
| 400 | NO_MESSAGES_SELECTED | ids is empty or missing. |
| 400 | TOO_MANY_MESSAGES | More than 5,000 ids. |
| 400 | INVALID_MESSAGE_IDS | An id isn’t a string or a whole number, or is longer than 100 characters. Nothing was deleted. |
| 403 | MESSAGE_NOT_ASSIGNED | The key’s user can’t open one of these messages. Nothing was deleted. |
| 403 | test_key_not_allowed | A test key. Use a live key. |
| 423 | LITIGATION_HOLD | A legal hold is on the account or on one of these messages’ numbers. Nothing was deleted. |
| 429 | rate_limited | Too many bulk deletes in a short time. Wait and try again. |
| 503 | message_reference_ambiguous | An id matches more than one message. Nothing was deleted. Contact support. |
| 503 | WALL_READ_FAILED | We couldn’t check who the messages belong to. Nothing was deleted. Try again in a minute. |
| 503 | HOLD_CHECK_UNAVAILABLE | We couldn’t check for a legal hold. Nothing was deleted. Try again in a minute. |
curl -X POST "https://api.tryready.com/v1/messages/bulk-delete" \
-H "X-API-Key: $READY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"ids": [
"2034001788124350209",
"2034001788124350211",
19408801
]
}'
const res = await fetch('https://api.tryready.com/v1/messages/bulk-delete', {
method: 'POST',
headers: {
'X-API-Key': process.env.READY_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"ids": [
"2034001788124350209",
"2034001788124350211",
19408801
]
}),
signal: AbortSignal.timeout(35 * 1000),
});
const json = await res.json().catch(() => ({}));
if (!res.ok || json.success === false) {
throw new Error(`${res.status}${json.error_code || json.code ? ' ' + (json.error_code || json.code) : ''}: ${json.error || json.message || res.statusText} (request ${res.headers.get('x-request-id')})`);
}
import os, requests
r = requests.post(
"https://api.tryready.com/v1/messages/bulk-delete",
headers={"X-API-Key": os.environ["READY_API_KEY"]},
json={
"ids": ["2034001788124350209", "2034001788124350211", 19408801]
},
timeout=35,
)
data = r.json() if r.headers.get("content-type", "").startswith("application/json") else {}
if not r.ok or data.get("success") is False:
raise RuntimeError(f'{r.status_code} {data.get("error_code") or data.get("code") or ""}: {data.get("error") or data.get("message") or r.reason} (request {r.headers.get("x-request-id")})')
{
"success": true,
"data": {
"deleted": 3,
"requested": 3
}
}