Quickstart

From no key to a delivered text in about ten minutes. Every example below comes in curl, Python, Node.js and PHP. Pick a language once and every example on the page switches.

1. Create a key

The API is included on Team Plus and up. A head coach or team director opens the dashboard, goes to Settings → Developers, and clicks Create key. The key starts with rt_live_ and is shown once, so copy it somewhere safe. It acts on behalf of the person who created it.

Keep the key out of your code. The Python, Node.js and PHP examples read it from an environment variable:

export RALLYTEXT_API_KEY="rt_live_your_key_here"

2. Check the key

GET /api/v1/team returns your team's name, number, plan and credits. Every request sends the key as Authorization: Bearer. A 401 invalid_key means the key is wrong or revoked. A 403 plan_required means the team is below Team Plus.

curl https://rallytext.app/api/v1/team \
  -H "Authorization: Bearer rt_live_your_key_here"

3. Add a member

Numbers can be in any common US format, and RallyText stores them encrypted. If the number is already on your roster you get 409 member_exists with existing_member_id. If it texted STOP you get 409 opted_out, and only the member can opt back in, by texting START. Changes need a card on file (403 card_required).

curl -X POST https://rallytext.app/api/v1/members \
  -H "Authorization: Bearer rt_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"name": "Jordan Lee", "phone": "(906) 555-1234", "role": "athlete"}'

4. Send a text

audience is all, staff, families or group (with group_id). API sends are always broadcasts to one of those audiences. You can't text one person through the API. RallyText adds your team prefix and the opt-out line, and never texts anyone who opted out. If your team requires approval for this send, the response says pending_approval and the text waits in the dashboard's Approvals queue.

Two things only work from the dashboard: urgent alerts, and merge tags such as {first_name}. A send with merge tags returns 400 merge_tags_unsupported.

curl -X POST https://rallytext.app/api/v1/messages \
  -H "Authorization: Bearer rt_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"text": "Practice moved to 5pm today.", "audience": "all"}'

5. See who got it

Use the id from a queued send. (A send waiting for approval has no message id yet, so id is null.) Delivery counts update as carriers report back. The delivery report lists each recipient with a masked number, such as ***1234, and the matching member ids.

curl https://rallytext.app/api/v1/messages/MESSAGE_ID \
  -H "Authorization: Bearer rt_live_your_key_here"

curl "https://rallytext.app/api/v1/messages/MESSAGE_ID/deliveries?limit=200" \
  -H "Authorization: Bearer rt_live_your_key_here"

Next