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

Delete batch or cancel future batch

Methodology: DELETE

Examples of calls

 https://api.ip1sms.com/v2/batches/5bc86b6e85c7209830f96936

Fields for call data

Field nameTypeDescriptionExample
batchIdString 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 nameTypeDescriptionExample
idString Batch ID.

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

"sender": "46101606060"
      
bodyString 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"

ownerStringThe account number of the SMS account that owns the batch

"owner": "ip1-xxxxx"
      
directionString 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"
      
typeString 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"
      
datacodingString 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"
      
.
priorityInteger Describes the priority used for the batch.

"priority": 1
      
templatedbooleanIndicates if the batch body (message text) contains templating.
          
"templated": true
          
        
priceSummaryarrayGives a summary of the cost of the batch and the currency that debited the account.
          
"priceSummary": {
    "total": 0.125,
    "currency": "EUR",
    "average": 0.0416
}
          
        
messageSummaryarrayGives 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
    }
}
          
        
deliveryWindowsArray 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"
        }
],
      
statusIntegerCurrent status of the batch. Derived from the direction and latest status of the batch's messages. Available statuses are as follows:
NameStatus codeComment
Planned101The batch is scheduled to be sent in the future.
Ongoing111The batch is being processed and sent out
Sent112The batch has been sent out
Incoming201The batch contains incoming messages
Canceled203The batch has been canceled and will not be sent

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

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

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

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