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.

5bc86b6e85c7209830f96936
      

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.

"id": "5bc86b6e85c7209830f96936"
      
sender String The sender ID used in the messages.

"sender": "46101606060"
      
body String The original body, i.e. the message text, which is sent, before templates have been applied, according to the original request.

"body": "A very nice message"

owner String The account number of the SMS account that owns the batch

"owner": "ip1-xxxxx"
      
direction String Tells you if the message sent or received by our system
  • MT An acronym for Mobile Terminated, a message that was sent to a mobile device.
  • MO An acronym for Mobile Originated, a message that was sent from a mobile device.

 "direction": "MT"
      
type String Describes the type of message.
  • sms is a standard SMS.
  • flash is a message that appears once on the device and then deleted.

"type": "sms"
      
datacoding String Tells you which character set is used for the batch.
  • gsm: 7-bit character set (160 characters/SMS), limited number of characters.
  • ucs: 2-byte character set (70 characters/SMS), allows all characters (e.g. emoji).

"datacoding": "GSM"
      
.
priority Integer Describes the priority used for the batch.

"priority": 1
      
templated boolean Indicates if the batch body (message text) contains templating.
          
"templated": true
          
        
priceSummary array Gives a summary of the cost of the batch and the currency that debited the account.
          
"priceSummary": {
    "total": 0.125,
    "currency": "EUR",
    "average": 0.0416
}
          
        
messageSummary array Gives a summary of the number of messages in the batch divided into status groups.
          
"messageSummary": {
    "101": {
      "messages": 43,
      "sms": 86
    },
    "102": {
      "messages": 3,
      "sms": 6
    },
    "201": {
      "messages": 142,
      "sms": 284
    }
}
          
        
deliveryWindows Array Displays the batch time window

"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 Integer Current status of the batch. Derived from the direction and latest status of the batch's messages. Available statuses are as follows:
Name Status code Comment
Planned 101 The batch is scheduled to be sent in the future.
Ongoing 111 The batch is being processed and sent out
Sent 112 The batch has been sent out
Incoming 201 The batch contains incoming messages
Canceled 203 The batch has been canceled and will not be sent

"status": 112
      
deliveryReportUrl String Displays any callback url for receiving delivery reports to external software.

"deliveryReportUrl": "https://ip1.net"
      
reference String Displays the batch reference if available.

"reference": "custom-id-123"
      
tags string Displays any tags in the batch.

"tags: ["marketing", "auth", "admin"],