← 返回目录
📁 API Reference › Accounts › URL properties

将 URL 资源添加至广告账户

您可以使用本接口向广告账户添加要验证所有权的 URL 资源(网域或网址前缀)。

欲了解添加和验证 URL 资源的详细步骤,参阅管理 URL 资源。

重要提示
自 2025 年 10 月 15 日起,使用此接口时需要同时指定开发者应用的密钥。

请求

地址 https://business-api.tiktok.com/open_api/v1.3/business/property/add/

方法 POST

Header

|字段{30%}|类型{15%}|描述{55%}|
|---|---|---|
|Content-Type {必填}|string|请求信息类型。<br>允许格式:`application/json`。|

参数

|字段{30%}|类型{15%}|描述{55%}|
|---|---|---|
| app_id {必填} | string |开发者应用ID。<br><br>若想获取<strong>应用ID</strong>,您可以导航至<strong>[应用管理](https://business-api.tiktok.com/portal/apps)</strong> > <strong>App Detail</strong> > <strong>基本信息</strong>。|
|secret {必填}|string| 开发者应用密钥。<br><br>若想获取<strong>密钥</strong>,可以导航至<strong>[应用管理](https://ads.tiktok.com/marketing_api/apps/)</strong> > <strong>App Detail</strong> > <strong>基本信息</strong>。|
|url_property_meta {必填} | object | 您想要添加和验证所有权的 URL 资源的信息。 |
#| property_type {必填} | integer | URL 资源的类型。 <br>枚举值: <ul><li>1:网域。</li><li>2:网址前缀。</li></ul>|
#| url {必填} | string | 您想要添加的自有 URL。需根据您指定的 `property_type` 传入对应 URL。<ul><li>若 `property_type` 设置为 1,则需要指定基本域(例如,`example.com`)或子域(例如,`subdomain.example.com`)。</li><li>若 `property_type` 设置为 2,则需要指定由以下内容组成的网址前缀:`https://` + 主机名(必须是域名)+ 路径 + `/`,并且网址前缀不可重定向至其他 URL。例如,在网址前缀 `https://www.example.com/folder/` 中,主机名是域名 `www.example.com`,路径是 `/folder`。</li></ul> |

示例

(code curl http)
curl --location --request POST 'https://business-api.tiktok.com/open_api/v1.3/business/property/add/' \
--header 'Content-Type: application/json' \
--data '{
    "app_id": "{{app_id}}",
    "secret": "{{secret}}",
    "url_property_meta": {
        "url": "{{url}}",
        "property_type": {{property_type}}
    }
}'
(/code)

返回

|字段{30%}|类型{15%}|描述{55%}|
|---|---|---|
|code |number| 返回码。完整返回码列表及描述,参见 [附录 - 返回码](https://ads.tiktok.com/marketing_api/docs?id=1737172488964097)。|
|message |string| 返回信息。更多信息参见 [附录 - 返回码](https://ads.tiktok.com/marketing_api/docs?id=1737172488964097)。 |
|request_id |string| 请求的日志ID,唯一标识一个请求。 |
|data |object| 返回数据。 |
#| url_property_info | object | 已添加至广告账户,等待所有权验证的 URL 资源的信息。 |
##| property_type| integer | URL 资源的类型。 <br>枚举值: <ul><li>1:网域。</li><li>2:网址前缀。</li></ul>|
##| url | string | 已添加至广告账户,等待所有权验证的自有 URL。 |
##| property_status | integer | URL 资源的验证状态。<br>枚举值: <ul><li> 0:等待验证。</li></ul> |
##| signature | string | 在所有权验证过程中要使用的签名字符串。 |
##| file_name | string | 在所有权验证过程中要使用的签名文件名。 |

示例

(code Success-Response http)
HTTPS/1.1 200 OK
{
    "code": 0,
    "message": "OK",
    "request_id": "{{request_id}}",
    "data": {
        "url_property_info": {
            "file_name": "{{file_name}}",
            "property_status": 0,
            "property_type": {{property_type}},
            "signature": "{{signature}}",
            "url": "{{url}}"
        }
    }
}
(/code)

内容来源:TikTok API for Business 官方文档 · 本地归档

在接这个接口时卡住了?
Stuck wiring this API into production? We build ad-delivery tooling on these platforms — campaign automation, reporting pipelines, error-handling and migration between API versions.
联系我们 · Talk to us 每日平台更新简报 →