VI | EN
Message us on Messenger
Developer resources

Update Smart Creative materials — TikTok Business API

Update Smart Creative materials · call it through Quantri360 with one API key for your own accounts / assets that you connected and authorized — 360 handles request signing and refreshing the authorization you granted.

Update Smart Creative materials

POST/ad/aco/update/Via 360: POST https://partner.quantri360.com/v1/tiktok_business/ad/aco/update/
Write endpoint — changes data on TikTok Business. The key must be created with "Allow write API calls" ticked, otherwise you get 403 write_not_allowed. Every call is logged.
Description

Use this endpoint to modify Smart Creative ad creatives. You can modify call-to-action, ad names, images, and video materials. This is a totally new endpoint in v1.3.

This endpoint supports incremental updates. To modify an updateable setting, you can set patch_update to true and pass only the field to be updated and the required fields, including the Header parameters, advertiser_id, and adgroup_id.

> Note

> If you want to update one or more parameters in an array type field, regardless of whether you set patch_update to true, you need to pass all original parameters from when you created the Smart Creative ad in that array type field, along with their updated values. If you only pass some parameters, it may result in errors or cause unspecified parameters to be overwritten with default values or null values.

  • For example, if you initially passed tiktok_item_id, identity_id, and identity_type in media_info_list when creating the ad, and you want to update only tiktok_item_id, you still need to pass all three fields (tiktok_item_id, identity_id, and identity_type) in media_info_list. The values for identity_id and identity_type should remain unchanged.
  • If you specified multiple creative materials in media_info_list when creating the ad, and you want to update only one creative material, you still need to provide information for all creative materials in media_info_list.

Request

Endpoint

POST https://partner.quantri360.com/v1/tiktok_business/ad/aco/update/

Authentication & shop

NameInTypeSampleDescription
AuthorizationheaderheaderBearer q360_live_ab12cd34_…Khóa API của brand (tạo ở mục API key). Bắt buộc với mọi request. Brand suy từ key — không truyền mã brand.
platform_shop_idquerystring7000000000000000001Tài sản TikTok Business đã kết nối — "Mã tài sản" ở trang Nền tảng hoặc GET /v1/platforms (tài khoản quảng cáo cho Marketing API, tài khoản TikTok cho Organic / Messaging). Có thể bỏ khi chỉ kết nối một tài sản.

Request parameters

NameInTypeRequiredSampleDescription
adgroup_idbodystringYesAd group ID. Note: Pass the ID of an ad group that you have enabled Smart Creative for. The creative_material_mode for the ad group should be SMART_CREATIVE.
patch_updatebodybooleanNoWhether to use incremental update mode. For example, to update the ad texts by using incremental update mode, configure the following settings only: - Set patch_update to true. - Set title_list to the new ad texts. - Pass the required fields, including the Header parameters, advertiser_id, and adgroup_id.
media_info_listbodyobject[]NoList of media information.
title_listbodyobject[]NoList of ad titles (also called ad texts). Ad titles are shown to your audience as part of your ad creative, to deliver the message you intend to communicate to them.
call_to_action_listbodyobject[]NoCall-to-action list. Note: You can include at most three call-to-action texts (call_to_action) in each call_to_action_list object.
deeplink_listbodyobject[]NoList of deeplinks. Length range: [0,1]. Note: Only one deeplink and corresponding deeplink_type can be submitted in each deeplink_list object.
display_name_listbodyobject[]NoDisplay names. Note: You can pass only one app_name or landing_page_name into each display_name_list object.
avatar_icon_listbodyobject[]NoAvatar image list. Note: When you pass in identity_id in media_info or common_material, you don't need to pass in this object, and when you do, it'll be ignored. You can only pass in only one avatar image ID (web_uri).
page_listbodyobject[]NoPage ID list.
card_listbodyobject[]NoCard ID list. Length range: [0,1].
common_materialbodyobjectNoCommon material.

Request examples

curl -s -X POST "https://partner.quantri360.com/v1/tiktok_business/ad/aco/update/" \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{"adgroup_id":"","media_info_list":[{}],"title_list":[{}],"call_to_action_list":[{}],"deeplink_list":[{}],"display_name_list":[{}],"avatar_icon_list":[{}],"page_list":[{}],"card_list":[{}],"common_material":{}}'
Python
import requests

