One call to send. One webhook to hear back.

A small, plain API over HTTPS and JSON, with a contract you can generate a client from.

# Send "Is this test working?", with Yes and No, to your own phone. Keep the message_id it prints.
curl -s "${API_URL:-https://api.greenmessage.app}/v1/messages" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d @- <<EOF
{ "recipients": [{ "to": "$TO" }], "body": "Is this test working?", "response": "confirm" }
EOF

# 202 Accepted
{ "results": [{ "to": "+447400123456", "status": "accepted",
    "message_id": "msg_01JCA7Q2KB…" }] }

TO is the number of the phone where you installed GreenMessage, and API_KEY a key you make in the console. Your first message, step by step

Start here

Your first message, in five minutes.

Once we have approved your business, test it with your own phone: the question arrives in GreenMessage there, you tap an answer, and your code prints it.

  1. Get the app on your phone, from the App Store or Google Play, and sign in with your mobile number.
  2. Add that phone as a test number in the console, and tap Allow when the app asks. Then make a test key: it reaches only your test numbers, so you cannot message a customer by accident.
  3. Set three values where you run the examples, so that none of them holds your key: API_KEY, the key; TO, the number of your phone; API_URL, https://api.greenmessage.app.
  4. Send a question to your phone with an example below, and tap Yes on the phone. The example prints each state as the message moves, then Answered: yes.
  5. Hear answers as they happen at a webhook of your own. Each example checks the signature on every delivery, and refuses one that does not hold.
curlNodePythonPHPC#JavaGo

Send it, and keep the message_id it prints curl/send.sh

# Send "Is this test working?", with Yes and No, to your own phone. Keep the message_id it prints.
curl -s "${API_URL:-https://api.greenmessage.app}/v1/messages" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d @- <<EOF
{ "recipients": [{ "to": "$TO" }], "body": "Is this test working?", "response": "confirm" }
EOF

Check it: its state, and your answer once you have tapped it curl/check.sh

# Check it: its state, and your answer once you have tapped it. MESSAGE_ID is the one the send printed.
curl -s "${API_URL:-https://api.greenmessage.app}/v1/messages/$MESSAGE_ID" \
  -H "Authorization: Bearer $API_KEY"

Not sent? The answer says why. example_number: the number is one kept for films and books, such as 07700 900123, so send to your own. not_a_test_number: a test key reaches only your test numbers.

Built for production

The parts you would otherwise have to build.

Safe to retrySend the same Idempotency-Key again and you get the first answer, not a second message.
Test keysA test key reaches only your own test phones: add one in the console, and allow it in the app. You cannot message a customer by accident.
Signed webhooksEach call signed with your endpoint's own secret, and retried for three days.
Events for 30 daysPoll instead of receiving, or catch up after an outage of your own.
1,000 people a requestWith a reference of your own on each, echoed back everywhere.
A written contractOpenAPI, versioned in the address. Within a version, we only add.