Auto
EN
GET/api/v2/messages/bulk/{jobId}/items

Bulk job rows

A page of 50 rows for the owning account. cursor is the zero-based row index. nextCursor is null on the last page. Message text and template variables are included. File bytes are not. An unknown status returns an empty page.

When to use it. Show recipient, channel, sender, template, text, and error code row by row.

Code example

Correct: Correct: failed rows

curl --request GET 'https://raselsms.com/api/v2/messages/bulk/64b0c0ff0000000000000001/items?status=failed&cursor=0' \--header 'X-API-Key: YOUR_API_KEY'

Response example

200 — Correct: failed rows

{  "success": true,  "items": [    {      "index": 0,      "status": "failed",      "to": "+963912345678",      "channel": "local_sms",      "senderId": "",      "templateName": "",      "text": "Example notice from Rasel.",      "variables": null,      "errorCode": "SEND_FAILED",      "errorMessage": "Send failed",      "requestId": null    }  ],  "nextCursor": null}

HTTP request

GET /api/v2/messages/bulk/{jobId}/items

Request Headers

HeaderTypeDescription
X-API-KeystringYour Rasel API key. Send it on every documented request except inbound webhooks. *

Path parameters

FieldTypeDescription
jobIdstringJob id from the create response. The job is visible only to that key's account. *

Query parameters

FieldTypeDescription
statusreceived | pending | sending | sent | failed | cancelledDelivery or record status. On send: sent, queued, or scheduled. On other resources it is the row status filter or value.
cursorintegerOpaque pagination cursor from the previous response.

Response Fields

FieldTypeDescriptionExample
successenumTrue when the operation succeeded, or when at least one batch recipient succeeded. *
itemsjsonA page of rows. Each item is one recipient with its state and, on the items route, its text. *
nextCursorintegerCursor for the next page. null means this is the last page. Send it back unchanged. *

Status Codes

StatusDescription
200Success.
401Missing or invalid API key.
403Phone not verified, missing permission, or the account cannot perform this action.
404Resource not found for this API key owner.
429Rate limit exceeded, or the maximum number of verification attempts was reached.

Cases to handle

  • Message text is shown to the owning account through this route. Do not log the text when it contains a secret code.

Try it

Parameters

Job id from the create response. The job is visible only to that key's account.

Delivery or record status. On send: sent, queued, or scheduled. On other resources it is the row status filter or value.

Opaque pagination cursor from the previous response.

Request

GET /api/v2/messages/bulk//items?status=received

Response

Example response

{  "success": true,  "items": [    {      "index": 0,      "status": "failed",      "to": "+963912345678",      "channel": "local_sms",      "senderId": "",      "templateName": "",      "text": "Example notice from Rasel.",      "variables": null,      "errorCode": "SEND_FAILED",      "errorMessage": "Send failed",      "requestId": null    }  ],  "nextCursor": null}