To send a text from Excel, write a VBA macro that loops over your rows and posts each one to https://api.tryready.com/v1/messages with the MSXML2.ServerXMLHTTP.6.0 object, putting your API key in an X-API-Key header. No add-in is needed. Excel for Windows already includes the HTTP library.

We make Ready, so the macro uses our REST API and only the request shape we document. A spreadsheet has one hazard a server script doesn't: people click the button twice. So the design below gives every row its own idempotency key, stored in the sheet, and writes the result back to the row. A second click can't text anyone twice.

One honest limit first. MSXML2 is a Windows component, so this macro won't run in Excel for Mac. Mac users are better served by a Google Sheets script.

What you need before the first request

  • An API key. Ready authenticates with an X-API-Key header. Don't type the key into a cell or the macro. Set a Windows user environment variable named READY_API_KEY and read it with Environ. The workbook then stays safe to email.
  • A card and a number. A card on file and a number of your own are required to send. The number is $2 a month. To try the macro first, create a test key (Settings, Developers, Environment: Test). It simulates every send with no card, number or charge.
  • Consent. Each request carries consent_attested: true, your statement that the recipient agreed to receive texts. The macro below sends only rows where a Consent column says Yes, so the statement stays true.
  • Registration. An account can send up to 500 texts a month until its 10DLC registration is approved, and most approvals take 2 to 7 days. See the 10DLC explainer.

Each segment costs $0.0075 plus a $0.0045 carrier fee. Screening is extra when switched on.

The sheet layout

Put headers in row 1 and one contact per row:

ColumnHeaderHolds
APhoneE.164 number, such as +12125550199
BMessageThe text to send
CConsentYes, only if the person agreed to texts
DKeyThe idempotency key, filled in by the macro
EStatusThe HTTP status or an error, filled in by the macro

A 10-digit US number is treated as +1, but E.164 keeps the sheet unambiguous. If Excel strips the plus sign, format column A as Text.

The macro

Private Function NewKey() As String
    NewKey = LCase(Mid(CreateObject("Scriptlet.TypeLib").GUID, 2, 36))
End Function

Private Function JsonEscape(ByVal s As String) As String
    s = Replace(s, "\", "\\")
    s = Replace(s, """", "\""")
    s = Replace(s, vbCrLf, "\n")
    s = Replace(s, vbLf, "\n")
    s = Replace(s, vbCr, "\n")
    s = Replace(s, vbTab, "\t")
    JsonEscape = s
End Function

Private Function PostText(ByVal phone As String, ByVal msg As String, _
                          ByVal key As String) As String
    Dim http As Object, payload As String
    payload = "{""to"":""" & JsonEscape(phone) & """," & _
              """body"":""" & JsonEscape(msg) & """," & _
              """consent_attested"":true}"
    Set http = CreateObject("MSXML2.ServerXMLHTTP.6.0")
    http.setTimeouts 5000, 5000, 10000, 20000  ' resolve, connect, send, receive (ms)
    http.Open "POST", "https://api.tryready.com/v1/messages", False
    http.setRequestHeader "X-API-Key", Environ("READY_API_KEY")
    http.setRequestHeader "Content-Type", "application/json"
    http.setRequestHeader "Idempotency-Key", key
    http.send payload
    PostText = http.Status & " " & Left(http.responseText, 200)
End Function

Public Sub SendTexts()
    Dim ws As Worksheet, r As Long, lastRow As Long
    Set ws = ActiveSheet
    lastRow = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row
    For r = 2 To lastRow
        If LCase(Trim(ws.Cells(r, "C").Value)) = "yes" _
           And Left(ws.Cells(r, "E").Value, 1) <> "2" Then
            If ws.Cells(r, "D").Value = "" Then ws.Cells(r, "D").Value = NewKey()
            On Error Resume Next
            ws.Cells(r, "E").Value = PostText(ws.Cells(r, "A").Value, _
                ws.Cells(r, "B").Value, ws.Cells(r, "D").Value)
            If Err.Number <> 0 Then ws.Cells(r, "E").Value = "error: " & Err.Description
            On Error GoTo 0
        End If
    Next r
End Sub

Why the key lives in the sheet

The Idempotency-Key header is how Ready knows a repeated request is the same message. The macro writes the key into column D the first time it touches a row, then reuses it on every later attempt. If Excel freezes mid-run, or someone presses the button again, a row that already went out is skipped by the status check, and a row that timed out is retried with the same key. A retried request with the same key doesn't send twice.

If you'd rather make the key predictable, our post on deterministic idempotency keys explains the tradeoffs.

Reading the result

The macro stores the status and the first 200 characters of the response in column E. A cell starting with 2 means the request was accepted. Anything else is a row to look at, and the macro will retry it on the next run with the same key. A 503 or a 500 hold_not_returned replays the same error under that key, so clear that row's Key cell (column D) before you run again; after a 504 or a code ending in OUTCOME_UNKNOWN, check GET /v1/messages first. The exact fields and error bodies are in the messages API reference and the error codes page.

One status you may meet is 409 with QUIET_HOURS_BLOCK. An API text to someone in quiet hours is held only if the window opens soon. Otherwise it isn't sent, and you run the macro again once the window opens. The row stays eligible because its status doesn't start with 2.

Limits to know about

  • MSXML2.ServerXMLHTTP.6.0 with False as the third argument blocks Excel until the reply arrives or the setTimeouts limits pass, so a slow API can't freeze Excel for good. For a few dozen rows that's fine. For thousands, run the macro in small batches, or use the bulk endpoint from a script.
  • A spreadsheet isn't a consent record. Keep the proof of opt-in wherever you collected it.
  • Anyone who can open the VBA project and your Windows profile can read the key. Share the workbook, not the machine.

Next step

Make a sheet with three rows using made-up numbers like +12125550199, run the macro with a test key, and confirm column E fills with a 2xx status. Then switch to a live key. For other script-style senders, see sending from Google Apps Script or the quickstart.

Accounts opened before November 12, 2026 keep their signup prices, shown under Billing.