链接

查阅链接接口、参数与示例。

身份验证
请将 API 密钥作为 Bearer 令牌放在请求的 Authorization 标头中。 获取您的 API 密钥.
列表

API 接口地址

GET
https://6-f.cn/api/v1/links

请求示例

curl --location --request GET 'https://6-f.cn/api/v1/links' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'

参数

名称
类型
描述
search
可选 string
搜索关键词.
search_by
可选 string
搜索方式. 可选值:标题 的 title, 自定义后缀 的 alias, 网址 的 url。 默认值:title。
status
可选 integer
状态. 可选值:全部 的 0, 启用 的 1, 已到期 的 2。 默认值:0。
space_id
可选 integer
分组 ID.
domain_id
可选 integer
域名 ID.
pixel_id
可选 integer
营销追踪 ID.
sort_by
可选 string
排序方式. 可选值:创建日期 的 id, 点击次数 的 clicks_count, 标题 的 title, 自定义后缀 的 alias, 网址 的 url。 默认值:id。
sort
可选 string
排序. 可选值:降序 的 desc, 升序 的 asc。 默认值:desc。
per_page
可选 integer
每页显示数量. 可选值:10, 25, 50, 100。 默认值:10。
显示

API 接口地址

GET
https://6-f.cn/api/v1/links/{id}

请求示例

curl --location --request GET 'https://6-f.cn/api/v1/links/{id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
创建

API 接口地址

POST
https://6-f.cn/api/v1/links

请求示例

curl --location --request POST 'https://6-f.cn/api/v1/links' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'url=https://example.com/main'

参数

名称
类型
描述
url
必填 string
目标网址.
domain_id
可选 integer
域名 ID,不填时使用默认域名。
alias
可选 string
自定义后缀.
space_id
可选 integer
分组 ID.
redirect_password
可选 string
访问密码.
external_browsers[]
可选 array
指定浏览器显示外部打开提示,最多 50 项。微信填写 WeChat Browser。可选值:WeChat Browser, QQ Browser, 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, BlackBerry Browser, Maxtho。创建时省略表示关闭;更新时省略保持原值,JSON 提交 external_browsers: [] 或 null 可清空。
sensitive_content
可选 integer
敏感内容. 可选值:否 的 0, 是 的 1。 默认值:0。
privacy
可选 integer
统计隐私. 可选值:公开 的 0, 私密 的 1, 密码 的 2。 默认值:0。
password
可选 string
统计访问密码. 仅当 privacy 字段设为 2 时生效。
active_period_start_at
可选 string
有效时段的开始日期,格式为 Y-m-dTH:i:s。
active_period_end_at
可选 string
有效时段的结束日期,格式为 Y-m-dTH:i:s。
clicks_limit
可选 integer
点击次数上限.
expiration_url
可选 string
过期跳转网址.
targets_type
可选 string
定向跳转. 可选值:Continents 的 continents, Countries 的 countries, Operating systems 的 operating_systems, Browsers 的 browsers, Languages 的 languages, Devices 的 devices, Probability redirect 的 probability, Rotations 的 rotations。
targets[index][key]
可选 string | integer

概率跳转:targets_type=probability 时,key 为 1–100 的整数百分比,至少一项,总和不能超过 100%;剩余概率跳转主链接。每次访问独立随机。rotations 不需要 key。

targets_type=countries 字段的值必须采用 ISO 3166-1 alpha-2 格式。

targets_type=operating_systems 字段的可选值为:iOS, Android, Windows, OS X, Linux, Ubuntu, Chrome OS。

targets_type=browsers 字段的可选值为:WeChat Browser, QQ Browser, 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, BlackBerry Browser, Maxtho。

targets_type=devices 字段的可选值为:Desktop, Mobile, Tablet, Watch, Television。

targets_type=languages 字段的值必须采用 ISO 639-1 alpha-2 格式。

targets_type=continents 字段的可选值为:Africa 的 AF, Antarctica 的 AN, Asia 的 AS, Europe 的 EU, North America 的 NA, Oceania 的 OC, South America 的 SA。

targets[index][value]
可选 string
目标网址.
更新

API 接口地址

PUT PATCH
https://6-f.cn/api/v1/links/{id}

请求示例

curl --location --request PUT 'https://6-f.cn/api/v1/links/{id}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'url=https://example.com/updated'

参数

名称
类型
描述
url
可选 string
目标网址.
disabled
可选 boolean
是否停用链接:1 停用,0 启用;省略保持原值,仅更新接口支持。
alias
可选 string
自定义后缀.
space_id
可选 integer
分组 ID.
redirect_password
可选 string
访问密码.
external_browsers[]
可选 array
指定浏览器显示外部打开提示,最多 50 项。微信填写 WeChat Browser。可选值:WeChat Browser, QQ Browser, 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, BlackBerry Browser, Maxtho。创建时省略表示关闭;更新时省略保持原值,JSON 提交 external_browsers: [] 或 null 可清空。
sensitive_content
可选 integer
敏感内容. 可选值:否 的 0, 是 的 1。
privacy
可选 integer
统计隐私. 可选值:公开 的 0, 私密 的 1, 密码 的 2。
password
可选 string
统计访问密码. 仅当 privacy 字段设为 2 时生效。
active_period_start_at
可选 string
有效时段的开始日期,格式为 Y-m-dTH:i:s。
active_period_end_at
可选 string
有效时段的结束日期,格式为 Y-m-dTH:i:s。
clicks_limit
可选 integer
点击次数上限.
expiration_url
可选 string
过期跳转网址.
targets_type
可选 string
定向跳转. 可选值:Continents 的 continents, Countries 的 countries, Operating systems 的 operating_systems, Browsers 的 browsers, Languages 的 languages, Devices 的 devices, Probability redirect 的 probability, Rotations 的 rotations。
targets[index][key]
可选 string | integer

概率跳转:targets_type=probability 时,key 为 1–100 的整数百分比,至少一项,总和不能超过 100%;剩余概率跳转主链接。每次访问独立随机。rotations 不需要 key。

targets_type=countries 字段的值必须采用 ISO 3166-1 alpha-2 格式。

targets_type=operating_systems 字段的可选值为:iOS, Android, Windows, OS X, Linux, Ubuntu, Chrome OS。

targets_type=browsers 字段的可选值为:WeChat Browser, QQ Browser, 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, BlackBerry Browser, Maxtho。

targets_type=devices 字段的可选值为:Desktop, Mobile, Tablet, Watch, Television。

targets_type=languages 字段的值必须采用 ISO 639-1 alpha-2 格式。

targets_type=continents 字段的可选值为:Africa 的 AF, Antarctica 的 AN, Asia 的 AS, Europe 的 EU, North America 的 NA, Oceania 的 OC, South America 的 SA。

targets[index][value]
可选 string
目标网址.
删除

API 接口地址

DELETE
https://6-f.cn/api/v1/links/{id}

请求示例

curl --location --request DELETE 'https://6-f.cn/api/v1/links/{id}' \
--header 'Authorization: Bearer {api_key}'