Links

Notes
Expert level
The API key should be sent as a Bearer token in the Authorization header of the request. Получить ключ API.
List

API endpoint:

GET
https://4334.ru/api/v1/links

Request example:

curl --location --request GET 'https://4334.ru/api/v1/links' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Parameter
Type
Описание
search
optional string
Поисковый запрос.
by
optional string
Search by. Possible values are: title for Заголовок, alias for Alias, url for URL. Defaults to: title.
status
optional integer
Filter by status. Possible values are: 0 for Все, 1 for Активный, 2 for Просроченный, 3 for Отключено. Defaults to: 0.
space
optional integer
Filter by space ID.
domain
optional integer
Filter by domain ID.
pixel
optional integer
Filter by pixel ID.
sort
optional string
Сортировать. Possible values are: desc for Нисходящий, asc for Восходящий, max for Best performing, min for Least performing. Defaults to: desc.
per_page
optional int
Ссылок на странице. Possible values are: 10 to 100. Defaults to: 10.
Show

API endpoint:

GET
https://4334.ru/api/v1/links/{id}

Request example:

curl --location --request GET 'https://4334.ru/api/v1/links/{id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Store

API endpoint:

POST
https://4334.ru/api/v1/links

Request example:

curl --location --request POST 'https://4334.ru/api/v1/links' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'url={url}'
Parameter
Type
Описание
url
required string
The link to be shortened.
domain
required integer
The domain ID the link to be saved under.
alias
optional string
The link alias.
password
optional string
The link password.
space
optional integer
The space ID the link to be saved under.
pixels
optional array
The pixel IDs to be integrated in the link.
disabled
optional integer
Whether the link is disabled or not. Possible values are: 0 for Активный, 1 for Отключено. Defaults to: 0.
privacy
optional integer
Whether the link stats are public or not. Possible values are: 0 for Публичный, 1 for Личный, 2 for Пароль. Defaults to: 0.
privacy_password
optional string
The password for the statistics page. Only works with privacy set to 2.
expiration_url
optional string
The link where the user will be redirected once the link has expired.
expiration_date
optional string
The link expiration date in YYYY-MM-DD format.
expiration_time
optional string
The link expiration time in HH:MM format.
expiration_clicks
optional integer
The number of clicks after which the link should expire.
target_type
optional integer
The type of targeting. Possible values are: 0 for None, 1 for География, 2 for Платформа, 4 for Rotation.
country[index][key]
optional string
The code of the targeted country. The code must be in ISO 3166-1 alpha-2 standard.
country[index][value]
optional string
The link where the user will be redirected to.
platform[index][key]
optional string
The name of the targeted platform. Possible values are: iOS, Android, Windows, OS X, Linux, Ubuntu, Chrome OS.
platform[index][value]
optional string
The link where the user will be redirected to.
language[index][key]
optional string
The code of the targeted language. The code must be in ISO 639-1 alpha-2 standard.
language[index][value]
optional string
The link where the user will be redirected to.
rotation[index][value]
optional string
The link where the user will be redirected to.
Update

API endpoint:

PUT PATCH
https://4334.ru/api/v1/links/{id}

Request example:

curl --location --request PUT 'https://4334.ru/api/v1/links/{id}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'url={url}'
Parameter
Type
Описание
url
optional string
The link to be shortened.
alias
optional string
The link alias.
password
optional string
The link password.
space
optional integer
The space ID the link to be saved under.
pixels
optional array
The pixel IDs to be integrated in the link.
disabled
optional integer
Whether the link is disabled or not. Possible values are: 0 for Активный, 1 for Отключено.
privacy
optional integer
Whether the link stats are public or not. Possible values are: 0 for Публичный, 1 for Личный, 2 for Пароль.
privacy_password
optional string
The password for the statistics page. Only works with privacy set to 2.
expiration_url
optional string
The link where the user will be redirected once the link has expired.
expiration_date
optional string
The link expiration date in YYYY-MM-DD format.
expiration_time
optional string
The link expiration time in HH:MM format.
expiration_clicks
optional integer
The number of clicks after which the link should expire.
target_type
optional integer
The type of targeting. Possible values are: 0 for None, 1 for География, 2 for Платформа, 4 for Rotation.
country[index][key]
optional string
The code of the targeted country. The code must be in ISO 3166-1 alpha-2 standard.
country[index][value]
optional string
The link where the user will be redirected to.
platform[index][key]
optional string
The name of the targeted platform. Possible values are: iOS, Android, Windows, OS X, Linux, Ubuntu, Chrome OS.
platform[index][value]
optional string
The link where the user will be redirected to.
language[index][key]
optional string
The code of the targeted language. The code must be in ISO 639-1 alpha-2 standard.
language[index][value]
optional string
The link where the user will be redirected to.
rotation[index][value]
optional string
The link where the user will be redirected to.
Удалить

API endpoint:

DELETE
https://4334.ru/links/{id}/destroy

Request example:

curl --location --request DELETE 'https://4334.ru/links/{id}/destroy' \
--header 'Authorization: Bearer {api_key}'