Send an SMS or MMS
POST/api/v1/domains/:domain_uuid/messages
Send a text message or attachments from an enabled number in Message Settings. Requires access to the account and the messages_send permission. A 200 response means FS PBX accepted your request; it does not confirm delivery. Save data.id to match the message with delivery callbacks and message logs. API messages appear in Status > Logs > Messages, but not in member conversations.
Both from and to must use E.164 format: + followed by the country code and phone number, such as +12025550100, without spaces or punctuation. National numbers are not accepted. The account's country setting is not used. Phone numbers in responses and delivery callbacks use E.164.
To receive delivery updates, select an account or custom webhook for the sending number in Message Settings. Verify callbacks using the Signing secret in Account Settings > Messaging. Without a webhook, check results in message logs.
Idempotency-Key is optional. Reuse it with the same request, account, API user, and endpoint for up to 24 hours to retry without creating another message. Different message details with the same key return 409. Use a new key for each new message. A repeated response shows the original acceptance, not current delivery status. On a 503 response, retry with the same key and body. Validation errors return 400 with an error object identifying the invalid field.
Request
Responses
- 200
- 400
- 401
- 403
- 409
- 503