开发者

链接

身份验证
API 密钥应作为 Bearer 令牌在请求的 Authorization 头中发送。 获取 API 密钥.
列表

API 端点

GET
https://clck.plus/api/v1/links

请求示例

curl --location --request GET 'https://clck.plus/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, 已禁用 为 3。 默认值:0。
space_id
选填 integer
工作空间 ID.
domain_id
选填 integer
域名 ID.
pixel_id
选填 integer
像素 ID.
sort_by
选填 string
排序字段. 可选值:创建日期 为 id, 点击量 为 clicks, 标题 为 title, 别名 为 alias, 网址 为 url。 默认值:id。
sort
选填 string
排序顺序. 可选值:降序 为 desc, 升序 为 asc。 默认值:desc。
per_page
选填 integer
每页结果数. 可选值:10, 25, 50, 100。 默认值:50。
显示

API 端点

GET
https://clck.plus/api/v1/links/{id}

请求示例

curl --location --request GET 'https://clck.plus/api/v1/links/{id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
存储

API 端点

POST
https://clck.plus/api/v1/links

请求示例

curl --location --request POST 'https://clck.plus/api/v1/links' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'url={url}' \
--data-urlencode 'domain={id}'

参数

名称
类型
描述
url
必填 string
目标网址.
domain_id
必填 integer
域名 ID.
alias
选填 string
别名.
space_id
选填 integer
工作空间 ID.
pixel_ids[]
选填 array
跟踪像素 ID.
redirect_password
选填 string
跳转密码.
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, Rotations 为 rotations。
targets[index][key]
选填 string

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

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

targets_type=browsers 的可选值: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。

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://clck.plus/api/v1/links/{id}

请求示例

curl --location --request PUT 'https://clck.plus/api/v1/links/{id}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}'

参数

名称
类型
描述
url
选填 string
目标网址.
alias
选填 string
别名.
space_id
选填 integer
工作空间 ID.
pixel_ids[]
选填 array
跟踪像素 ID.
redirect_password
选填 string
跳转密码.
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, Rotations 为 rotations。
targets[index][key]
选填 string

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

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

targets_type=browsers 的可选值: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。

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://clck.plus/api/v1/links/{id}

请求示例

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