KEY = "q360_live_..."  # khóa API của brand
r = requests.post(
    "https://partner.quantri360.com/v1/tiktok_business/ad/aco/update/",
    params={},
    json={
        "adgroup_id": "",
        "media_info_list": [
            {}
        ],
        "title_list": [
            {}
        ],
        "call_to_action_list": [
            {}
        ],
        "deeplink_list": [
            {}
        ],
        "display_name_list": [
            {}
        ],
        "avatar_icon_list": [
            {}
        ],
        "page_list": [
            {}
        ],
        "card_list": [
            {}
        ],
        "common_material": {}
    },
    headers={"Authorization": f"Bearer {KEY}"},
    timeout=60,
)
print(r.status_code)
print(r.json())
Node.js
const KEY = 'q360_live_...'; // khóa API của brand
const url = new URL('https://partner.quantri360.com/v1/tiktok_business/ad/aco/update/');
for (const [k, v] of Object.entries({})) url.searchParams.set(k, typeof v === 'object' ? JSON.stringify(v) : String(v));
const r = await fetch(url, {
  method: 'POST',
  headers: { Authorization: `Bearer ${KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({"adgroup_id":"","media_info_list":[{}],"title_list":[{}],"call_to_action_list":[{}],"deeplink_list":[{}],"display_name_list":[{}],"avatar_icon_list":[{}],"page_list":[{}],"card_list":[{}],"common_material":{}}),
});
console.log(r.status, await r.json());
PHP
<?php
$key = 'q360_live_...'; // khóa API của brand
$url = 'https://partner.quantri360.com/v1/tiktok_business/ad/aco/update/' . '?' . http_build_query([]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $key, 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"adgroup_id":"","media_info_list":[{}],"title_list":[{}],"call_to_action_list":[{}],"deeplink_list":[{}],"display_name_list":[{}],"avatar_icon_list":[{}],"page_list":[{}],"card_list":[{}],"common_material":{}}');
$res = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, "\n", $res;

Response

Response fields (as returned by TikTok Business)

NameTypeSampleDescription
codenumberResponse code. For the complete list of response codes and descriptions, see Appendix - Return Codes.
messagestringResponse message. For details, see Appendix - Return Codes.
dataobjectReturned data.
advertiser_idstringAdvertiser ID.
adgroup_idstringAd group ID.
media_info_listobject[]List of media information.
material_idstringMaterial ID.
material_operation_statusstringThe status of the material. Enum values: `ENABLE` (the material can be used), `DISABLE`(the material cannot be used).
media_infoobjectMedia Information.
image_infoobject[]Image information.
web_uristringImage ID.
file_namestringImage name.
video_infoobjectVideo information.
video_idstringVideo ID.
file_namestringVideo name.
aigc_disclosure_typestringWhether to turn on the AIGC (Artificial Intelligence Generated Content) self-disclosure toggle to indicate the ad contains AI-generated content. After the toggle is turned on, your ad will carry an "Advertiser labeled as Al-generated" label when viewed in full. Enum values: - `SELF_DISCLOSURE`: To turn on the toggle to declare that the ad contains AI-generated content. - `NOT_DECLARED`: To not declare that the ad contains AI-generated content.
tiktok_item_idstringThe ID of the TikTok post to be used as an ad (Spark Ad).
identity_idstringIdentity ID when you are using Spark Ads (`tiktok_item_id`).
identity_typestringIdentity type when you are using Spark Ads (`tiktok_item_id`). Enum values: `AUTH_CODE`, `TT_USER`. For details about identities, see Identities.
title_listobject[]List of ad titles (also called ad texts). Ad titles are shown to your audience as part of your ad creative, to deliver the message you intend to communicate to them.
titlestringAd title (ad text).
call_to_action_listobject[]Call-to-action list.
call_to_actionstringCall-to-action text. For enum values, see Enumeration - Call-to-action.
deeplink_listobject[]List of deeplinks.
deeplinkstringThe specific location where you want your audience to go if they have your app installed.
deeplink_typestringThe deeplink type. Enum values differs based on campaign objectives. Enum values: `NORMAL` (supported in Traffic, Conversion), `DEFERRED_DEEPLINK` (supported in App Install ). The default value is `NORMAL`. For an ad that will be included in an iOS 14 campaign, this field cannot be set to `DEFERRED_DEEPLINK`.
display_name_listobject[]Display names.
app_namestringApp name.
landing_page_namestringLanding page name.
avatar_iconobjectAvatar image information.
web_uristringAvatar image ID.
page_listobject[]Page ID list.
page_idstringPage ID.
card_listobject[]Card ID list. Length range: [0,1].
card_idstringDisplay Card ID, Gift Code Sticker ID, Countdown Sticker ID, or Download Card ID.
landing_page_urlsobject[]Landing page URL list.
landing_page_urlstringLanding page URL.
common_materialobjectCommon material.
ad_namestringAd name.
call_to_action_idstringThe ID of the CTA portfolio that you want to use in your ads.
creative_authorizedbooleanWhether you grant displaying some of your ads in our TikTok for Business Creative Center. Only valid for non-US advertisers, the default value is `false`. Note: `creative_authorized` can only be used for video ads.
playable_urlstringPlayable material url.
fallback_typestringFallback Type. If the audience do not have the app installed, you can have them fall back to install the app, or to view a specific web page. Enum values: `APP_INSTALL`, `WEBSITE`, `UNSET`. Note: Not applicable for Deferred Deeplink.
tracking_infoobjectTracking information.
impression_tracking_urlsstring[]Default Impression Tracking URL.
click_tracking_urlsstring[]Click Tracking URL.
tracking_pixel_idstringThe pixel ID that is tracked. You can use this field to track offsite events.
tracking_app_idstringThe ID of the application that is tracked.
tracking_offline_event_set_idsstring[]A list of Offline Event set IDs that are tracked.
identity_idstringIdentity ID when you are not using Spark Ads (`tiktok_item_id`).
identity_typestringIdentity type when you are not using Spark Ads (`tiktok_item_id`). The only supported value is `CUSTOMIZED_USER`.
is_smart_creativebooleanWhether Smart Creative is enabled for the ad group.
request_idstringThe log id of a request, which uniquely identifies the request.

Response sample

HTTPS/1.1 200 OK
{
    "code": 0,
    "message": "OK",
    "request_id": "{{request_id}}",
    "data": {
        "call_to_action_list": [],
        "deeplink_list": [
            {
                "deeplink_type": "NORMAL",
                "deeplink": ""
            }
        ],
        "media_info_list": [
            {
                "media_info": {
                    "image_info": [
                        {
                            "web_uri": "{{web_uri}}"
                        }
                    ],
                    "video_info": {
                        "video_id": "{{video_id}}"
                    }
                }
            },
            {
                "media_info": {
                    "image_info": [
                        {
                            "web_uri": "{{web_uri}}"
                        }
                    ],
                    "video_info": {
                        "video_id": "{{video_id}}"
                    }
                }
            }
        ],
        "advertiser_id": "{{advertiser_id}}",
        "common_material": {
            "fallback_type": null,
            "tracking_info": {
                "click_tracking_urls": [],
                "tracking_app_id": null,
                "tracking_offline_event_set_ids": [
                    "{{tracking_offline_event_set_ids}}",
                    "{{tracking_offline_event_set_ids}}"
                ],
                "impression_tracking_urls": [],
                "vast_moat_enabled": false,
                "tracking_pixel_id": "0"
            },
            "identity_type": "CUSTOMIZED_USER",
            "is_smart_creative": true,
            "creative_authorized": false,
            "call_to_action_id": "{{call_to_action_id}}",
            "playable_url": "",
            "identity_id": "{{identity_id}}",
            "ad_name": null
        },
        "card_list": null,
        "avatar_icon_list": [
            {
                "avatar_icon": {
                    "web_uri": "{{web_uri}}"
                }
            }
        ],
        "adgroup_id": "{{adgroup_id}}",
        "display_name_list": [
            {
                "app_name": "",
                "landing_page_name": "{{landing_page_name}}"
            }
        ],
        "title_list": [
            {
                "material_operation_status": "ENABLE",
                "title": "{{title}}",
                "material_id": "{{material_id}}"
            }
        ],
        "landing_page_urls": [
            {
                "landing_page_url": "{{landing_page_url}}"
            }
        ],
        "page_list": null
    }
}'
(/code);

Get started

  1. Sign up for Partner
  2. Enable a data type of the Ads (Marketing API) group on the platform page
  3. Create an API key (tick the TikTok Business channel)
  4. Call it as in the examples above