Expand a method to see parameters and responses.
POST
Creating a shortened link
/api/v1/createShortLink
Parameters
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
| token | formData | string | Yes | Your API key |
| link | formData | string | Yes | Please enter the link you want to shorten |
| name | formData | string | No | Please provide a link title |
Responses
200 — Completed successfully
{
"status": "success",
"data": {
"name": "Yandex",
"link": "https:\/\/www.yandex.by\/search\/?clid=2186621&text=a&rdrnd=629580&lr=155&redircnt=1621869494.1",
"short_link": "https:\/\/sms.by?EKrELas",
"updated_at": "2021-05-25 09:08:04",
"created_at": "2021-05-25 09:08:04"
}
}
400 — Incorrect request
421 — Data not verified
500 — Server is not available
GET
Get all newsletters shortened links
/api/v1/getShortLinks
Parameters
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
| token | query | string | Yes | Your API key |
Responses
200 — Completed successfully
{
"status": "success",
"data": [
{
"id": 14,
"name": "Yandex",
"link": "https:\/\/www.yandex.by\/search\/?clid=2186621&text=a&rdrnd=629580&lr=155&redircnt=1621869494.1",
"short_link": "https:\/\/sms.by?EKrELas",
"created_at": "2021-05-25 09:08:04"
}
]
}
406 — Content not found
404 — Page not found
429 — Request limit exceeded
500 — Server is not available
GET
Get shortened link by ID
/api/v1/getShortLink
Parameters
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
| token | query | string | Yes | Your API key |
| id | query | string | Yes | Shortened Link ID |
Responses
200 — Completed successfully
{
"status": "success",
"data": [
{
"id": 14,
"name": "Yandex",
"link": "https:\/\/www.yandex.by\/search\/?clid=2186621&text=asdasd&rdrnd=629580&lr=155&redircnt=1621869494.1",
"short_link": "https:\/\/sms.by?EKrELas",
"created_at": "2021-05-25 09:08:04"
}
]
}
