API Reference
Webhooks (Subscription API)

Create a subscription

POST/open_api/v1.3/subscription/subscribe/
Base URL: https://tiktok-ads.mimicr.dev · provider: https://business-api.tiktok.com

Use this endpoint to subscribe to webhook events. It authenticates with the app's app_id and secret in the body, not with the Access-Token header; the advertiser token goes in subscription_detail.access_token.

Mimicr simulates LEAD (Instant Form leads), AD and AD_GROUP (rejection notices), REPORT_DATA_CHANGE (toggle reportWebhooks) and AD_ACCOUNT_SUSPENSION. callback_url must be https (or a localhost URL). Each POST to it carries X-Open-Signature, the hex HMAC-SHA256 of the body with the app secret.

Authorization

Public route, no token.

Body

application/json
app_idstringrequired

ID of your developer application. You can find the App ID by navigating to My Apps > App Detail > Basic Information.

secretstringrequired

Secret of your developer application. You can find the Secret by navigating to My Apps > App Detail > Basic Information.

subscribe_entitystringrequired

The object that you want to subscribe to.

LEADADAD_GROUPREPORT_DATA_CHANGEAD_ACCOUNT_SUSPENSIONCREATIVE_FATIGUETCM_VIDEOSAPI_SERVICE_STATUS
callback_urlstringrequired

The callback URL.

subscription_detailobjectrequired

Details about the subscription.

Show child attributes
access_tokenstringrequired

The authorized access token.

lead_sourcestring

Valid only when subscribe_entity is LEAD. The source of the leads to subscribe to.

INSTANT_FORMDIRECT_MESSAGE
advertiser_idsstring[]
notify_frequencystring

Valid when subscribe_entity is REPORT_DATA_CHANGE. The frequency of the notification. If the reporting metric data for the ad accounts that you're subscribed to has changed within the last notification timeframe, you will receive at most one webhook notification.

advertiser_idstring

Valid when subscribe_entity is AD_GROUP, AD, LEAD or CREATIVE_FATIGUE. Advertiser ID. If you want to subscribe to the review status of an ad group or ad (subscribe_entity is AD_GROUP, or AD), advertiser_id is required.

page_idstring
adgroup_idstring

Valid when subscribe_entity is AD_GROUP or CREATIVE_FATIGUE. Ad group ID. Required if subscribe_entity is AD_GROUP. If you specify subscribe_entity as CREATIVE_FATIGUE and pass in both advertiser_id and adgroup_id, you will subscribe to the fatigue status of the specified ad group.

ad_idstring

Valid when subscribe_entity is AD or CREATIVE_FATIGUE. Ad ID. Required if subscribe_entity is AD. If you specify subscribe_entity as CREATIVE_FATIGUE and pass in both advertiser_id and ad_id, you will subscribe to the fatigue status of the specified ad.

Responses

200Response envelope {code, message, request_id, data}. code 0 (message "OK") is success. Validation and business errors also come with HTTP 200 and a non-zero code: check code, not the HTTP status.
codenumber

Return code. 0 means success; see the return codes appendix for the others.

messagestring

Return message: OK on success, otherwise the error description.

dataobject

Returned data.

Show child attributes
subscription_idstring

The subscription ID.

request_idstring

The log ID of the request, which uniquely identifies it (also sent in the X-Tt-Logid header).

501The route or feature is documented by TikTok but outside Mimicr's integration core: code 40014 with HTTP 501.
codeinteger

Return code. 0 means success; see the return codes appendix for the others.

messagestring

Return message: OK on success, otherwise the error description.

request_idstring

The log ID of the request, which uniquely identifies it (also sent in the X-Tt-Logid header).