API Reference
Create an ad group
/open_api/v1.3/adgroup/create/https://tiktok-ads.mimicr.dev · provider: https://business-api.tiktok.comUse this endpoint to create an ad group: promotion type, placements, targeting, budget, schedule, optimization goal, billing event, bid and pacing. The response is the full ad group object, with secondary_status ADGROUP_STATUS_CREATE until it has ads.
Mimicr validates as the docs say: pacing is required without CBO, budget_mode BUDGET_MODE_TOTAL requires SCHEDULE_START_END, billing_event must match optimization_goal (CLICK → CPC, REACH/SHOW → CPM, CONVERT/LEAD_GENERATION → OCPM, ENGAGED_VIEW → CPV), the BRL daily budget is at least 20, and schedule times are UTC+0. App, shop, search, R&F and catalog fields answer 40014 (HTTP 501).
Authorization
Bearer token in the Authorization: Bearer <token> header. See Authentication.
Headers
Authorized access token, sent in this header (not Authorization: Bearer). Marketing API tokens never expire.
Body
application/jsonAdvertiser ID.
The ID of the campaign that the ad group belongs to.
Ad group name.
The log ID of the request, which uniquely identifies it (also sent in the X-Tt-Logid header).
Promotion type (Optimization location). You need to specify the field when advertising objective (objective_type) for your campaign is NOT set as REACH, VIDEO_VIEWS, or ENGAGEMENT.
Valid when objective_type at the campaign level is LEAD_GENERATION. The promotion type for Lead Generation objective. You can find out how to create lead generation ads in Lead Generation Ads.
INSTANT_PAGEEXTERNAL_WEBSITECLICKRequired in any of the following scenarios: pixel_id is specified. pixel_id is not specified and optimization_goal is IN_APP_EVENT or VALUE. Conversion event.
The placement strategy that decides where your ads will be shown.
PLACEMENT_TYPE_AUTOMATICPLACEMENT_TYPE_NORMALPLACEMENT_GLOBAL_APP_BUNDLETRAFFIC_LANDING_PAGE_VIEWREACHTHRID_PARTYPRODUCT_SALESPLACEMENT_TIKTOKWhether to disable comments on ads in the ad group.
Whether to disable downloading videos fromads in the ad group.
Whether to disable sharing of ads in the ad group to third-party platforms.
You need to set location_ids or zipcode_ids or both. Location ids from TikTok's Location IDs list (Brazil is 3469034). A country together with one of its states is refused as overlapping.
You need to set location_ids or zipcode_ids or both.
Codes of the languages that you want to target.
Gender that you want to target.
GENDER_FEMALEGENDER_MALEGENDER_UNLIMITEDAge groups you want to target.
Spending power that you want to target.
ALLHIGHHousehold income that you want to target.
TOP5TOP10TOP10_25TOP25_50List of audience IDs.
List of audience ID to be excluded.
IDs of general interest categories that you want to use to target audiences.
IDs of additional interest categories that you want to use to target audience.
A list of targeting behavioral category objects.
Device operating systems that you want to target.
ANDROIDIOSDevice connection types that you want to target.
Targeting device price range.
Valid only when placements is set to ["PLACEMENT_TIKTOK"]. Brand safety type.
NO_BRAND_SAFETYEXPANDED_INVENTORYSTANDARD_INVENTORYLIMITED_INVENTORYTHIRD_PARTYAd group budget mode.
BUDGET_MODE_TOTALBUDGET_MODE_DYNAMIC_DAILY_BUDGETTRAFFICAPP_PROMOTIONWEB_CONVERSIONSLEAD_GENERATIONPRODUCT_SALESREACHVIDEO_VIEWSENGAGEMENTAd group budget.
The schedule type can be either SCHEDULE_START_END or SCHEDULE_FROM_NOW.
Schedule start time (UTC+0), in the format of "YYYY-MM-DD HH:MM:SS". Mimicr rejects a start more than 12 hours in the past.
Required when schedule_type is SCHEDULE_START_END or budget_mode is BUDGET_MODE_TOTAL. Schedule end time (UTC+0), in the format of "YYYY-MM-DD HH:MM:SS".
Ad delivery arrangement, in the format of a string that consists of 48 x 7 characters. Each character is mapped to a 30-minute timeframe from Monday to Sunday. Each character can be set to either 0 or 1. 1 represents delivery in the 30-minute timeframe, and 0 stands for non-delivery in the 30-minute timeframe. In Mimicr the slots follow the advertiser time zone.
The measurable results you'd like to drive with your ads.
Frequency, together with frequency_schedule, controls how often people see your ad (only available for REACH ads).
Frequency schedule, together with frequency, controls how often people see your ad (only available for REACH ads).
Required when bid_type is BID_TYPE_CUSTOM and billing_event is CPC, CPM, or CPV. Bid price. The average cost per result that you want to achieve (for Cost Cap bidding strategy).
Required when bid_type is BID_TYPE_CUSTOM and billing_event is OCPM. Where you can set a target cost per conversion for oCPM(Optimized Cost per Mille).
Click-through window for the ad group. This attribution window is the time between when a person clicks your ad and then takes an action. Use this field to define the timeframe during which conversions can be attributed to the ad group.
OFFONE_DAYSEVEN_DAYSFOURTEEN_DAYSTWENTY_EIGHT_DAYSEngaged view-through window for the ad group. This attribution window is the time after someone watches at least 6 seconds of your video ad that a conversion is counted. Use this field to define the timeframe during which conversions can be attributed to the ad group.
ONE_DAYSEVEN_DAYSView-through window for the ad group. This attribution window is the time between when a person views your ad and then takes an action. Use this field to define the timeframe during which conversions can be attributed to the ad group.
OFFONE_DAYSEVEN_DAYSEvent count (Statistic type) for the ad group. The way that people's actions are counted after only viewing or clicking an ad.
UNSETEVERYONCEEvents that you want to pay for.
You can choose between PACING_MODE_SMOOTH and PACING_MODE_FAST. For PACING_MODE_SMOOTH, the budget is allocated evenly within the scheduled time. PACING_MODE_FAST would consume budget and produce results as soon as possible. In Mimicr it is enforced as documented (Missing required field(s): pacing.) unless the homologation toggle lenientRequiredFields is on, which defaults it to PACING_MODE_SMOOTH.
Whether the promoted content is HFSS (High Fat, Salt, Sugar) Product/Brand.
The status of the ad group when created.
ENABLEDISABLEThe strategy that your creatives will be delivered.
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.
Return code. 0 means success; see the return codes appendix for the others.
Return message: OK on success, otherwise the error description.
The log ID of the request, which uniquely identifies it (also sent in the X-Tt-Logid header).
Returned data.
Show child attributes
Advertiser ID.
Campaign ID.
The name of the campaign that the ad group belongs to.
Ad group ID.
Ad group Name.
The time at which the ad group was created, in the format of "YYYY-MM-DD HH:MM:SS".
The time at which the ad group was modified, in the format of "YYYY-MM-DD HH:MM:SS".
Promotion type (Optimization location). You can decide where you'd like to promote your products using this field.
The promotion type for Lead Generation objective.
INSTANT_PAGEEXTERNAL_WEBSITEUNSETPixel ID.
Conversion event for the ad group.
The placement strategy that decides where your ads will be shown.
PLACEMENT_TYPE_AUTOMATICPLACEMENT_TYPE_NORMALThe apps where you want to deliver your ads.
Whether to disable comments on ads in the ad group.
Whether to disable downloading videos from ads in the ad group.
Whether to disable sharing of ads in the ad group to third-party platforms.
Whether to enable automated targeting.
IDs of the targeted locations. Location ids from TikTok's Location IDs list (Brazil is 3469034). A country together with one of its states is refused as overlapping.
Zip code IDs or postal code IDs of the targeted locations.
Codes of the languages that you want to target.
Gender that you want to target.
GENDER_FEMALEGENDER_MALEGENDER_UNLIMITEDAge groups you want to target.
Spending power that you want to target.
ALLHIGHA list of audience IDs.
A list of excluded audience ID.
IDs of general interest keywords that you want to use to target audiences.
IDs of additional interest keywords that you want to use to target audiences.
Device operating systems that you want to target.
ANDROIDIOSWhether the campaign will be counted against the iOS 14 dedicated campaign quota.
OCCUPIEDUNOCCUPIEDIOS14_PLUSBrand safety type.
NO_BRAND_SAFETYEXPANDED_INVENTORYSTANDARD_INVENTORYLIMITED_INVENTORYTHIRD_PARTYInventory filtering (filtering security videos, hides unsafe videos), valid only for the PLACEMENT_TIKTOK placement. Optional values are: true to filter, false not to filter.
Budget mode.
Ad budget. Returns 0.0 when Campaign Budget Optimization (budget_optimize_on) is on.
Scheduled ad budget for next day. A value not equal to 0 means the scheduled budget is set and the value represents the budget; a value equals to 0 means the scheduled budget is not set.
The schedule type can be either SCHEDULE_START_END or SCHEDULE_FROM_NOW. If you choose SCHEDULE_START_END, you need to specify a start time and an end time. If you choose SCHEDULE_FROM_NOW, you only need to specify a start time.
Ad delivery start time (UTC+0). Format should be YYYY-MM-DD HH:MM:SS Mimicr rejects a start more than 12 hours in the past.
Ad delivery end time (UTC+0). Format should be YYYY-MM-DD HH:MM:SS
Ad delivery arrangement, in the format of a string that consists of 48 x 7 characters. Each character is mapped to a 30-minute timeframe from Monday to Sunday. Each character can be set to either 0 or 1. 1 represents delivery in the 30-minute timeframe, and 0 stands for non-delivery in the 30-minute timeframe. In Mimicr the slots follow the advertiser time zone.
The measurable results that you'd like to drive your ads with. For enum values, see Enumeration - Optimization Goal.
Frequency, together with frequency_schedule, controls how often people see your ad (only available for REACH ads). For example, frequency = 2 frequency_schedule = 3 means "show ads no more than twice every 3 day".
Fequency schedule, together with frequency, controls how often people see your ad (only available for REACH ads). See frequency fields for more.
Bidding strategy that determines how the system manages your cost per result, spends your budget, and how it delivers ads. See Enumeration - Bidding Strategy.
Bid price. The average cost per result that you want to achieve (for Cost Cap bidding strategy).
Where you can set a target cost per conversion for oCPM(Optimized Cost per Mille).
Bidding strategy for in-app events.
How you calculate and measure Cost per View.
Click-through window for the ad group. This attribution window is the time between when a person clicks your ad and then takes an action.
OFFONE_DAYSEVEN_DAYSFOURTEEN_DAYSTWENTY_EIGHT_DAYSView-through window for the ad group. This attribution window is the time between when a person views your ad and then takes an action.
OFFONE_DAYSEVEN_DAYSBilling event. To learn about the enum values, see Enumerations - Billing Event.
You can choose between PACING_MODE_SMOOTH and PACING_MODE_FAST. For PACING_MODE_SMOOTH, the budget is allocated evenly within the scheduled time. PACING_MODE_FAST would consume budget and produce results as soon as possible. In Mimicr it is enforced as documented (Missing required field(s): pacing.) unless the homologation toggle lenientRequiredFields is on, which defaults it to PACING_MODE_SMOOTH.
Operation status.
ENABLEDISABLEFROZENAd group status See Enumeration - Ad group status for optional.
The strategy that your creatives will be delivered.
CUSTOMWhether the campaign is a new structure.
Whether to skip the learning stage.
Pagination information.
Show child attributes
Current page number. Default value: 1. Value range: ≥ 1.
Page size.
Total number of results.
Total pages of results.
501The route or feature is documented by TikTok but outside Mimicr's integration core: code 40014 with HTTP 501.
Return code. 0 means success; see the return codes appendix for the others.
Return message: OK on success, otherwise the error description.
The log ID of the request, which uniquely identifies it (also sent in the X-Tt-Logid header).