Delete a Shortened URL
DELETE Method
The Delete URL shortener request enables you to delete the created Shortened URL. Once shortened URL is deleted, you can not use it.
Base URL
https://<api_domain>/v1/<SID>
API Domain and Value
api_domain | Value |
---|---|
IN pod | api.in.kaleyra.io |
SG Pod | api.kaleyra.io |
EU Pod | api.eu.kaleyra.io |
NA pod | api.na.kaleyra.ai |
Request Format
To delete shortened URL, use the url-shortner/ endpoint.
curl --location --request DELETE 'https://<api_domain>/v1/<sid>/url-shortner/<ID>' \
--header 'api-key: <API-KEY>'
--form 'format="<FORMAT>"'
Note:
Ensure to replace the parameter values with the proper inputs in the above code.
Parameters and Variables
Following is the list of parameters and variables used:
Replace | Variable | Description | Example | Mandatory |
---|---|---|---|---|
URL | String | Base URL based on region. | <https://api.kaleyra.io> | True |
SID | String | Account SID (Security Identifier). | HXXXXXXX071IN | True |
ID | Number | URL shortener ID to delete the associated URL shortener URL from the database. | 21 | True |
API-KEY | Alphanumeric | API key generated from Kaleyra.io account. | Axxxxxxxxxxxxxxxxxxxxxxxxxxxx3 | True |
FORMAT | String | Output format must be as specified by this variable. If not passed or kept Empty then it will be JSON by default. Supported values: JSON or XML. | xml | False |
Response Format
This section provides you with the success and failure JSON response format for different scenarios. Refer to the below sections for more information:
Sample Success Response
Sample Failure Response
Sample Success Response
The following is a sample success response:
{
"code": "RBC103",
"message": "Deleted successfully!"
"data": {
"message": "Deleted successfully!"
},
"error": {}
}
Sample Failure Response
The following is sample failure responses:
{
"code": "RBC124",
"message": "Id entered not exits with this api user",
"data": [],
"error": {
"error": "Id entered not exits with this api user"
}
}
{
"code": "RBC124",
"message": "Unable to delete the record.Record not found",
"data": [],
"error": {
"error": "Unable to delete the record.Record not found"
}
}
Sample Request
curl --location --request DELETE 'https://api.in.kaleyra.io/v1/HXXXXXXX071IN/url-shortner/<id>' \
--header 'api-key: Axxxxxxxxxxxxxxxxxxxxxxxxxxxx3'
--form 'format="xml"'
Updated 21 days ago
What’s Next