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:

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:

ParameterData TypeDescriptionExampleMandatory?
sidStringAccount SID (Security Identifier).HXXXXXXX071USYes
api_keyStringYour API Key generated by Kaleyra.io.Axxxxxxxxxxxxxxxxxxxxxxxxxxxx3Yes
content_typeStringThe format in which the data is sent.application/jsonYes

The following table describes the attribute used for the sender ID array.

ParameterData TypeDescriptionExamplemandatory?
sender_idArray of stringThe array of alphanumeric sender IDs of the registered business to be deleted.ADPAIYes

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": {}
}