API Reference
Leads (Instant Form)

Create or check a lead download task

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

Use this endpoint to create a lead download task for a form (page_id) or an ad (ad_id), and to poll it by passing the task_id it returned: CREATED → RUNNING → SUCCEED. In Mimicr the task succeeds 10 sandbox seconds after it is created.

Authorization

Bearer token in the Authorization: Bearer <token> header. See Authentication.

Headers

Access-Tokenstringrequired

Authorized access token, sent in this header (not Authorization: Bearer). Marketing API tokens never expire.

Body

application/json
advertiser_idstring

Either advertiser_id or library_id has to be set.

ad_idstring

Either ad_id or page_id has to be set.

page_idstring

Either ad_id or page_id has to be set.

task_idstring

Task ID.

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
statusstring

Task status.

CREATEDFAILEDRUNNINGSUCCEED
task_idstring

Task ID. You can pass in task_id in the request to poll the task status to check whether the task has been completed (status = SUCCEED).

file_namestring

Returned only when status is SUCCEED. File name of the lead file.

file_typestring

Returned only when status is SUCCEED. File type of the lead file.

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).