Home › Send SMS
Send Simple SMS — FarazSMS SMS web service
POST https://api.iranpayamak.com/ws/v1/sms/simple
Purpose: Write your own text and send it to one or many numbers — the simplest way to start and to smoke-test your integration. Good for announcements and bulk marketing. Messages pass human moderation first, so delivery can take minutes; for verification codes and anything that must arrive in under 5 seconds, use Pattern send.
Send one text to many recipients. Provide `recipients` (an array of numbers) and/or `selectedPhoneBooks`; at least one of the two is required. This endpoint is queued and moderated — use /ws/v1/sms/pattern for OTP.
Authentication
This endpoint requires the Api-Key header — get the key from the FarazSMS panel. The header name is case-sensitive and the key must never travel in a query string.
Request fields
text(string) — requiredline_number(string) — requiredrecipients(array) — optionalnumber_format(string) — requiredschedule(string) — optional — Optional. Omit it or send null to send immediately. A future "YYYY-MM-DD HH:MM:SS" schedules the send — the message is accepted and its cost is reserved at submit time, and it is delivered at that moment, not now. A past date is rejected with a validation error.selectedPhoneBooks(array) — optional
Notes for this endpoint
- 🚦 This or Pattern? This one is for bulk/marketing sends. It is not suitable for OTP, one-time passwords, or urgent alerts.
- ⏱ Simple sends wait for human moderation and can take a few minutes. Pattern is unqueued around the clock (usually under 5 seconds).
- 🧭 Suggested path: smoke-test your key with this endpoint, then turn your recurring texts into panel patterns and send anything time-critical through Pattern.
- Provide recipients (array) or selectedPhoneBooks.
- number_format is english or persian.
- For an immediate send remove schedule or set it to null — never comment it out with // (JSON has no comments).
- A future schedule queues the message: charged now, delivered later. A past date is a validation error.
- Build the JSON body with your language's encoder (e.g. PHP json_encode), not string concatenation — otherwise variables and special characters break it.
Example body
{
"text": "سلام، این یک پیامک آزمایشی است.",
"line_number": "90008361",
"recipients": [
"09120000000"
],
"number_format": "english",
"schedule": null
}
Responses
201— SMS request is enqueued successfully.
Related endpoints in Send SMS
POST /ws/v1/sms/pattern— Send Pattern-Based SMSPOST /ws/v1/sms/keywords— Send SMS with VariablesPOST /ws/v1/lbs— Create New LBS RequestGET /ws/v1/lbs— Get LBS Requests ListPUT /ws/v1/lbs/{lbsId}— Edit LBS RequestGET /ws/v1/lbs/{lbsId}— Show Single LBS Request DetailsPATCH /ws/v1/lbs/{lbsId}/cancel— Cancel LBS RequestPOST /ws/v1/sms/bank— Send to Number Bank