链接

验证
API 密钥应作为 Bearer 令牌在请求的授权标头中发送。 获取您的 API 密钥.
列表

API端点

GET
https://tb3.cn/api/v1/links

请求示例

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

Parameters

姓名
类型
描述
search
可选 string
Search query.
search_by
可选 string
搜索方式. 可能的值是: 标题title, 别名alias, 网址url. 默认为: title.
status
可选 integer
地位. 可能的值是: 全部0, 启用1, 已到期2, 禁用3. 默认为: 0.
space_id
可选 integer
Space ID.
domain_id
可选 integer
Domain ID.
pixel_id
可选 integer
Pixel ID.
sort_by
可选 string
排序方式. 可能的值是: 创建日期id, 点击次数clicks, 标题title, 别名alias, 网址url. 默认为: id.
sort
可选 string
种类. 可能的值是: 降序desc, 上升asc. 默认为: desc.
per_page
可选 integer
每页结果. 可能的值是: 10, 25, 50, 100. 默认为: 10.
显示

API端点

GET
https://tb3.cn/api/v1/links/{id}

请求示例

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

API端点

POST
https://tb3.cn/api/v1/links

请求示例

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

Parameters

姓名
类型
描述
url
必填 string
Destination URL.
domain_id
必填 integer
Domain ID.
alias
可选 string
别名.
space_id
可选 integer
Space ID.
pixel_ids[]
可选 array
Pixel IDs.
redirect_password
可选 string
Redirect password.
sensitive_content
可选 integer
Sensitive content. 可能的值是: 0, 1. 默认为: 0.
privacy
可选 integer
Stats privacy. 可能的值是: 公共0, 私有1, 密码2. 默认为: 0.
password
可选 string
Stats password. Only works with privacy field set to 2.
active_period_start_at
可选 string
Active period starting date in Y-m-dTH:i:s format.
active_period_end_at
可选 string
Active period ending date in Y-m-dTH:i:s format.
clicks_limit
可选 integer
Clicks limit.
expiration_url
可选 string
Expiration URL.
targets_type
可选 string
定位. 可能的值是: Continentscontinents, Countriescountries, Operating systemsoperating_systems, Browsersbrowsers, Languageslanguages, Devicesdevices, Rotationsrotations.
targets[index][key]
可选 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: AfricaAF, AntarcticaAN, AsiaAS, EuropeEU, North AmericaNA, OceaniaOC, South AmericaSA.

targets[index][value]
可选 string
Destination URL.
更新

API端点

PUT PATCH
https://tb3.cn/api/v1/links/{id}

请求示例

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

Parameters

姓名
类型
描述
url
可选 string
Destination URL.
alias
可选 string
别名.
space_id
可选 integer
Space ID.
pixel_ids[]
可选 array
Pixel IDs.
redirect_password
可选 string
Redirect password.
sensitive_content
可选 integer
Sensitive content. 可能的值是: 0, 1.
privacy
可选 integer
Stats privacy. 可能的值是: 公共0, 私有1, 密码2.
password
可选 string
Stats password. Only works with privacy field set to 2.
active_period_start_at
可选 string
Active period starting date in Y-m-dTH:i:s format.
active_period_end_at
可选 string
Active period ending date in Y-m-dTH:i:s format.
clicks_limit
可选 integer
Clicks limit.
expiration_url
可选 string
Expiration URL.
targets_type
可选 string
定位. 可能的值是: Continentscontinents, Countriescountries, Operating systemsoperating_systems, Browsersbrowsers, Languageslanguages, Devicesdevices, Rotationsrotations.
targets[index][key]
可选 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: AfricaAF, AntarcticaAN, AsiaAS, EuropeEU, North AmericaNA, OceaniaOC, South AmericaSA.

targets[index][value]
可选 string
Destination URL.
删除

API端点

DELETE
https://tb3.cn/api/v1/links/{id}

请求示例

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