readyDocs Open the app

AI message drafts

Ready writes draft texts for you from a short description. You review them and send the one you like.

Endpoints

#Write message drafts

Writes up to 5 draft texts from a short description. Costs 5 × your per-segment rate (no carrier fee). Needs the send_sms permission.

Parameters

Idempotency-Keystring · header
Send one to retry without a second charge: a repeat with the same key returns the first answer. A 4xx isn’t stored, so a corrected retry with the same key goes through.
descriptionstringRequired
What the message should say. Up to 2000 characters. The only field accepted.
Returns
datastring[]
Usually 5 drafts, each a whole text.
credits_remaininginteger | null
Next to data, not inside it. Credits left on your balance after this charge, a whole number: one credit pays for one text segment at your rate. It is not dollars or cents. null when Ready couldn’t read your balance after writing the drafts. The drafts are still good.
Errors
HTTPCodeWhen
200generation_refusedBreaks texting rules. Charged. The body has "success": false and "refused": true.
400description_requireddescription is missing or empty (Describe the message you want us to write.).
400invalid_fielddescription is longer than 2000 characters, or isn’t text.
400unknown_fieldA field other than description.
402insufficient_balanceBalance too low. error is plain text for a person, so match on error_code. When Ready read your balance first, the body also has required_cents (the price) and balance_cents (what you hold); if the charge lost a race to another one they are absent and error is Insufficient balance. Top up in Billing..
402client_card_requiredInstead of insufficient_balance on a sub-account that pays with its own card and has not added one yet. Add one in Billing.
402BILLING_PAST_DUEPayment failed and no balance left, or the account was closed. FRAUD_HOLD during a security review.
500generation_failedNot charged: the price is taken only after the drafts are written. Retry.
curl -X POST "https://api.tryready.com/sms/generate" \
  -H "X-API-Key: $READY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "Remind patients about their cleaning next week and ask them to reply C to confirm"
  }'
Returns:
{
  "success": true,
  "data": [
    "Hi! Your cleaning is next week. Reply C to confirm or call us to reschedule.",
    "…",
    "…",
    "…",
    "…"
  ],
  "credits_remaining": 1234
}