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 OTP/ Verify SMS Campaign Analytics with OAuth 2.0

Prev Next

You can use this API to retrieve aggregated analytics for OTP/Verify SMS messages sent within a specified time range. You can use the response to monitor delivery and verification performance, including successful verifications, failed attempts, and timeout metrics.

This endpoint is available only when the Verify API feature is enabled for your account.

Endpoints and Headers

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

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 sample retrieves OTP/Verify SMS analytics for the specified time range.

curl --location 'https://gw.useinsider.com/api/sms/v2/analytics/verify' \
--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%"
    },
    "verification": {
        "count": {
            "verified": 0,
            "unverified": 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%"
        }
    },
    "unverifiedMessages": {
        "attemptFailures": {
            "count": 0,
            "rate": "0.00%"
        },
        "timeoutFailures": {
            "count": 0,
            "rate": "0.00%"
        }
    }
}

You can refer to OTP/Verify SMS Campaign Analytics Metrics for further details.

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."
    ]
  }
}

403 Forbidden

Returned when the Verify API is not enabled for the account.

{
  "message": "Verify API is not active."
}

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.