Guides
Sandbox testing
Mimicr's test triggers, the homologation toggles (strict by default) and chaos per area.
TikTok documents no magic test values. Every trigger below is Mimicr's own and only works in the sandbox. They match PopGás's FakeAdPlatformGateway, so e2e scripts work on both.
Triggers
| Where | Value | Effect |
|---|---|---|
ad_text or ad_name | [reprovar] | Review ends rejected: UNAVAILABLE, AD_STATUS_AUDIT_DENY, reason "The product/service displayed in the ad image/video is not consistent with the product/service on the landing page." and an AD webhook (object 3) |
ad_text or ad_name | [parcial] | Partial approval: PART_AVAILABLE, forbidden_placements: ["PLACEMENT_PANGLE"] |
ad_text or ad_name | [falha-simulada] | The create or update answers 51003 Internal service error. Please try again later. |
adgroup_name | [reprovar] | The ad group is rejected (ADGROUP_STATUS_AUDIT_DENY) after the review delay, with an AD_GROUP webhook (object 2) |
campaign_name | [conflito] | The first 2 writes on that campaign answer 40202 Write or update entity conflict. |
video_url or image_url | contains fail-download | 40002 failed to download. |
video_url | contains no-audio | The upload works, but the ad is rejected with the no-audio reason |
Ad group budget | 13.13 | 40002 Budget must be at least 20.00 BRL. |
user.email in the Events API | SHA-256 of reject@mimicr.dev | The event is unmatched (accepted, left out of reports) |
Lead fields | "phone_number":"+550000000000" | The first webhook attempt fails; the immediate retry delivers |
Review
New ads enter review (AD_STATUS_AUDIT) and the automatic reviewer decides reviewDelayMinutes (default 10) sandbox minutes later: it approves, unless a trigger above says otherwise. To decide right away, use the ad.approve, ad.partial, ad.reject and adgroup.reject actions, or advance the clock. See Ads and review.
Homologation toggles
The sandbox is strict by default: fields the docs mark as required are enforced, as in production.
| Toggle | Default | Effect |
|---|---|---|
autoReview | true | The automatic reviewer decides ads in review |
reviewDelayMinutes | 10 | Sandbox minutes until the automatic decision |
anyRedirectUri | true | The authorization page accepts any http(s) redirect_uri; when off, only the app's registered ones |
lenientRequiredFields | false | When on, accepts what older integrations omit: pacing (becomes PACING_MODE_SMOOTH), identity_id (created from display_name) and the cover image_ids (automatic cover) |
disableOutranksReview | false | When on, the pause shows above the review in secondary_status (a paused ad in review reads AD_STATUS_CAMPAIGN_DISABLE) |
adgroupUpdateAsPatch | false | When on, /adgroup/update/ keeps omitted fields instead of replacing the whole ad group |
uniqueNames | true | Refuses a repeated campaign name (and ad group name within a campaign) without a different request_id |
enforceRateLimits | false | Applies the per-app, per-route and per-advertiser rate limits |
asyncReportSeconds | 30 | Sandbox seconds until an asynchronous report is ready |
autoLeads | false | Each lead counted in the delivery of a LEAD_GENERATION ad group becomes a real lead, with a webhook |
batchWebhooks | false | Groups the leads due in the same sweep into one delivery |
reportWebhooks | true | Enables REPORT_DATA_CHANGE subscriptions (allowlist-only on TikTok) |
curl --request PUT \
--url https://api.mimicr.dev/v1/tiktok-ads/homolog \
--header 'Authorization: Bearer mk_...' \
--header 'Content-Type: application/json' \
--data '{ "lenientRequiredFields": true, "reviewDelayMinutes": 1 }'Use lenientRequiredFields and adgroupUpdateAsPatch only while your integration is being fixed. TikTok's docs require pacing, identity_id and the video cover and say /adgroup/update/ is a full replacement.
Production rules the sandbox already applies
- Accounts created on or after 2026-01-15 cannot create ads with a custom identity on TikTok placements. Test it with
advertiser.create customIdentity=falseoradvertiser.set_custom_identity allowed=false. STATUS_LIMITaccounts (the "Bloqueada" one) readADVERTISER_ACCOUNT_PUNISHon campaigns, ad groups and ads and do not deliver.- The synchronous report with
stat_time_dayaccepts at most 30 days, and deleted objects disappear from reports and lists withoutSTATUS_ALL.
Chaos
Each area takes configurable failures: latency, an error before or after processing, and operation failures.
| Area | Covers | Failures |
|---|---|---|
oauth | The auth_code exchange | 51003, 40100 |
management | Accounts, campaigns, ad groups, ads, files and identities | 40202 (writes only), 51003, 40100 |
reporting | Synchronous and asynchronous reports | 51003, 40100 |
events | /event/track/ | 51003, 40100 |
leads | Lead and subscription routes | 51003, 40100 |
webhook | Webhook deliveries | First-attempt failure and duplicate deliveries |
A chaos 500 comes back as HTTP 200 with 51003, a 429 as HTTP 200 with 40100, and a 503 stays HTTP 503 with 50000. The authorization page, the form, the click and the report files are exempt. Examples in Sandbox control.