Skip to main content

Send Jobs SMS

This API allows you to send messages to recipients based on job categories. You can specify the main and sub job categories, as well as the operators of the recipients.

📍 Endpoint

POST {base_url}/api/send

🧾 Headers

KeyValue
AuthorizationYOUR_TOKEN_HERE
Content-Typeapplication/json

📤 Request Body

{
"sending_type": "job",
"from_number": "+98PRO",
"message": "متن پیام",
"params": [
{
"main_category_id": 1,
"sub_category_id": 1,
"operator": [
{
"start": 0,
"size": 3373,
"id": 2
},
{
"start": 1,
"size": 2,
"id": 13
}
]
},
{
"main_category_id": 1,
"sub_category_id": 2,
"operator": [
{
"start": 0,
"size": 1452,
"id": 2
},
{
"start": 1,
"size": 500,
"id": 13
}
]
}
]
}

📝 Parameters

ParameterTypeRequiredDescription
sending_typestringYesType of sending, must be "job" for this endpoint
from_numberstringYesSender's phone number in E.164 format (e.g., +98BANK)
messagestringYesMessage content to be sent to the recipients
paramsarrayYesArray of objects containing parameters for sending
params.main_category_idintegerYesID of the main job category
params.sub_category_idintegerNOID of the sub job category
params.operatorarrayNOArray of operator of recipients
params.operator.startintegerNOStarting index for the operator
params.operator.sizeintegerNONumber of recipients to send to for the operator
params.operator.idintegerNOID of the operator (1 for MCI, 2 for Irancell, 13 for Others)

📝 Notes

  • The from_number must be a valid sender number assigned to your account.
  • The operator.id should correspond to valid operator IDs in the system. endpoint.

✅ Success Response

{
"data": {
"message_outbox_ids": [
1123594208
]
},
"meta": {
"status": true,
"message": "انجام شد",
"message_parameters": [],
"message_code": "200-1"
}
}

❌ Error Response — Invalid or Expired Token (401)

{
"data": null,
"meta": {
"status": false,
"message": "اطلاعات وارد شده صحیح نمی باشد",
"message_parameters": [],
"message_code": "400-1",
"errors": {}
}
}

❌ Error Response — Invalid Request (422)

{
"data": null,
"meta": {
"status": false,
"message": "تکمیل گزینه پیام الزامی است",
"message_parameters": [],
"message_code": "400-2",
"errors": {
"message": [
"تکمیل گزینه پیام الزامی است"
]
}
}
}

🧪 Example Request

curl --location '{base_url}/api/send' \
--header 'Content-Type: application/json' \
--header 'Authorization: API TOKEN' \
--data '{
"sending_type": "job",
"from_number": "+98PRO",
"message": "متن پیام",
"params": [
{
"main_category_id": 1,
"sub_category_id": 1,
"operator": [
{
"start": 0,
"size": 3373,
"id": 2
},
{
"start": 1,
"size": 2,
"id": 13
}
]
},
{
"main_category_id": 1,
"sub_category_id": 2,
"operator": [
{
"start": 0,
"size": 1452,
"id": 2
},
{
"start": 1,
"size": 500,
"id": 13
}
]
}
]
}`