Guides
Create a campaign
The campaign, ad group, video and image upload and ad sequence, with the fields Mimicr validates at each step.
A TikTok campaign has three levels: the campaign (objective and optional budget), the ad group (where, to whom, when, how much and how to bill) and the ads (the creative). Before the ad, upload the video and the cover image.
1. Campaign
curl --request POST \
--url https://tiktok-ads.mimicr.dev/open_api/v1.3/campaign/create/ \
--header 'Access-Token: <token>' \
--header 'Content-Type: application/json' \
--data '{
"advertiser_id": "7000000013373458730",
"campaign_name": "Gás em Contagem",
"objective_type": "TRAFFIC",
"budget_mode": "BUDGET_MODE_INFINITE",
"operation_status": "DISABLE"
}'The response is the full campaign object, with campaign_id, secondary_status (CAMPAIGN_STATUS_DISABLE here) and create_time.
objective_type: Mimicr simulatesTRAFFIC,REACH,LEAD_GENERATION,WEB_CONVERSIONS,VIDEO_VIEWSandENGAGEMENT. App, product, R&F, Search Ads and Smart+ answer40014(HTTP 501); deprecated objectives (CONVERSIONS,APP_INSTALL…) answer40002.budget_mode: required.BUDGET_MODE_INFINITEleaves the budget to the ad groups. See Targeting and budget.campaign_name: up to 512 characters, no emoji. A name equal to a non-deleted campaign of the account is refused (40002 Campaign name already exists. Please use a different name.), unless the requests carry differentrequest_ids.request_id: an integer as a string, which also gives idempotency: the samerequest_idwithin 10 seconds answers40050 Duplicated requests have been sent.
2. Ad group
curl --request POST \
--url https://tiktok-ads.mimicr.dev/open_api/v1.3/adgroup/create/ \
--header 'Access-Token: <token>' \
--header 'Content-Type: application/json' \
--data '{
"advertiser_id": "7000000013373458730",
"campaign_id": "1700013373458745",
"adgroup_name": "Gás em Contagem",
"promotion_type": "WEBSITE",
"placement_type": "PLACEMENT_TYPE_NORMAL",
"placements": ["PLACEMENT_TIKTOK"],
"location_ids": ["3469034"],
"budget_mode": "BUDGET_MODE_DAY",
"budget": 25,
"schedule_type": "SCHEDULE_FROM_NOW",
"schedule_start_time": "2026-11-06 12:00:00",
"optimization_goal": "CLICK",
"billing_event": "CPC",
"bid_type": "BID_TYPE_NO_BID",
"pacing": "PACING_MODE_SMOOTH",
"operation_status": "DISABLE"
}'The response is the full ad group, with adgroup_id and secondary_status ADGROUP_STATUS_CREATE until it has ads. The required fields are the docs':
| Field | Rule |
|---|---|
promotion_type | Required, except for REACH, VIDEO_VIEWS and ENGAGEMENT. WEBSITE for TRAFFIC and WEB_CONVERSIONS; LEAD_GENERATION with promotion_target_type INSTANT_PAGE (Instant Form) or EXTERNAL_WEBSITE; WEBSITE_OR_DISPLAY for REACH, VIDEO_VIEWS and ENGAGEMENT |
placement_type, placements | PLACEMENT_TYPE_NORMAL requires placements; PLACEMENT_TYPE_AUTOMATIC uses all three |
location_ids or zipcode_ids | At least one |
budget_mode, budget | Required without CBO (with CBO, the budget is the campaign's); in BRL, a daily budget of at least 20 |
schedule_type, schedule_start_time | Required, in UTC+0 |
optimization_goal, billing_event | Required and compatible (table below) |
pacing | Required without CBO: PACING_MODE_SMOOTH or PACING_MODE_FAST |
| Objective | optimization_goal | billing_event |
|---|---|---|
TRAFFIC | CLICK, TRAFFIC_LANDING_PAGE_VIEW, DESTINATION_VISIT | CPC for CLICK, OCPM for the others |
REACH | REACH, SHOW | CPM |
VIDEO_VIEWS | ENGAGED_VIEW, ENGAGED_VIEW_FIFTEEN | CPV |
ENGAGEMENT | FOLLOWERS, PAGE_VISIT | OCPM for FOLLOWERS, CPC for PAGE_VISIT |
LEAD_GENERATION | LEAD_GENERATION, CLICK, CONVERT | OCPM, CPC for CLICK |
WEB_CONVERSIONS | CONVERT, VALUE, CLICK, TRAFFIC_LANDING_PAGE_VIEW | OCPM, CPC for CLICK |
CONVERT and VALUE also require pixel_id (a Pixel of the account) and optimization_event (Purchase, CompleteRegistration, Lead…). Combinations outside the table answer 40002, for example optimization_goal CLICK is not supported for objective_type REACH. or billing_event CPC does not match optimization_goal LEAD_GENERATION.
Without pacing, Mimicr answers 40002 Missing required field(s): pacing., as the docs say. The lenientRequiredFields toggle accepts the omission while the integration is being fixed.
3. Video and cover
curl --request POST \
--url https://tiktok-ads.mimicr.dev/open_api/v1.3/file/video/ad/upload/ \
--header 'Access-Token: <token>' \
--header 'Content-Type: application/json' \
--data '{ "advertiser_id": "7000000013373458730", "upload_type": "UPLOAD_BY_URL", "video_url": "https://cdn.example.com/botijao.mp4", "file_name": "botijao-2026-11-06.mp4" }'For compatibility reasons data is a list with one video: read data[0].video_id. Mimicr does not download the URL; any http(s) URL becomes a 720×1280, 15-second mp4. Every upload creates a new video_id. File names are unique per account: a repeated file_name answers 40002 Duplicated material name., so send a unique name on each upload. There are also UPLOAD_BY_FILE (multipart with video_file and its MD5 in video_signature) and UPLOAD_BY_VIDEO_ID.
The cover is an image uploaded at /file/image/ad/upload/; here data is an object, with image_id.
4. Ad
curl --request POST \
--url https://tiktok-ads.mimicr.dev/open_api/v1.3/ad/create/ \
--header 'Access-Token: <token>' \
--header 'Content-Type: application/json' \
--data '{
"advertiser_id": "7000000013373458730",
"adgroup_id": "1700013373458750",
"creatives": [{
"ad_name": "Anúncio 1",
"ad_format": "SINGLE_VIDEO",
"identity_type": "CUSTOMIZED_USER",
"identity_id": "7000000013373458733",
"display_name": "PopGás",
"video_id": "v10033g50000rni3aj3fg5q9d6ald8n9",
"image_ids": ["ad-site-i18n-sg/20261106800732b5fcd5cfb46c882e2d"],
"ad_text": "Peça seu gás agora",
"call_to_action": "ORDER_NOW",
"landing_page_url": "https://popgas.example/pedido",
"operation_status": "DISABLE"
}]
}'{
"code": 0,
"message": "OK",
"request_id": "202611061243204F83C105525EF62720",
"data": {
"ad_ids": ["1700013373458754"],
"creatives": [{ "ad_id": "1700013373458754", "ad_name": "Anúncio 1", "identity_type": "CUSTOMIZED_USER", "secondary_status": "AD_STATUS_AUDIT", "create_time": "2026-11-06 05:44:20" }]
}
}Up to 20 creatives per call, all or nothing: an invalid one fails the call and the message points at the index (Missing required field(s): creatives.0.identity_id.). The rules of each field and what happens next are in Ads and review.
5. Turn it on
Campaigns, ad groups and ads created with DISABLE stay paused. Once the ad is approved, turn the three levels on with /campaign/status/update/, /adgroup/status/update/ and /ad/status/update/. See Edit and pause.