SMS Status API

GET Method

kaleyra.io enables you to get the current message status using this API. The following are the SMS delivery statuses:

  • Delivered
  • UnDelivered
  • NotSent
  • Sent

Prerequisites

  • Before sending the SMS, you must configure the SMS channel in kaleyra.io.
  • After you sign up, your account will be on the trial version. You must complete the KYC to access all the features in kaleyra.io.
  • Before you get started, Create an API Key. To view the API Key and the SID, see View API Key and SID.

Base URL

https://<api_domain>/v1/<SID>

API Domain and Value

api_domainValue
IN podapi.in.kaleyra.io
SG Podapi.ap.kaleyra.io
EU Podapi.eu.kaleyra.io

API request to get SMS Status

To get the SMS status use the <api_domain>/v1/<sid>/sms endpoint with the following request method:

Request Format

The following is the request format to get the status of the SMS:

curl -X GET "https://<api_domain>/v1/<sid>/sms/status?message_ids=<message_ids>" \
     -H "api-key:<api-key>"\
     -H "Content-Type:<content-type>" 

Sample Request Format

The following is the sample request format to get the SMS status:

curl -X GET "https://api.in.kaleyra.io/v1/HXAP16XXXXXX97IN/sms/status?message_ids=ee8aXXXX-XXXX-XXXX-XXXX-9b717XXXX30d:1" \
     -H "api-key:Axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3"\
     -H "Content-Type:application/json" 

URL Parameters and Headers

Following is the list of parameters and headers to send the outgoing message request:

Parameter / HeadersData TypeDescriptionExampleMandatory?
sidStringAccount SID (Security Identifier).HXAP16XXXXXX97INYes
api-keyStringAPI key generated from kaleyra.io account.Axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3Yes
content-typeStringIndicates the format of the content the API will be processing.The only allowed value is application/json.Yes
message_idsStringMessage ID that was generated by kaleyra.io from the sent SMS API.ee8aXXXX-XXXX-XXXX-XXXX-9b717XXXX30d:1Yes

Success Response

The following success response is received when the JSON script has the correct syntax:

{
   "data": [
       {
           "campaign_id": "507XXXX-XXX-XXXX-XXXX-b8f6b452c04a:1",
           "status": "Delivered",
           "status_details": "DELIVERED"
       }
   ],
   "error": {}
}

Failure Response

The following failure response is received when the JSON script has an incorrect syntax:

{
    "code": "RBC634",
    "message": "message_ids or mobile is required!",
    "data": [],
    "error": {}
}

SMS Error Codes, SMS Status and Status Trace Codes

Refer to the following links for Error Codes, Status and Status Trace Codes: