Ссылки

Notes
Expert level
The API key should be sent as a Bearer token in the Authorization header of the request. Get your API key.
List

API endpoint:

GET
https://vk-cc.ru/api/v1/links

Пример запроса:

curl --location --request GET 'https://vk-cc.ru/api/v1/links' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Parameter
Формат
Описание
search
optional string
Search query.
search_by
optional string
Поиск по. Possible values are: title for Заголовок, alias for Короткая ссылка, url for URL-адрес. Defaults to: title.
status
optional integer
Статус. Possible values are: 0 for Все, 1 for Активные, 2 for Истекшие, 3 for Отключенные. Defaults to: 0.
space_id
optional integer
Space ID.
domain_id
optional integer
Domain ID.
pixel_id
optional integer
Pixel ID.
sort_by
optional string
Сортировать. Possible values are: id for Дата создания, clicks for Клики, title for Заголовок, alias for Короткая ссылка, url for URL-адрес. Defaults to: id.
sort
optional string
Сортировать. Possible values are: desc for По убыванию, asc for По возрастанию. Defaults to: desc.
per_page
optional integer
Результатов на странице. Possible values are: 10, 25, 50, 100. Defaults to: 100.
Show

API endpoint:

GET
https://vk-cc.ru/api/v1/links/{id}

Пример запроса:

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

API endpoint:

POST
https://vk-cc.ru/api/v1/links

Пример запроса:

curl --location --request POST 'https://vk-cc.ru/api/v1/links' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'url={url}' \
--data-urlencode 'domain={id}'
Parameter
Формат
Описание
url
required string
Destination URL.
domain_id
required integer
Domain ID.
alias
optional string
Короткая ссылка.
space_id
optional integer
Space ID.
pixel_ids[]
optional array
Pixel IDs.
redirect_password
optional string
Redirect password.
sensitive_content
optional integer
Sensitive content. Possible values are: 0 for Нет, 1 for Да. Defaults to: 0.
privacy
optional integer
Stats privacy. Possible values are: 0 for Публичная, 1 for Частная, 2 for Пароль. Defaults to: 0.
password
optional string
Stats password. Only works with privacy field set to 2.
active_period_start_at
optional string
Active period starting date in Y-m-d H:i format.
active_period_end_at
optional string
Active period ending date in Y-m-d H:i format.
clicks_limit
optional integer
Clicks limit.
expiration_url
optional string
Expiration URL.
targets_type
optional string
Таргетинг. Possible values are: continents for Continents, countries for Countries, operating_systems for Operating systems, browsers for Browsers, languages for Languages, devices for Devices, rotations for Rotations.
targets[index][key]
optional string
For targets_type=country, the value must be in ISO 3166-1 alpha-2 format.
For targets_type=operating_systems, the possible values are iOS, Android, Windows, OS X, Linux, Ubuntu, Chrome OS.
For targets_type=browsers, the possible values are: Chrome, Chromium, Firefox, Firefox Mobile, Edge, Internet Explorer, Mobile Internet Explorer, Vivaldi, Brave, Safari, Opera, Opera Mini, Opera Mobile, Opera Touch, Yandex Browser, UC Browser, Samsung Internet, QQ Browser, BlackBerry Browser, Maxtho.
For targets_type=devices, the possible values are: Desktop, Mobile, Tablet, Watch, Television.
For targets_type=languages, the value must be in ISO 639-1 alpha-2 format.
For targets_type=continents, the possible values are: AF for Africa, AN for Antarctica, AS for Asia, EU for Europe, NA for North America, OC for Oceania, SA for South America.
targets[index][value]
optional string
Destination URL.
Update

API endpoint:

PUT PATCH
https://vk-cc.ru/api/v1/links/{id}

Пример запроса:

curl --location --request PUT 'https://vk-cc.ru/api/v1/links/{id}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'url={url}'
Parameter
Формат
Описание
url
optional string
Destination URL.
alias
optional string
Короткая ссылка.
space_id
optional integer
Space ID.
pixel_ids[]
optional array
Pixel IDs.
redirect_password
optional string
Redirect password.
sensitive_content
optional integer
Sensitive content. Possible values are: 0 for Нет, 1 for Да.
privacy
optional integer
Stats privacy. Possible values are: 0 for Публичная, 1 for Частная, 2 for Пароль.
password
optional string
Stats password. Only works with privacy field set to 2.
active_period_start_at
optional string
Active period starting date in Y-m-d H:i format.
active_period_end_at
optional string
Active period ending date in Y-m-d H:i format.
clicks_limit
optional integer
Clicks limit.
expiration_url
optional string
Expiration URL.
targets_type
optional string
Таргетинг. Possible values are: continents for Continents, countries for Countries, operating_systems for Operating systems, browsers for Browsers, languages for Languages, devices for Devices, rotations for Rotations.
targets[index][key]
optional string
For targets_type=country, the value must be in ISO 3166-1 alpha-2 format.
For targets_type=operating_systems, the possible values are iOS, Android, Windows, OS X, Linux, Ubuntu, Chrome OS.
For targets_type=browsers, the possible values are: Chrome, Chromium, Firefox, Firefox Mobile, Edge, Internet Explorer, Mobile Internet Explorer, Vivaldi, Brave, Safari, Opera, Opera Mini, Opera Mobile, Opera Touch, Yandex Browser, UC Browser, Samsung Internet, QQ Browser, BlackBerry Browser, Maxtho.
For targets_type=devices, the possible values are: Desktop, Mobile, Tablet, Watch, Television.
For targets_type=languages, the value must be in ISO 639-1 alpha-2 format.
For targets_type=continents, the possible values are: AF for Africa, AN for Antarctica, AS for Asia, EU for Europe, NA for North America, OC for Oceania, SA for South America.
targets[index][value]
optional string
Destination URL.
Удалить

API endpoint:

DELETE
https://vk-cc.ru/api/v1/links/{id}

Пример запроса:

curl --location --request DELETE 'https://vk-cc.ru/api/v1/links/{id}' \
--header 'Authorization: Bearer {api_key}'