Skip to main content
POST
/
v1
/
sms
Send SMS
curl --request POST \
  --url https://api.nixflex.com/v1/sms

Documentation Index

Fetch the complete documentation index at: https://docs.nixflex.com/llms.txt

Use this file to discover all available pages before exploring further.

Sends a single SMS via your Twilio number. Useful for one-off messages, status updates, or reminders that don’t need a phone call.

Request

curl -X POST https://api.nixflex.com/v1/sms \
  -H "Authorization: Bearer KEY_ID:KEY_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "agent_125207e452f8714a",
    "to_number": "+447386172392",
    "from_number": "+447446466847",
    "body": "Reminder: your appointment is tomorrow at 2pm. Reply YES to confirm."
  }'

Body parameters

FieldTypeRequiredNotes
agent_idstringYesAgent that this SMS is associated with
to_numberstringYesRecipient in E.164
from_numberstringYesYour imported Twilio number
bodystringYesMessage text (max 1600 chars; longer is split)
context_promptstringNoCustom instruction for the agent if recipient replies
metadataobjectNoEchoed in delivery webhook

Response

201 Created:
{
  "message_id": "SM1234567890",
  "status": "queued",
  "to_number": "+447386172392",
  "from_number": "+447446466847",
  "created_at": "2026-05-17T03:45:12Z"
}
Status updates come asynchronously via Twilio’s status callbacks. Final status (delivered, failed) reflects in the message record within ~30 seconds.

Reply behaviour

If the recipient replies within 24 hours, the agent automatically responds. See Send SMS concept page for details on reply windows and context.

Errors

CodeCause
from_number_not_ownedfrom_number not in your account
message_too_longBody over 1600 chars
sms_not_supported_in_regionUS number without A2P 10DLC
recipient_unsubscribedRecipient previously sent STOP