Capability Check API
POST Method
Kaleyra.io offers an API that enables you to check the capabilities of a number to receive SMS over IP, before actually triggering the message through the Send SMS Over IP (SOIP). This API accepts raw data in JSON format.
Base URL
<https://api.kaleyra.io/v1/><SID>
To check the capability of a number, perform the following steps:
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.
Note:
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.
API request to check the capability of a number to receive SMS Over IP
To check the capability of a number, use the messages/soip/capability-check
endpoint with the following request method:
Request Format
curl --location --request POST '<url>/v1/<sid>/messages/soip/capability-check' \
--header 'api-key: <api-key>' \
--header 'Content-Type: <content-type>' \
--data-raw '
{
"number": "<number>",
"callback_profile_id": "<callback-profile-id>"
}
The following table displays the parameter used for Capability Check API:
Parameter | Data Type | Description |
---|---|---|
sid | String | Account SID (Security Identifier). |
content-type | String | The format in which the data is sent. |
api-key | String | API key generated from Kaleyra.io account. |
number | String or Array | It contains a single Number, Numbers Separated by “,“ comma OR It can have a list of numbers in an Array. Example 1: “9188XXXXXXXX“ Example 2: “9188XXXXXXXX, 9188XXXXXXXX“ Example 3: [“9188XXXXXXXX”, “9188XXXXXXXX“] |
callback_profile_id | String | A unique callback profile ID is set for each account for callback purposes. For more information, see Set up Callback Profile ID |
Sample Success Response
The following success message appears with status 202 Accepted:
{
"code": "MSG402",
"message": "Request Successfully Processed",
"data": [],
"error": {}
}
Sample Failure Response
The following failure message appears:
{
"code": "RBC529",
"message": "Invalid input or validation error!",
"data": [],
"error": {
"error": "Invalid input or validation error!"
}
}
Sample Request
The following is the sample request:
curl --location --request POST 'https://api.kaleyra.io/v1/HXXXXXXX071US/messages/soip/capability-check' \
--header 'api-key: Axxxxxxxxxxxxxxxxxxxxxxxxxxxx3' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-raw '
{
"number": "9188XXXXXXXX",
"callback_profile_id": "\https://webhook.site/8bxxxx68-2xx3-4xxe-bxxb-16xxxxxxxx4a"
}
Updated 11 months ago