Generate Short URL
Generate Short URL
Postman Collection
URL
POST: /v1/shortener/createHEADERS
Params | Value |
---|---|
Authorization | Basic Auth |
Content-Type | application/json |
Accept | application/json |
Parameters
Param | Data Type | Required |
---|---|---|
url | String | Required |
label | String | Optional |
closedAt | Timestamp | Optional |
Request
Body Sample
{
"label": "F1 Mate Shortener",
"url": "https://f1mate.com/short-url",
"closedAt": "2022-10-25 14:10:00"
}
cURL Sample
curl --location --request POST '/v1/shortener/create' \
--header 'Authorization: Basic ZxbV9mZGI5MDVhZWY1NTc5ODgxMjg0NzEwZTZkMzM5ODMyYmU2YTJkNjg5' \
--header 'Content-Type: application/json' \
--data-raw '{
"label": "F1 Mate Shortener",
"url": "https://f1mate.com/short-url",
"closedAt": "2022-10-25 14:10:00"
}'
Response
success
{
"code": "200",
"status": "success",
"message": "Link created Successfully.",
"data": {
"requestId": "REQ419562769645000",
"url": "https://f1m.in/5raRsBQ"
}
}
failed
{
"code": "404",
"status": "failed",
"error": "Requested URL already created."
}
Missing Params
{
"code": "100",
"status": "missing",
"message": "Parameters error.",
"params": {
"url": [
"The url field is required."
]
}
}