# CreateMessagingAdRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**creative_features** | Option<**std::collections::HashMap<String, Inner>**> | Meta enhancement settings for single or attached ads, and defaults for creatives[]. An item replaces the entire map, including with an empty object. (enum: OPT_IN, OPT_OUT) | [optional]
**tracking** | Option<[**models::AdTracking**](AdTracking.md)> | | [optional]
**account_id** | **String** | Facebook or Instagram SocialAccount ID. |
**ad_account_id** | **String** | Meta ad account ID, e.g. `act_123456789`. |
**name** | **String** | Ad display name. Used to derive campaign / ad set names. On the multi-creative shape, each ad's Meta name gets a \" #N\" suffix (1-indexed) so Ads Manager shows them as a numbered batch. |
**campaign_name** | Option<**String**> | Exact name for the campaign this request provisions. Omitted keeps `<name> - Campaign`. Ignored with `adSetId` (the ad set already has a campaign). | [optional]
**ad_set_name** | Option<**String**> | Exact name for the ad set this request provisions. Omitted keeps `<name> - Ad Set`. Ignored with `adSetId`. | [optional]
**platform_post_id** | Option<**String**> | Messaging and CTWA only. Platform post or reel ID, the same input boostPost takes as platformPostId. Facebook IDs become object_story_id; Instagram IDs become source_instagram_media_id run as the media owner (resolved from the media on a Meta ads business-login connection, so no Instagram connection is needed). Mutually exclusive with objectStoryId and fresh creative fields. | [optional]
**existing_post_id** | Option<**String**> | Alias of platformPostId, kept for existing callers. Sending both with different values is a 400. | [optional]
**object_story_id** | Option<**String**> | Messaging and CTWA only. Raw Facebook pageId_postId reference, used as object_story_id even with an Instagram account. Mutually exclusive with platformPostId and fresh creative fields. | [optional]
**page_id** | Option<**String**> | Facebook Page the ad runs as, when the connection was granted several Pages. Defaults to the Page bound to the connection. Any Page granted to the connection is accepted; other ids answer 400 listing the granted Pages. Same semantics as `pageId` on POST /v1/ads/create. | [optional]
**whatsapp_phone_number** | Option<**String**> | WhatsApp only. Optional E.164 number already paired with the Facebook Page. Omit to let Meta select the paired number. Sent to the creative CTA and, when creating a new ad set, its promoted_object. Attach requests do not change the existing ad set. Stored as creative.whatsappPhoneNumber on every created ad. | [optional]
**headline** | Option<**String**> | Single-creative shape only. Mutually exclusive with `creatives[]`. | [optional]
**body** | Option<**String**> | Primary text shown above the image / video. Single-creative shape only. Mutually exclusive with `creatives[]`. | [optional]
**description** | Option<**String**> | Link description, independent of `headline` and `body` (Meta's `link_data.description`, `video_data.link_description` on video, and the shared description of a `placementAssets` feed). Meta shows it mainly on Facebook Feed placements, under the headline, when there is room; Instagram, Stories, Reels and Messenger placements do not display it. Also accepted per entry in `creatives[]`. Not allowed with an existing post creative. | [optional]
**image_url** | Option<**String**> | Image asset for single-creative shape. Mutually exclusive with `video` and with `creatives[]`. Required on the single-creative shape if neither `video` nor an existing post reference is supplied. | [optional]
**video** | Option<[**models::CtwaAdRequestBodyVideo**](CtwaAdRequestBodyVideo.md)> | | [optional]
**welcome_message** | Option<[**models::CtwaAdRequestBodyWelcomeMessage**](CtwaAdRequestBodyWelcomeMessage.md)> | | [optional]
**creatives** | Option<[**Vec<models::CtwaAdRequestBodyCreativesInner>**](CtwaAdRequestBodyCreativesInner.md)> | Multi-creative shape: N CTWA ads under one campaign + one ad set, sharing budget and targeting. Mutually exclusive with the top-level single-creative fields (`headline` / `body` / `imageUrl` / `video`): setting both is a 400, unlike `POST /v1/ads/create` where the top-level fields are silently ignored in multi-creative mode. Each entry supplies headline, body, and image/video, or a platformPostId or objectStoryId reference. Fresh and existing creatives can be mixed. | [optional]
**ad_set_id** | Option<**String**> | Attach the creatives to this EXISTING messaging ad set instead of building a campaign, so the ad set keeps its learning phase. It then owns budget, targeting and schedule, so `budgetAmount`, `budgetType`, `budgetLevel`, `startDate`, `endDate`, `objective`, `campaignStatus`, `existingCampaignId`, the special ad category fields and every targeting field except `ageMin`, `ageMax`, `placements` and `advantageAudience` are rejected with a 400 alongside it. Its `destination_type` must match the ad's destination. | [optional]
**existing_campaign_id** | Option<**String**> | Create the new messaging ad set (and its ads) under this EXISTING Meta campaign instead of a new one, e.g. several audience ad sets under one campaign. The campaign's objective must be OUTCOME_ENGAGEMENT, OUTCOME_SALES or OUTCOME_LEADS (400 otherwise). If the campaign has a campaign budget, omit `budgetAmount` and `budgetType` (400 if sent); otherwise they are required and land on the new ad set. `objective`, `campaignName`, `campaignStatus`, `budgetLevel`, `specialAdCategories`, `specialAdCategoryCountry` and `adSetId` are rejected alongside it. To add ads to an existing ad set instead, use `adSetId`. | [optional]
**budget_level** | Option<**BudgetLevel**> | Where the budget lives. `adset` (default) puts it on the new ad set. `campaign` creates an Advantage campaign budget (CBO): the budget and bid strategy sit on the campaign and the ad set inherits them, same as POST /v1/ads/create. Not allowed with `adSetId` or `existingCampaignId`. (enum: adset, campaign) | [optional]
**budget_amount** | Option<**f64**> | Budget amount in the ad account's currency major units (e.g. dollars for USD, not cents). Must be > 0. Required unless `adSetId` is set (the ad set owns it) or `existingCampaignId` names a campaign with a campaign budget. | [optional]
**budget_type** | Option<**BudgetType**> | Required unless `adSetId` is set or `existingCampaignId` names a campaign with a campaign budget. `lifetime` requires `endDate`. (enum: daily, lifetime) | [optional]
**currency** | Option<**String**> | ISO 4217 currency code matching the ad account's currency (e.g. `USD`). Optional: Zernio resolves it from the ad account when omitted. The value selects the minor-unit exponent Zernio converts budget/bid amounts by before calling Meta (most currencies are cents; zero-decimal currencies like JPY/KRW are sent as-is). | [optional]
**start_date** | Option<**String**> | When the ad set starts delivering. ISO 8601 date or date-time. A value with an offset (`2027-01-15T10:00:00+01:00`, `...Z`) is used as is; one without an offset (`2027-01-15T10:00:00`) is read in the ad account's timezone, and a date-only value starts at 00:00 local. Defaults to now. | [optional]
**end_date** | Option<**String**> | ISO 8601 date or date-time, read like `startDate`; a date-only value ends at 23:59:59 local. Required when `budgetType` is `lifetime`. | [optional]
**countries** | Option<**Vec<String>**> | ISO 3166-1 alpha-2 country codes. Defaults to `[\"US\"]` only when no other geo (`cities`, `regions`, `zips`, `metros`, `customLocations`) is supplied. | [optional]
**cities** | Option<[**Vec<models::CtwaAdRequestBodyCitiesInner>**](CtwaAdRequestBodyCitiesInner.md)> | City-level geo targeting for local CTWA campaigns. Each entry maps to Meta's TargetingGeoLocationCity. `key` is Meta's city ID. `radius` and `distance_unit` are coupled: set both or neither. Meta enforces a minimum city radius (~17 km / 10 mi); smaller values resolve to a 0-size audience and the ad fails at launch. For a tighter catchment use customLocations (lat/lng). | [optional]
**regions** | Option<[**Vec<models::CtwaAdRequestBodyRegionsInner>**](CtwaAdRequestBodyRegionsInner.md)> | Region / state-level geo targeting. `key` is Meta's region ID (lookupable via GET /v1/ads/targeting/search?type=region). | [optional]
**zips** | Option<[**Vec<models::CtwaAdRequestBodyZipsInner>**](CtwaAdRequestBodyZipsInner.md)> | ZIP / postal-code geo targeting. `key` is the platform's postal id resolved via /v1/ads/targeting/search. | [optional]
**metros** | Option<[**Vec<models::CtwaAdRequestBodyZipsInner>**](CtwaAdRequestBodyZipsInner.md)> | DMA / metro-area geo targeting. `key` is Meta's metro id (e.g. `DMA:807`). | [optional]
**country_groups** | Option<**Vec<CountryGroups>**> | Meta only. Continents and trade blocs (`geo_locations.country_groups`), for targeting a whole region without listing its countries. Combines with `countries` rather than replacing it, and is also accepted under `excludedLocations`. Discoverable via `GET /v1/ads/targeting/search?dimension=geo&geoType=country_group`. (enum: africa, asia, europe, north_america, south_america, oceania, central_america, caribbean, eea, euro_area, nafta, mercosur, afta, apec, gcc, cisfta, emerging_markets, itunes_app_store, android_free_store, android_paid_store) | [optional]
**custom_locations** | Option<[**Vec<models::CreateStandaloneAdRequestCustomLocationsInner>**](CreateStandaloneAdRequestCustomLocationsInner.md)> | Point-radius geo (Meta `geo_locations.custom_locations`). Use for targeting a radius around a specific lat/long when no Meta city/region key fits. `distanceUnit` is required. | [optional]
**age_min** | Option<**i32**> | | [optional]
**age_max** | Option<**i32**> | | [optional]
**interests** | Option<[**Vec<models::CreateStandaloneAdRequestBehaviorsInner>**](CreateStandaloneAdRequestBehaviorsInner.md)> | | [optional]
**audience_id** | Option<**String**> | Custom audience ID to target. | [optional]
**placements** | Option<[**models::CtwaAdRequestBodyPlacements**](CtwaAdRequestBodyPlacements.md)> | | [optional]
**gender** | Option<**Gender**> | Restrict the audience by gender (Meta `genders`). Stored on the ad and read back in `targeting.gender`. (enum: all, male, female) | [optional][default to All]
**languages** | Option<**Vec<String>**> | Audience languages (Meta `locales`). A bare ISO 639-1 code targets all regional variants (\"en\" = all English), a region-qualified code a specific one (\"en_GB\", \"pt_BR\"); unknown codes are rejected. | [optional]
**places** | Option<[**Vec<models::CtwaAdRequestBodyPlacesInner>**](CtwaAdRequestBodyPlacesInner.md)> | Meta place keys (from GET /v1/ads/targeting/search). | [optional]
**neighborhoods** | Option<[**Vec<models::CtwaAdRequestBodyPlacesInner>**](CtwaAdRequestBodyPlacesInner.md)> | Meta neighborhood keys (from GET /v1/ads/targeting/search). | [optional]
**excluded_locations** | Option<**std::collections::HashMap<String, serde_json::Value>**> | Geo to exclude, same shape as POST /v1/ads/create (countries, countryGroups, regions, cities, zips, places, neighborhoods, customLocations). | [optional]
**behaviors** | Option<[**Vec<models::CreateStandaloneAdRequestBehaviorsInner>**](CreateStandaloneAdRequestBehaviorsInner.md)> | Meta behavior ids. Each dimension is its own flexible_spec entry: OR within, AND across. | [optional]
**work_positions** | Option<[**Vec<models::CreateStandaloneAdRequestBehaviorsInner>**](CreateStandaloneAdRequestBehaviorsInner.md)> | | [optional]
**work_employers** | Option<[**Vec<models::CreateStandaloneAdRequestBehaviorsInner>**](CreateStandaloneAdRequestBehaviorsInner.md)> | | [optional]
**work_industries** | Option<[**Vec<models::CreateStandaloneAdRequestBehaviorsInner>**](CreateStandaloneAdRequestBehaviorsInner.md)> | | [optional]
**income_tier** | Option<**IncomeTier**> | Normalized household-income tier, same as POST /v1/ads/create. Incompatible with housing, employment and credit specialAdCategories. (enum: top_5, top_10, top_10_25, top_25_50) | [optional]
**user_os** | Option<**Vec<String>**> | Meta `user_os`, e.g. [\"iOS_ver_14.0_and_above\"]. | [optional]
**user_device** | Option<**Vec<String>**> | Meta `user_device`. | [optional]
**audience_include** | Option<**Vec<String>**> | Custom or lookalike audience ids to include. | [optional]
**audience_exclude** | Option<**Vec<String>**> | Custom or lookalike audience ids to exclude. | [optional]
**saved_targeting_id** | Option<**String**> | ID of a saved_targeting audience (POST /v1/ads/audiences), expanded as the base targeting. Precedence: savedTargetingId, then `targeting`, then the flat fields. | [optional]
**targeting** | Option<[**models::TargetingSpec**](TargetingSpec.md)> | Nested targeting object, same contract as POST /v1/ads/create and boost. Flat fields win per key. | [optional]
**raw_targeting** | Option<**std::collections::HashMap<String, serde_json::Value>**> | Meta targeting spec sent as the BASE layer of the ad set's `targeting`, exactly as POST /v1/ads/create does: use it for anything the flat fields cannot express, such as a layered `flexible_spec` (entries AND together, ids inside one entry OR). Flat fields you also send are layered on top and win per key. With rawTargeting present the US geo and `advantage_audience: 0` defaults are not injected, so include `targeting_automation` in it (or send `advantageAudience`), as Meta requires it on create. | [optional]
**special_ad_categories** | Option<**Vec<SpecialAdCategories>**> | Meta special ad categories on the new campaign. (enum: HOUSING, EMPLOYMENT, CREDIT, ISSUES_ELECTIONS_POLITICS, FINANCIAL_PRODUCTS_SERVICES, ONLINE_GAMBLING_AND_GAMING) | [optional]
**special_ad_category_country** | Option<**Vec<String>**> | Countries the special ad category applies to. Requires specialAdCategories. | [optional]
**advantage_audience** | Option<**AdvantageAudience**> | Meta's Advantage+ audience expansion. `0` (default) keeps targeting strict; `1` lets Meta expand beyond the supplied targeting when its delivery system finds better matches. Always sent on CREATE (Meta requires it). (enum: 0, 1) | [optional]
**objective** | Option<**Objective**> | Defaults to `OUTCOME_ENGAGEMENT`. `OUTCOME_SALES` and `OUTCOME_LEADS` require additional account configuration (Dataset linked to the WABA for sales) and may be rejected by Meta if missing. (enum: OUTCOME_ENGAGEMENT, OUTCOME_SALES, OUTCOME_LEADS) | [optional]
**status** | Option<**Status**> | Defaults to `ACTIVE`. `PAUSED` pauses only the top-most object this call creates: the new campaign (ad set and ads switched on), or, with `adSetId`, the new ads themselves. (enum: ACTIVE, PAUSED) | [optional]
**campaign_status** | Option<**CampaignStatus**> | Campaign-level status, same semantics as `POST /v1/ads/create`. Defaults to `status`. `PAUSED` holds the new campaign off while the ad set and ads switch on (one resume call brings the whole hierarchy live); `ACTIVE` with `status: PAUSED` switches the campaign on and pauses the new ad set instead. Only meaningful when a new campaign is being created; rejected with a 400 alongside `adSetId` (the attach shape reuses an existing campaign). (enum: ACTIVE, PAUSED) | [optional]
**bid_strategy** | Option<**BidStrategy**> | Meta bid strategy applied to the shared ad set. Defaults to `LOWEST_COST_WITHOUT_CAP` (auto-bid) when omitted. `LOWEST_COST_WITH_BID_CAP` and `COST_CAP` require `bidAmount`. `LOWEST_COST_WITH_MIN_ROAS` requires `roasAverageFloor`. CTWA's `optimization_goal` is fixed to `CONVERSATIONS`, but the bid strategy is independent. (enum: LOWEST_COST_WITHOUT_CAP, LOWEST_COST_WITH_BID_CAP, COST_CAP, LOWEST_COST_WITH_MIN_ROAS) | [optional]
**bid_amount** | Option<**f64**> | Whole currency units (e.g. `5` = $5.00 on a USD account). Required when `bidStrategy` is `LOWEST_COST_WITH_BID_CAP` or `COST_CAP`; rejected otherwise. | [optional]
**roas_average_floor** | Option<**f64**> | Decimal ROAS multiplier (e.g. `2.0` = 2.0× ROAS floor). Required when `bidStrategy` is `LOWEST_COST_WITH_MIN_ROAS`; rejected otherwise. Meta enforces its own upper bound server-side. | [optional]
**dsa_beneficiary** | Option<**String**> | Legal entity that benefits from the ad. Required when targeting EU users (EU DSA, Article 26). Optional if the ad account has a default beneficiary: set it once via `PATCH /v1/ads/accounts` or in Meta Ads Manager, and Meta fills it in whenever the field is omitted. | [optional]
**dsa_payor** | Option<**String**> | Legal entity that pays for the ad. Can differ from `dsaBeneficiary` (for example, an agency paying for a client's ads). Same rules as `dsaBeneficiary`: required for EU targeting unless the ad account has a default payor. | [optional]
**regional_regulated_categories** | Option<**Vec<String>**> | Meta only. Regional regulation categories required when the ad set targets certain countries (e.g. BRAZIL_REGULATION, SINGAPORE_UNIVERSAL, TAIWAN_UNIVERSAL, THAILAND_UNIVERSAL, AUSTRALIA_FINSERV, INDIA_FINSERV, TAIWAN_FINSERV). Forwarded to the ad set. | [optional]
**regional_regulation_identities** | Option<**std::collections::HashMap<String, i32>**> | Meta only. Beneficiary/payer entity IDs required alongside regionalRegulatedCategories. Values are numeric IDs from the advertiser's Meta verification/authorization setup. Keys depend on the declared category: BRAZIL_REGULATION and THAILAND_UNIVERSAL use universal_beneficiary / universal_payer; SINGAPORE_UNIVERSAL uses singapore_universal_beneficiary / singapore_universal_payer; TAIWAN_UNIVERSAL uses taiwan_universal_beneficiary / taiwan_universal_payer; TAIWAN_FINSERV uses taiwan_finserv_beneficiary / taiwan_finserv_payer; AUSTRALIA_FINSERV uses australia_finserv_beneficiary / australia_finserv_payer; INDIA_FINSERV uses india_finserv_beneficiary / india_finserv_payer. Both beneficiary and payer must be included. If omitted and the advertiser has set defaults in Meta Ads Manager advertising settings, Meta auto-fills them. | [optional]
**destination** | Option<**Destination**> | Where the conversation opens when the ad is tapped. Set this OR `destinations`, not both. (enum: whatsapp, messenger, instagram_direct) | [optional]
**destinations** | Option<**HashSet<Destinations>**> | Two or three messaging apps on ONE ad set, like Ads Manager's \"all messaging apps\": the ad set gets Meta's combined destination_type (e.g. MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP) and the creative one CTA per app, so Meta opens the app each viewer is likeliest to answer from. WhatsApp in the list still needs the Page paired with a WhatsApp Business number. With `adSetId`, the existing ad set must already use that combined destination_type. Set this OR `destination`, not both. (enum: whatsapp, messenger, instagram_direct) | [optional]
**placement_assets** | Option<[**models::MetaPlacementAssets**](MetaPlacementAssets.md)> | A different image or video per placement on one messaging ad, e.g. a 4:5 image on Feed and a 9:16 image on Stories/Reels. Replaces top-level `imageUrl` / `video` (sending either alongside is a 400); `headline` and `body` stay required as the default copy. The CTA, `welcomeMessage` and `whatsappPhoneNumber` apply to every placement. Works on the single-creative shape and on attach (`adSetId`). Single `destination` only: Meta cannot combine per-placement media with `destinations` (it drops the placement rules from a multi-destination creative, or refuses more than one call to action per placement rule with error 1885878), so that combination is a 400. Also a 400 with `creatives[]`, `platformPostId`, `existingPostId` or `objectStoryId`, and on POST /v1/ads/call. | [optional]
**validate_only** | Option<**bool**> | Dry-runs the ad on Meta with execution_options validate_only as ONE inline campaign + ad set + creative + ad (or creative + ad on the existing ad set with `adSetId`). Nothing is uploaded or created and nothing is stored; media is checked by URL. Supports one creative with `imageUrl`, image `placementAssets`, an existing `video.id`, or an existing post. Several creatives, a new `video.url` and video `placementAssets` need uploads first and return 400. Success returns 200 with per-node results; a Meta rejection returns the Meta error. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)