Documentation Index

Fetch the complete documentation index at: https://academy.insiderone.com/llms.txt

Use this file to discover all available pages before exploring further.

Get Transactional SMS Campaign Analytics with OAuth 2.0

Prev Next

You can use this API to retrieve aggregated analytics for transactional SMS messages sent within a specified time range. You can use the response to monitor delivery performance, click-through rates, and message status metrics for your transactional SMS traffic.

Endpoints and Headers

POST https://gw.useinsider.com/api/sms/v2/analytics/transactional

Visit our Postman collection to test this request.

Headers

Header

Sample Value

Description

Authorization

Bearer

The Bearer access token obtained from the OAuth token endpoint. Required for all authenticated API requests. Refer to Generate an OAuth 2.0 Token for SMS to generate your OAuth 2.0 token.

Content-Type

application/json

Specifies that the request body is sent in JSON format.

Body Parameters

Parameter

Description

Data Type

Required

startTime

Unix timestamp in seconds (10 digits). It must be within the last 1 year.

Integer

Yes

endTime

Unix timestamp in seconds (10 digits).

Integer

Yes

Sample Request

The following example retrieves transactional SMS analytics for the specified time range.

curl --location 'https://gw.useinsider.com/api/sms/v2/analytics/transactional' \
--header 'Authorization: Bearer eyJhbGc...' \
--header 'Content-Type: application/json' \
--data '{
  "startTime": 1747094400,
  "endTime": 1747180800,
}'

Sample Responses

200 OK

This status indicates that the request has been completed successfully.

{
    "messageParts": 0,
    "sent": 0,
    "dropped": 0,
    "delivery": {
        "count": {
            "delivered": 0,
            "undelivered": 0
        },
        "rate": "0.00%"
    },
    "clickThrough": {
        "clicks": 0,
        "rate": "0.00%"
    },
    "droppedMessages": {
        "internalErrors": {
            "count": 0,
            "rate": "0.00%"
        },
        "countryCodeDrops": {
            "count": 0,
            "rate": "0.00%"
        },
        "invalidPhoneNumbers": {
            "count": 0,
            "rate": "0.00%"
        }
    },
    "undeliveredMessages": {
        "carrierViolations": {
            "count": 0,
            "rate": "0.00%",
            "details": {}
        },
        "hardBounces": {
            "count": 0,
            "rate": "0.00%",
            "details": {}
        },
        "softBounces": {
            "count": 0,
            "rate": "0.00%",
            "details": {}
        },
        "deliveryFailures": {
            "count": 0,
            "rate": "0.00%",
            "details": {}
        },
        "deliveryReportMissing": {
            "count": 0,
            "rate": "0.00%"
        }
    }
}

422 Unprocessable Entity

Returned when one or more request parameters fail validation.

{
  "message": "The given data was invalid.",
  "errors": {
    "startTime": [
      "The startTime parameter must be a valid integer."
    ],
    "endTime": [
      "The endTime parameter must be earlier than the current time."
    ]
  }
}

Common validation messages:

Trigger

Validation Message

Missing startTime or endTime

The startTime parameter is required.

startTime is not a 10-digit integer

The startTime parameter must be exactly 10 digits.

endTime is in the future

The endTime parameter must be earlier than the current time.

startTime is older than 1 year

The startTime parameter must be within the last 1 year.

startTime is later than endTime

The startTime parameter must be earlier than the endTime parameter.

campaignId does not belong to an SMS campaign

The campaign ID must be a valid SMS campaign.

perPage is greater than 100

The perPage parameter must be at most 100.