Links
GET https://www.myshorturl.link/api/links/
curl --request GET \
--url 'https://www.myshorturl.link/api/links/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://www.myshorturl.link/api/links/' \
--header 'Authorization: Bearer {api_key}' \
参数 | Details | Description |
---|---|---|
page | 选修的 整数 | 您希望从中获取结果的页码。默认为1 。 |
results_per_page | 选修的 整数 | 您希望每页显示多少个结果。允许的取值为:10 , 25 , 50 , 100 , 250 , 500 , 1000 。默认为25 。 |
{
"data": [
{
"id": 1,
"project_id": null,
"domain_id": 0,
"type": "link",
"url": "example",
"location_url": "https://example.com/",
"settings": {
"password": null,
"sensitive_content": false
},
"clicks": 10,
"order": 0,
"start_date": null,
"end_date": null,
"datetime": "2025-03-15 08:38:05"
}
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://www.myshorturl.link/api/links?&page=1",
"last": "https://www.myshorturl.link/api/links?&page=1",
"next": null,
"prev": null,
"self": "https://www.myshorturl.link/api/links?&page=1"
}
}
GET https://www.myshorturl.link/api/links/{link_id}
curl --request GET \
--url 'https://www.myshorturl.link/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://www.myshorturl.link/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \
{
"data": {
"id": 1,
"project_id": null,
"domain_id": 0,
"type": "link",
"url": "example",
"location_url": "https://example.com/",
"settings": {
"password": null,
"sensitive_content": false
},
"clicks": 10,
"order": 0,
"start_date": null,
"end_date": null,
"datetime": "2025-03-15 08:38:05"
}
}
POST https://www.myshorturl.link/api/links
参数 | Details | Description |
---|---|---|
type | 选修的 细绳 | link |
location_url | 必需的 细绳 | 目标的 URL。 |
url | 选修的 细绳 | 生成链接的 URL 别名。对于随机生成的留空。 |
domain_id | 选修的 整数 | - |
project_id | 选修的 整数 | - |
pixels_ids | 选修的 大批 整数 | - |
schedule | 选修的 布尔值 | - |
start_date | 选修的 细绳 | Available when: schedule = true |
end_date | 选修的 细绳 | Available when: schedule = true |
clicks_limit | 选修的 整数 | - |
expiration_url | 选修的 细绳 | - |
sensitive_content | 选修的 布尔值 | - |
http_status_code | 选修的 整数 | 允许的取值:301 , 302 , 307 , 308 |
app_linking_is_enabled | 选修的 布尔值 | - |
cloaking_is_enabled | 选修的 布尔值 | - |
cloaking_title | 选修的 细绳 | - |
cloaking_custom_js | 选修的 细绳 | - |
cloaking_favicon | 选修的 文件 | - |
cloaking_opengraph | 选修的 文件 | - |
password | 选修的 细绳 | - |
forward_query_parameters_is_enabled | 选修的 布尔值 | - |
utm_source | 选修的 细绳 | - |
utm_medium | 选修的 细绳 | - |
utm_campaign | 选修的 细绳 | - |
targeting_type | 选修的 细绳 | continent_code , country_code , device_type , browser_language , rotation , os_name , browser_name |
targeting_continent_code_key[index] | 选修的 细绳 | Available when: targeting_type = continent_code |
targeting_continent_code_value[index] | 选修的 细绳 | Available when: targeting_type = continent_code |
targeting_country_code_key[index] | 选修的 细绳 | Available when: targeting_type = country_code |
targeting_country_code_value[index] | 选修的 细绳 | Available when: targeting_type = country_code |
targeting_city_name_key[index] | 选修的 细绳 | Available when: targeting_type = city_name |
targeting_city_name_value[index] | 选修的 细绳 | Available when: targeting_type = city_name |
targeting_device_type_key[index] | 选修的 细绳 | Available when: targeting_type = device_type |
targeting_device_type_value[index] | 选修的 细绳 | Available when: targeting_type = device_type |
targeting_browser_language_key[index] | 选修的 细绳 | Available when: targeting_type = browser_language |
targeting_browser_language_value[index] | 选修的 细绳 | Available when: targeting_type = browser_language |
targeting_rotation_key[index] | 选修的 细绳 | Available when: targeting_type = rotation |
targeting_rotation_value[index] | 选修的 细绳 | Available when: targeting_type = rotation |
targeting_os_name_key[index] | 选修的 细绳 | Available when: targeting_type = os_name |
targeting_os_name_value[index] | 选修的 细绳 | Available when: targeting_type = os_name |
targeting_browser_name_key[index] | 选修的 细绳 | Available when: targeting_type = browser_name |
targeting_browser_name_value[index] | 选修的 细绳 | Available when: targeting_type = browser_name |
curl --request POST \
--url 'https://www.myshorturl.link/api/links' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'url=example' \
--form 'location_url=https://www.myshorturl.link/' \
--url 'https://www.myshorturl.link/api/links' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'url=example' \
--form 'location_url=https://www.myshorturl.link/' \
{
"data": {
"id": 1
}
}
POST https://www.myshorturl.link/api/links/{link_id}
参数 | Details | Description |
---|---|---|
location_url | 选修的 细绳 | 目标的 URL。 |
url | 选修的 细绳 | 生成链接的 URL 别名。对于随机生成的留空。 |
domain_id | 选修的 整数 | - |
project_id | 选修的 整数 | - |
pixels_ids | 选修的 大批 整数 | - |
schedule | 选修的 布尔值 | - |
start_date | 选修的 细绳 | Available when: schedule = true |
end_date | 选修的 细绳 | Available when: schedule = true |
clicks_limit | 选修的 整数 | - |
expiration_url | 选修的 细绳 | - |
sensitive_content | 选修的 布尔值 | - |
http_status_code | 选修的 整数 | 允许的取值:301 , 302 , 307 , 308 |
app_linking_is_enabled | 选修的 布尔值 | - |
cloaking_is_enabled | 选修的 布尔值 | - |
cloaking_title | 选修的 细绳 | - |
cloaking_custom_js | 选修的 细绳 | - |
cloaking_favicon | 选修的 文件 | - |
cloaking_opengraph | 选修的 文件 | - |
password | 选修的 细绳 | - |
forward_query_parameters_is_enabled | 选修的 布尔值 | - |
utm_source | 选修的 细绳 | - |
utm_medium | 选修的 细绳 | - |
utm_campaign | 选修的 细绳 | - |
targeting_type | 选修的 细绳 | continent_code , country_code , device_type , browser_language , rotation , os_name , browser_name |
targeting_continent_code_key[index] | 选修的 细绳 | Available when: targeting_type = continent_code |
targeting_continent_code_value[index] | 选修的 细绳 | Available when: targeting_type = continent_code |
targeting_country_code_key[index] | 选修的 细绳 | Available when: targeting_type = country_code |
targeting_country_code_value[index] | 选修的 细绳 | Available when: targeting_type = country_code |
targeting_city_name_key[index] | 选修的 细绳 | Available when: targeting_type = city_name |
targeting_city_name_value[index] | 选修的 细绳 | Available when: targeting_type = city_name |
targeting_device_type_key[index] | 选修的 细绳 | Available when: targeting_type = device_type |
targeting_device_type_value[index] | 选修的 细绳 | Available when: targeting_type = device_type |
targeting_browser_language_key[index] | 选修的 细绳 | Available when: targeting_type = browser_language |
targeting_browser_language_value[index] | 选修的 细绳 | Available when: targeting_type = browser_language |
targeting_rotation_key[index] | 选修的 细绳 | Available when: targeting_type = rotation |
targeting_rotation_value[index] | 选修的 细绳 | Available when: targeting_type = rotation |
targeting_os_name_key[index] | 选修的 细绳 | Available when: targeting_type = os_name |
targeting_os_name_value[index] | 选修的 细绳 | Available when: targeting_type = os_name |
targeting_browser_name_key[index] | 选修的 细绳 | Available when: targeting_type = browser_name |
targeting_browser_name_value[index] | 选修的 细绳 | Available when: targeting_type = browser_name |
curl --request POST \
--url 'https://www.myshorturl.link/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'is_enabled=0' \
--url 'https://www.myshorturl.link/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'is_enabled=0' \
{
"data": {
"id": 1
}
}
DELETE https://www.myshorturl.link/api/links/{link_id}
curl --request DELETE \
--url 'https://www.myshorturl.link/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://www.myshorturl.link/api/links/{link_id}' \
--header 'Authorization: Bearer {api_key}' \