Send Flash SMS

POST Method

Description

This API allows you to send Flash SMS that gets displayed on the recipient's phone screen immediately. The Flash SMS does not get stored into the SMS inbox on the device automatically. This type of SMS can be used to deliver sensitive information.

📘

Notes:

  • It is recommended to use /sms endpoints instead of /message endpoints for more efficient API requests and responses.
  • Sending SMS using template is currently supported only in the IN region; in other regions, templates can be used only when sending a campaign through the User Interface

To send Flash SMS, follow the below steps:

  1. Signup or Login to Kaleyra.io and create your API key.

Refer to the Create an API Key page for steps to create your API key. To view the API Key and the SID, see View API Key and SID.

  1. API command to Send Flash SMS

Base URL

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

API Domain and Value

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

Request Format

To send Flash SMS, use the /messages endpoints.

curl -X POST "https://<api_domain>/v1/<SID>/messages" \
     -H "api-key: <API_KEY>" \
     -d "to=<TO_NUMBER>" \
     -d "type=<TYPE>" \     
     -d "sender=<SENDER_ID>" \
     -d "body=<MESSAGE>" \
     -d "flash=1"
📘

Note:

  • Ensure to replace the parameter values with the proper inputs in the above code.
  • You can add multiple recipient in "to" value using comma (,) delimiter.

Parameters and Variables

Below is the list of parameters and variables used:

ParameterVariableDescriptionExampleMandatory
SIDStringAccount SID (Security Identifier)
e.g. HXXXXXXX071US
HXXXXXXX071INTrue
API_KEYStringAPI Key generated by Kaleyra.ioAc4XXXXX21fTrue
TO_NUMBERIntegerRecipient's MSISDN+1XXXXXXXXXX,+1XXXXXXXXXXTrue
TYPEStringType of route

OTP/DEFAULT/MKT/TXN

understand route types

False
SENDER_IDStringOriginator/Alphanumeric IDKLRHXATrue
  1. Response Format

This section provides you the success and failure JSON response format for different scenarios.

Success Response

{
  "id": "648xxx2c-xxxx-xxxx-80c5-3c2xxxb391",
  "sender": "KLRHXA",
  "type": "DEFAULT",
  "flash": 1,
  "body": "Hello Welcome!!",
  "createdDateTime": "2019-11-04 10:42:23+00:00",
  "totalCount": 1,
  "data": [
    {
      "message_id": "648xxx2c-xxxx-xxxx-80c5-3c2xxxb391:1",
      "recipient": "1XXXXXXXXXX"
    }
  ],
  "dlrurl": null,
  "error": {}
}
📘

Note:

In case of an error, ensure that the parameter values are correct in the above code. Refer to the Understand Error Codes page for detailed information.

Sample Request

curl -X POST "https://api.in.kaleyra.io/v1/HXXXXXXX071IN/messages" \
     -H "api-key:Ac4XXXXX21f" \
     -d "to=+1XXXXXXXXXX" \
     -d "type=OTP/DEFAULT/MKT/TXN" \     
     -d "sender=KLRHXA" \
     -d "body=Hello Welcome!!" \
     -d "flash=1"

Did this page help you?



© 2026 Kaleyra Inc. All rights reserved.
Trademarks, logos and service marks displayed on this site are registered and unregistered trademarks of Kaleyra Inc.