Get an Individual URL
GET Method
The Get Individual URL API GET request enables you to get a particular URL using its shorter ID.
Request Format
To get the individual URL list, use the url-shortner/ endpoint.
curl --location --request GET '<URL>/v1/<SID>/url-shortner/<ID>' \
--header 'api-key: <API-KEY>'
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). | HXXXXXXX071US | True |
ID | Number | URL shortener ID to get the associated URL shortener URL from the database. | 317 | True |
API-KEY | Alphanumeric | API key generated from Kaleyra.io account. | Axxxxxxxxxxxxxxxxxxxxxxxxxxxx3 | True |
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": "Request successfully executed!",
"data": [{
"link_id": 317,
"title": "URL Test1",
"slug": "about-us",
"long_url": "https://dxxxxd-cxxi.exxxxp.mxxxxxxxx.com",
"advanced": 0,
"link_type": "URL",
"callback": "",
"views": 59,
"last_viewed": "2022-03-03 13:28:33",
"created_at": "2022-03-03 18:53:57+05:30",
"short_url": "https://klr.bz/hfb",
"unique_clicks": 0
}],
"error": {}
}
Sample Failure Response
The following is sample failure responses:
{
"code": "RBC301",
"message": "No Records Found",
"data": [],
"error": {}
}
{
"code": "RBC235",
"message": "Invalid id Property",
"data": [],
"error": {}
}
Sample Request
curl --location --request GET 'https://api.kaleyra.io/v1/HXXXXXXX071US/url-shortner/137' \
--header 'api-key: Axxxxxxxxxxxxxxxxxxxxxxxxxxxx3'
Updated 11 months ago