Delete Sender ID
Delete Method
The Delete Sender ID API allows you to delete the single sender ID or in Bulk.
Note:
The maximum number of sender IDs that could be deleted at an instance is 100.
Prerequisites:
- Sign up for free with kaleyra.io. Before you get started, create a kaleyra.io account for free and Create an API Key. To view the API Key and the SID, see View API Key and SID.
- 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.
Base URL
<https://api.kaleyra.io/v1/><SID>
API request to delete the sender ID
To delete the sender ID, use the /messages/sender
endpoint with the following request method:
Request Format
The following is the request format to delete the sender ID:
curl --location --request DELETE 'https://api.kaleyra.io/v1/<sid>/messages/sender' \
--header 'api-key: <api-key>' \
--header 'content-type: <content_type>' \
--data '{
"sender": [<sender_id1>, <sender_id2>]
}'
Sample Request Format
The following is the sample request format to delete the sender ID:
curl --location --request DELETE 'https://api.kaleyra.io/v1/HXXXXXXX071US/messages/sender' \
--header 'api-key: Axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3' \
--header 'content-type: application/json' \
--data '{
"sender": ["ADPAI", "JSONSEND"]
}'
Parameters and Data Types
Following is the list of parameters and data types supported for deleting the sender ID:
Parameter | Data Type | Description | Example | Mandatory? |
---|---|---|---|---|
sid | String | Account SID (Security Identifier). | HXXXXXXX071US | Yes |
api_key | String | Your API Key generated by Kaleyra.io. | Axxxxxxxxxxxxxxxxxxxxxxxxxxxx3 | Yes |
content_type | String | The format in which the data is sent. | application/json | Yes |
The following table describes the attribute used for the sender ID array.
Parameter | Data Type | Description | Example | mandatory? |
---|---|---|---|---|
sender_id | Array of string | The array of alphanumeric sender IDs of the registered business to be deleted. | ADPAI | Yes |
Sample Success Response to delete the Sender ID
The following success message appears with the status 200 Accepted.
{
"code": "MSG108",
"message": "Sender ID(s) deleted successfully",
"data": [],
"error": {}
}
Sample Failure Response to delete the Sender ID
The following is the failure response to delete the sender ID.
{
"code": "RBC195",
"message": "Sender key is Mandatory in the body. And cannot be empty",
"data": [],
"error": {}
}
Updated 4 months ago