Batches
Quick start
Using the example below, replace “API_NYCKEL” with a bearer token that you create in the user portal.
curl -X GET "https://api.ip1sms.com/v2/batches/" \
-H "Authorization: Bearer API_NYCKEL" \
-H "Content-Type: application/json" \
call
Read collection of batches
Endpoint: /v2/batches
Methodology: GET
Reading a Single Batch
Endpoint: /v2/batches/{batchId}
Methodology: GET
Examples of calls
https://api.ip1sms.com/v2/batches/5bc86b6e85c7209830f96936
Fields for call data
| Field name | Type | Description | Example |
|---|---|---|---|
| batchId | String |
Batch ID. | |
Response
Example of response data
Below you will find an example of a response to a successful request against the batch endpoint. See under the heading Fields for response data for a detailed description of all fields in the response.
{
"id": "5bc86b6e85c7209830f96936",
"sender": "46101606060",
"body": "Hi my name is {name}",
"owner": "ip1-XXXXX",
"direction": "MT",
"type": "flash",
"datacoding": "GSM",
"priority": 1,
"templated": true,
"priceSummary": {
"total": 0.125,
"currency": "EUR",
"average": 0.0416
},
"messageSummary": {
"101": {
"messages": 43,
"sms": 86
},
"102": {
"messages": 3,
"sms": 6
},
"201": {
"messages": 142,
"sms": 284
}
},
"deliveryWindows": [
{
"opens": "2025-11-12T17:00:19Z",
"closes": "2025-11-18T17:00:19Z"
},
{
"opens": "2025-11-20T17:00:19Z",
"closes": "2025-11-26T17:00:19Z"
}
],
"status": 112,
"deliveryReportUrl": "https://api.example.com/sms/deliveryreport",
"reference": "A client reference",
"tags": ["marketing", "auth", "etc"],
}
Fields for response data
| Field name | Type | Description | Example | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | String |
Batch ID. | |
||||||||||||||||||
| sender | String |
The sender ID used in the messages. | |
||||||||||||||||||
| body | String |
The original body, i.e. the message text, which is sent, before templates have been applied, according to the original request. |
|
||||||||||||||||||
| owner | String |
The account number of the SMS account that owns the batch | |
||||||||||||||||||
| direction | String |
Tells you if the message sent or received by our system
|
|
||||||||||||||||||
| type | String |
Describes the type of message.
|
|
||||||||||||||||||
| datacoding | String |
Tells you which character set is used for the batch.
|
.
|
||||||||||||||||||
| priority | Integer |
Describes the priority used for the batch. |
|
||||||||||||||||||
| templated | boolean |
Indicates if the batch body (message text) contains templating. |
|
||||||||||||||||||
| priceSummary | array |
Gives a summary of the cost of the batch and the currency that debited the account. |
|
||||||||||||||||||
| messageSummary | array |
Gives a summary of the number of messages in the batch divided into status groups. |
|
||||||||||||||||||
| deliveryWindows | Array |
Displays the batch time window | |
||||||||||||||||||
| status | Integer | Current status of the batch. Derived from the direction and latest status of the batch's messages. Available statuses are as follows:
|
|
||||||||||||||||||
| deliveryReportUrl | String |
Displays any callback url for receiving delivery reports to external software. |
|
||||||||||||||||||
| reference | String |
Displays the batch reference if available. |
|
||||||||||||||||||
| tags | string |
Displays any tags in the batch. |
|