> For the complete documentation index, see [llms.txt](https://docs.360dialog.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.360dialog.com/docs/messaging-api/api-reference/marketing-messages.md). Agents can also search and read this documentation through its [MCP server](https://docs.360dialog.com/docs/~gitbook/mcp).

# Marketing Messages

Endpoints for marketing message features

## Get WABA Dataset

> Retrieve conversion dataset information for the caller's WhatsApp Business Account. The WABA ID is derived automatically from the caller's stack configuration and does not need to be supplied. For Messenger or Instagram, use GET /marketing/{meta\_node\_id}/dataset instead.

```json
{"openapi":"3.1.0","info":{"title":"Messaging API","version":"1.57.1"},"tags":[{"name":"Marketing Messages","description":"Endpoints for marketing message features"}],"servers":[{"description":"Production server","url":"https://waba-v2.360dialog.io"}],"security":[{"D360-API-KEY":[]}],"components":{"securitySchemes":{"D360-API-KEY":{"description":"API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.","in":"header","name":"D360-API-KEY","type":"apiKey"}},"schemas":{"mm_lite.ConversionDatasetResponse":{"description":"Response payload for conversion dataset operations. The returned id is the dataset_id used for sending events via the Conversions API.","properties":{"id":{"description":"Dataset ID used for Conversions API calls","type":"string"},"name":{"description":"Dataset name","type":"string"}},"type":"object"},"utils.ErrorResp":{"properties":{"error":{"type":"string"}},"type":"object"}}},"paths":{"/marketing/dataset":{"get":{"description":"Retrieve conversion dataset information for the caller's WhatsApp Business Account. The WABA ID is derived automatically from the caller's stack configuration and does not need to be supplied. For Messenger or Instagram, use GET /marketing/{meta_node_id}/dataset instead.","operationId":"get-waba-dataset","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/mm_lite.ConversionDatasetResponse"}}},"description":"Conversion dataset retrieved successfully"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Unauthorized - Invalid or missing access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Forbidden - Permissions error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Too many requests - Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Internal server error"}},"summary":"Get WABA Dataset","tags":["Marketing Messages"]}}}}
```

## Post WABA Dataset

> Create or retrieve a conversion dataset for WhatsApp business messaging. The WABA ID is derived automatically from the caller's stack configuration and does not need to be supplied. For Messenger or Instagram, use POST /marketing/{meta\_node\_id}/dataset instead.

```json
{"openapi":"3.1.0","info":{"title":"Messaging API","version":"1.57.1"},"tags":[{"name":"Marketing Messages","description":"Endpoints for marketing message features"}],"servers":[{"description":"Production server","url":"https://waba-v2.360dialog.io"}],"security":[{"D360-API-KEY":[]}],"components":{"securitySchemes":{"D360-API-KEY":{"description":"API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.","in":"header","name":"D360-API-KEY","type":"apiKey"}},"schemas":{"mm_lite.ConversionDatasetRequest":{"description":"Request payload for creating or retrieving a conversion dataset. If a dataset already exists for the business account, the existing dataset_id is returned.","properties":{"name":{"description":"Dataset name","type":"string"}},"type":"object"},"mm_lite.ConversionDatasetResponse":{"description":"Response payload for conversion dataset operations. The returned id is the dataset_id used for sending events via the Conversions API.","properties":{"id":{"description":"Dataset ID used for Conversions API calls","type":"string"},"name":{"description":"Dataset name","type":"string"}},"type":"object"},"utils.ErrorResp":{"properties":{"error":{"type":"string"}},"type":"object"}}},"paths":{"/marketing/dataset":{"post":{"description":"Create or retrieve a conversion dataset for WhatsApp business messaging. The WABA ID is derived automatically from the caller's stack configuration and does not need to be supplied. For Messenger or Instagram, use POST /marketing/{meta_node_id}/dataset instead.","operationId":"post-waba-dataset","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/mm_lite.ConversionDatasetRequest","summary":"requestBody","description":"Conversion dataset payload"}}},"description":"Conversion dataset payload","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/mm_lite.ConversionDatasetResponse"}}},"description":"Conversion dataset posted successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Bad request - Invalid parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Unauthorized - Invalid or missing access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Forbidden - Permissions error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Too many requests - Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Internal server error"}},"summary":"Post WABA Dataset","tags":["Marketing Messages"]}}}}
```

## Get Dataset Quality

> Retrieve dataset quality metrics and validation status for conversion tracking. Use the fields parameter to select specific metrics (e.g. web{event\_match\_quality,event\_name}).

```json
{"openapi":"3.1.0","info":{"title":"Messaging API","version":"1.57.1"},"tags":[{"name":"Marketing Messages","description":"Endpoints for marketing message features"}],"servers":[{"description":"Production server","url":"https://waba-v2.360dialog.io"}],"security":[{"D360-API-KEY":[]}],"components":{"securitySchemes":{"D360-API-KEY":{"description":"API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.","in":"header","name":"D360-API-KEY","type":"apiKey"}},"schemas":{"mm_lite.GetDatasetQualityResponse":{"description":"Response payload containing dataset quality metrics grouped by event source (web, etc.). Use the fields query parameter to select which metrics to return.","properties":{"web":{"description":"Array of quality entries for web events","items":{"$ref":"#/components/schemas/mm_lite.DatasetQualityEventEntry"},"type":"array","uniqueItems":false}},"type":"object"},"mm_lite.DatasetQualityEventEntry":{"description":"Quality metrics for a specific event, including EMQ, event coverage, deduplication, data freshness, and ACR","properties":{"acr":{"$ref":"#/components/schemas/mm_lite.DatasetQualityACR"},"data_freshness":{"$ref":"#/components/schemas/mm_lite.DatasetQualityDataFreshness"},"dedupe_key_feedback":{"description":"Deduplication key feedback","items":{"$ref":"#/components/schemas/mm_lite.DatasetQualityDedupeKey"},"type":"array","uniqueItems":false},"event_coverage":{"$ref":"#/components/schemas/mm_lite.DatasetQualityPercentage"},"event_match_quality":{"$ref":"#/components/schemas/mm_lite.DatasetQualityEMQ"},"event_name":{"description":"Event name","type":"string"},"event_potential_aly_acr_increase":{"$ref":"#/components/schemas/mm_lite.DatasetQualityACR"}},"type":"object"},"mm_lite.DatasetQualityACR":{"description":"Additional conversions reported (ACR) metric","properties":{"description":{"description":"Description of the ACR metric","type":"string"},"percentage":{"description":"ACR percentage","type":"number"}},"type":"object"},"mm_lite.DatasetQualityDataFreshness":{"description":"Data freshness / upload frequency","properties":{"description":{"description":"Description of the metric","type":"string"},"upload_frequency":{"description":"Average upload frequency","enum":["real_time","hourly","daily"],"type":"string"}},"type":"object"},"mm_lite.DatasetQualityDedupeKey":{"properties":{"browser_events_with_dedupe_key":{"$ref":"#/components/schemas/mm_lite.DatasetQualityPct"},"dedupe_key":{"description":"Deduplication key name","type":"string"},"overall_browser_coverage_from_dedupe_key":{"$ref":"#/components/schemas/mm_lite.DatasetQualityPct"},"server_events_with_dedupe_key":{"$ref":"#/components/schemas/mm_lite.DatasetQualityPct"}},"type":"object"},"mm_lite.DatasetQualityPct":{"description":"Percentage value with description","properties":{"description":{"description":"Description of the percentage","type":"string"},"percentage":{"description":"Percentage value","type":"number"}},"type":"object"},"mm_lite.DatasetQualityPercentage":{"description":"Event coverage percentage and goal","properties":{"description":{"description":"Description of the metric","type":"string"},"goal_percentage":{"description":"Goal coverage percentage","type":"number"},"percentage":{"description":"Current coverage percentage","type":"number"},"potential_aly_acr_increase":{"$ref":"#/components/schemas/mm_lite.DatasetQualityACR"}},"type":"object"},"mm_lite.DatasetQualityEMQ":{"description":"Event match quality (EMQ) score and match key feedback","properties":{"composite_score":{"description":"EMQ composite score (out of 10)","type":"number"},"diagnostics":{"description":"EMQ diagnostics with recommendations","items":{"$ref":"#/components/schemas/mm_lite.DatasetQualityDiagnostic"},"type":"array","uniqueItems":false},"match_key_feedback":{"description":"Match key coverage and potential ACR increase","items":{"$ref":"#/components/schemas/mm_lite.DatasetQualityMatchKey"},"type":"array","uniqueItems":false}},"type":"object"},"mm_lite.DatasetQualityDiagnostic":{"description":"An EMQ diagnostic issue with recommendation","properties":{"affected_event_count":{"description":"Number of affected events","type":"integer"},"description":{"description":"Description of the issue","type":"string"},"name":{"description":"Diagnostic issue name","type":"string"},"percentage":{"description":"Percentage of events affected","type":"number"},"solution":{"description":"Recommended solution","type":"string"},"total_event_count":{"description":"Total number of events","type":"integer"}},"type":"object"},"mm_lite.DatasetQualityMatchKey":{"properties":{"coverage":{"$ref":"#/components/schemas/mm_lite.DatasetQualityPct"},"identifier":{"description":"Match key identifier (e.g. email, ip_address, user_agent, external_id)","type":"string"},"potential_aly_acr_increase":{"$ref":"#/components/schemas/mm_lite.DatasetQualityACR"}},"type":"object"},"utils.ErrorResp":{"properties":{"error":{"type":"string"}},"type":"object"}}},"paths":{"/marketing/dataset_quality":{"get":{"description":"Retrieve dataset quality metrics and validation status for conversion tracking. Use the fields parameter to select specific metrics (e.g. web{event_match_quality,event_name}).","operationId":"get-dataset-quality","parameters":[{"description":"Dataset (Pixel) ID to retrieve quality metrics for","in":"query","name":"dataset_id","required":true,"schema":{"type":"string"}},{"description":"Partner agent name to filter quality data by integration source","in":"query","name":"agent_name","schema":{"type":"string"}},{"description":"Fields to return, e.g. web{event_match_quality{composite_score,match_key_feedback{identifier,coverage}},event_coverage,dedupe_key_feedback,data_freshness,acr,event_name}","in":"query","name":"fields","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/mm_lite.GetDatasetQualityResponse"}}},"description":"Dataset quality retrieved successfully"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Unauthorized - Invalid or missing access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Forbidden - Permissions error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Too many requests - Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Internal server error"}},"summary":"Get Dataset Quality","tags":["Marketing Messages"]}}}}
```

## Send Marketing Message (Alternative Route)

> Alternative route for sending marketing messages via /marketing/marketing\_messages endpoint. Used for template-based marketing messages.

```json
{"openapi":"3.1.0","info":{"title":"Messaging API","version":"1.57.1"},"tags":[{"name":"Marketing Messages","description":"Endpoints for marketing message features"}],"servers":[{"description":"Production server","url":"https://waba-v2.360dialog.io"}],"security":[{"D360-API-KEY":[]}],"components":{"securitySchemes":{"D360-API-KEY":{"description":"API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.","in":"header","name":"D360-API-KEY","type":"apiKey"}},"schemas":{"mm_lite.MarketingMessageRequest":{"description":"Request payload to send a marketing message","properties":{"bid_spec":{"$ref":"#/components/schemas/mm_lite.BidSpec"},"message_activity_sharing":{"description":"Optional flag to control message activity sharing","type":"boolean"},"messaging_product":{"description":"Messaging service used. Must be 'whatsapp'","type":"string"},"product_policy":{"description":"Optional product policy setting. One of: CLOUD_API_FALLBACK, STRICT","type":"string"},"recipient":{"description":"Business-scoped user ID (BSUID) of the message recipient, in the form <ISO 3166-2 country code>.<up to 128 alphanumeric chars>. Alternative to 'to'","type":"string"},"recipient_type":{"description":"Type of recipient. Must be 'individual'","type":"string"},"template":{"$ref":"#/components/schemas/mm_lite.TemplateObject"},"to":{"description":"WhatsApp ID or phone number of the message recipient. Optional if recipient (BSUID) is provided","type":"string"},"type":{"description":"Type of message. Must be 'template' for marketing messages","type":"string"}},"type":"object"},"mm_lite.BidSpec":{"description":"Bid settings applied to this message. Meta recommends setting the price on the template itself and using the multiplier only for single-message adjustments, because delivery performance differs even when the effective price is the same.","properties":{"per_message_bid_multiplier":{"description":"Multiplier applied to the template bid_amount for this message. Defaults to 1. For example, 1.5 raises the max price by 50%, 0.5 halves it","type":"number"}},"type":"object"},"mm_lite.TemplateObject":{"description":"Template object with name, language, and optional components","properties":{"components":{"description":"Array of components objects containing the parameters of the message","items":{"$ref":"#/components/schemas/mm_lite.TemplateComponent"},"type":"array","uniqueItems":false},"language":{"$ref":"#/components/schemas/mm_lite.LanguageObject"},"name":{"description":"Name of the template","type":"string"}},"type":"object"},"mm_lite.TemplateComponent":{"properties":{"index":{"description":"Button index","type":"integer"},"parameters":{"description":"Component parameters","items":{"$ref":"#/components/schemas/mm_lite.TemplateParameter"},"type":"array","uniqueItems":false},"sub_type":{"description":"Button subtype","enum":["quick_reply","url"],"type":"string"},"type":{"description":"Component type","enum":["header","body","button"],"type":"string"}},"type":"object"},"mm_lite.TemplateParameter":{"properties":{"currency":{"$ref":"#/components/schemas/mm_lite.Currency"},"date_time":{"$ref":"#/components/schemas/mm_lite.DateTime"},"document":{"$ref":"#/components/schemas/mm_lite.MediaObject"},"image":{"$ref":"#/components/schemas/mm_lite.MediaObject"},"location":{"$ref":"#/components/schemas/mm_lite.LocationMessage"},"text":{"description":"Text parameter","type":"string"},"type":{"description":"Parameter type","enum":["text","currency","date_time","image","document","video","location"],"type":"string"},"video":{"$ref":"#/components/schemas/mm_lite.MediaObject"}},"type":"object"},"mm_lite.Currency":{"description":"Currency parameter","properties":{"amount_1000":{"description":"Amount multiplied by 1000","type":"integer"},"code":{"description":"Currency code","type":"string"},"fallback_value":{"description":"Fallback value","type":"string"}},"type":"object"},"mm_lite.DateTime":{"description":"Date time parameter","properties":{"fallback_value":{"description":"Fallback value","type":"string"}},"type":"object"},"mm_lite.MediaObject":{"description":"Media referenced by ID or link (image, document or video parameter)","properties":{"id":{"description":"Media ID","type":"string"},"link":{"description":"Media link","type":"string"}},"type":"object"},"mm_lite.LocationMessage":{"description":"Location parameter","properties":{"address":{"description":"Location address","type":"string"},"latitude":{"description":"Latitude","type":"number"},"longitude":{"description":"Longitude","type":"number"},"name":{"description":"Location name","type":"string"}},"type":"object"},"mm_lite.LanguageObject":{"description":"Language object specifying the template language","properties":{"code":{"description":"Language code for the template","type":"string"}},"type":"object"},"mm_lite.MarketingMessageResponse":{"description":"Response payload for a successfully sent marketing message","properties":{"contacts":{"description":"Contacts the message was sent to","items":{"$ref":"#/components/schemas/mm_lite.MessageContact"},"type":"array","uniqueItems":false},"messages":{"description":"Message delivery information","items":{"$ref":"#/components/schemas/mm_lite.MessageResponse"},"type":"array","uniqueItems":false},"messaging_product":{"type":"string"}},"type":"object"},"mm_lite.MessageContact":{"properties":{"input":{"description":"Recipient identifier as sent in the request (phone number or BSUID)","type":"string"},"user_id":{"description":"Business-scoped user ID (BSUID) of the recipient. Present only for businesses onboarded to BSUID","type":"string"},"wa_id":{"description":"WhatsApp ID of the recipient","type":"string"}},"type":"object"},"mm_lite.MessageResponse":{"properties":{"id":{"description":"Message ID","type":"string"},"message_status":{"description":"Message status. One of: accepted, held_for_quality_assessment, paused","type":"string"}},"type":"object"},"utils.ErrorResp":{"properties":{"error":{"type":"string"}},"type":"object"},"utils.ErrorCodeResp":{"properties":{"code":{"description":"Machine-readable error code. insufficient_balance: the account ran out of funds while sending; add funds to continue","enum":["insufficient_balance"],"type":"string"},"error":{"type":"string"}},"type":"object"}}},"paths":{"/marketing/marketing_messages":{"post":{"description":"Alternative route for sending marketing messages via /marketing/marketing_messages endpoint. Used for template-based marketing messages.","operationId":"send-marketing-message-alt","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/mm_lite.MarketingMessageRequest","summary":"requestBody","description":"Marketing message payload"}}},"description":"Marketing message payload","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/mm_lite.MarketingMessageResponse"}}},"description":"Marketing message sent successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Bad request - Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Unauthorized - Invalid or missing access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorCodeResp"}}},"description":"Forbidden - Template not approved, insufficient permissions, or the balance is too low to send (code insufficient_balance)"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Internal server error"}},"summary":"Send Marketing Message (Alternative Route)","tags":["Marketing Messages"]}}}}
```

## Get Message Templates

> Retrieve list of WhatsApp message templates for a WhatsApp Business Account.

```json
{"openapi":"3.1.0","info":{"title":"Messaging API","version":"1.57.1"},"tags":[{"name":"Marketing Messages","description":"Endpoints for marketing message features"}],"servers":[{"description":"Production server","url":"https://waba-v2.360dialog.io"}],"security":[{"D360-API-KEY":[]}],"components":{"securitySchemes":{"D360-API-KEY":{"description":"API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.","in":"header","name":"D360-API-KEY","type":"apiKey"}},"schemas":{"mm_lite.GetMessageTemplatesResponse":{"description":"Response payload containing a paginated list of message templates for a WABA","properties":{"data":{"description":"Array of message templates","items":{"$ref":"#/components/schemas/mm_lite.GetMessageTemplateResponse"},"type":"array","uniqueItems":false},"paging":{"$ref":"#/components/schemas/mm_lite.MMLitePaging"}},"type":"object"},"mm_lite.GetMessageTemplateResponse":{"description":"Response payload containing template details","properties":{"category":{"description":"Template category","type":"string"},"components":{"description":"Template components","items":{"$ref":"#/components/schemas/mm_lite.GetTemplateComponent"},"type":"array","uniqueItems":false},"id":{"description":"Template ID","type":"string"},"language":{"description":"Template language code","type":"string"},"name":{"description":"Template name","type":"string"},"status":{"description":"Template status","type":"string"}},"type":"object"},"mm_lite.GetTemplateComponent":{"properties":{"add_security_recommendation":{"description":"Include security recommendation","type":"boolean"},"buttons":{"description":"Buttons for button components","items":{"$ref":"#/components/schemas/mm_lite.GetTemplateButton"},"type":"array","uniqueItems":false},"code_expiration_minutes":{"description":"Code expiration in minutes","type":"integer"},"format":{"description":"Header format","enum":["TEXT","IMAGE","VIDEO","DOCUMENT"],"type":"string"},"text":{"description":"Component text","type":"string"},"type":{"description":"Component type","enum":["HEADER","BODY","FOOTER","BUTTONS"],"type":"string"}},"type":"object"},"mm_lite.GetTemplateButton":{"properties":{"phone_number":{"description":"Button phone number","type":"string"},"text":{"description":"Button text","type":"string"},"type":{"description":"Button type","enum":["QUICK_REPLY","URL","PHONE_NUMBER","COPY_CODE"],"type":"string"},"url":{"description":"Button URL","type":"string"}},"type":"object"},"mm_lite.MMLitePaging":{"description":"Pagination information","properties":{"cursors":{"$ref":"#/components/schemas/mm_lite.MMLitePagingCursors"}},"type":"object"},"mm_lite.MMLitePagingCursors":{"description":"Pagination cursors","properties":{"after":{"type":"string"},"before":{"type":"string"}},"type":"object"},"utils.ErrorResp":{"properties":{"error":{"type":"string"}},"type":"object"}}},"paths":{"/marketing/message_templates":{"get":{"description":"Retrieve list of WhatsApp message templates for a WhatsApp Business Account.","operationId":"get-mmlite-message-templates","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/mm_lite.GetMessageTemplatesResponse"}}},"description":"Templates retrieved successfully"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Unauthorized - Invalid or missing access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Forbidden - Permissions error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Too many requests - Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Internal server error"}},"summary":"Get Message Templates","tags":["Marketing Messages"]}}}}
```

## Get Reach Estimate

> Retrieve the estimated number of WhatsApp users that can be reached with a marketing message for the given targeting criteria. The estimate is scoped to the WABA associated with the API key and is based on historical data for the requested lookback window.

```json
{"openapi":"3.1.0","info":{"title":"Messaging API","version":"1.57.1"},"tags":[{"name":"Marketing Messages","description":"Endpoints for marketing message features"}],"servers":[{"description":"Production server","url":"https://waba-v2.360dialog.io"}],"security":[{"D360-API-KEY":[]}],"components":{"securitySchemes":{"D360-API-KEY":{"description":"API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.","in":"header","name":"D360-API-KEY","type":"apiKey"}},"schemas":{"mm_lite.GetReachEstimateResponse":{"description":"Response payload containing per-bid delivery and cost estimates for the requested targeting criteria","properties":{"estimates":{"description":"Array of estimates, one per bid amount","items":{"$ref":"#/components/schemas/mm_lite.ReachEstimateEntry"},"type":"array","uniqueItems":false},"waba_currency":{"description":"Currency the monetary values are denominated in, as configured on the WABA","type":"string"}},"type":"object"},"mm_lite.ReachEstimateEntry":{"description":"Estimated deliveries and cost range for one bid amount. Monetary values (bid_amount, cost_lower_bound, cost_upper_bound) are expressed in the smallest unit of waba_currency per 1,000 deliveries - cents for USD, paise for INR.","properties":{"bid_amount":{"description":"Bid amount this estimate was calculated for, in the smallest unit of waba_currency per 1,000 deliveries (e.g. cents for USD, paise for INR)","type":"integer"},"cost_lower_bound":{"description":"Lower bound of estimated cost, in the smallest unit of waba_currency per 1,000 deliveries (e.g. cents for USD, paise for INR)","type":"number"},"cost_upper_bound":{"description":"Upper bound of estimated cost, in the smallest unit of waba_currency per 1,000 deliveries (e.g. cents for USD, paise for INR)","type":"number"},"deliveries_lower_bound":{"description":"Lower bound of estimated message deliveries","type":"integer"},"deliveries_upper_bound":{"description":"Upper bound of estimated message deliveries","type":"integer"},"users":{"description":"Number of targeted users the estimate is based on. Fixed at 1000 while the feature is in beta","type":"integer"}},"type":"object"},"utils.ErrorResp":{"properties":{"error":{"type":"string"}},"type":"object"}}},"paths":{"/marketing/reachestimate":{"get":{"description":"Retrieve the estimated number of WhatsApp users that can be reached with a marketing message for the given targeting criteria. The estimate is scoped to the WABA associated with the API key and is based on historical data for the requested lookback window.","operationId":"get-reach-estimate","parameters":[{"description":"URL-encoded serialized JSON targeting specification. Must contain geo_locations.countries, e.g. {'geo_locations':{'countries':['BR']}} (with double quotes, URL-encoded)","in":"query","name":"targeting_spec","required":true,"schema":{"type":"string"}},{"description":"Lookback window for the historical data behind the estimate","in":"query","name":"date_interval","required":true,"schema":{"enum":["L1D","L7D","L14D","L28D"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/mm_lite.GetReachEstimateResponse"}}},"description":"Reach estimate retrieved successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Bad request - Missing or invalid targeting_spec or date_interval"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Unauthorized - Invalid or missing access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Forbidden - Permissions error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Too many requests - Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Internal server error"}},"summary":"Get Reach Estimate","tags":["Marketing Messages"]}}}}
```

## Get Template Analytics

> Retrieve analytics data for message templates including delivery and engagement metrics.

```json
{"openapi":"3.1.0","info":{"title":"Messaging API","version":"1.57.1"},"tags":[{"name":"Marketing Messages","description":"Endpoints for marketing message features"}],"servers":[{"description":"Production server","url":"https://waba-v2.360dialog.io"}],"security":[{"D360-API-KEY":[]}],"components":{"securitySchemes":{"D360-API-KEY":{"description":"API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.","in":"header","name":"D360-API-KEY","type":"apiKey"}},"schemas":{"mm_lite.GetTemplateAnalyticsResponse":{"description":"Response payload containing template analytics data","properties":{"id":{"description":"WABA ID","type":"string"},"template_analytics":{"description":"Analytics data per template","items":{"$ref":"#/components/schemas/mm_lite.TemplateAnalytics"},"type":"array","uniqueItems":false}},"type":"object"},"mm_lite.TemplateAnalytics":{"properties":{"analytics":{"description":"Analytics data points","items":{"$ref":"#/components/schemas/mm_lite.TemplateAnalyticsMetric"},"type":"array","uniqueItems":false},"template_id":{"description":"Template ID","type":"string"}},"type":"object"},"mm_lite.TemplateAnalyticsMetric":{"properties":{"data_points":{"description":"Metric data points","items":{"$ref":"#/components/schemas/mm_lite.TemplateAnalyticsDataPoint"},"type":"array","uniqueItems":false},"granularity":{"description":"Metric granularity","type":"string"},"metric_type":{"description":"Metric type","type":"string"}},"type":"object"},"mm_lite.TemplateAnalyticsDataPoint":{"properties":{"end":{"description":"End timestamp (Unix)","type":"integer"},"start":{"description":"Start timestamp (Unix)","type":"integer"},"value":{"description":"Metric value","type":"integer"}},"type":"object"},"utils.ErrorResp":{"properties":{"error":{"type":"string"}},"type":"object"}}},"paths":{"/marketing/template_analytics":{"get":{"description":"Retrieve analytics data for message templates including delivery and engagement metrics.","operationId":"get-template-analytics","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/mm_lite.GetTemplateAnalyticsResponse"}}},"description":"Template analytics retrieved successfully"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Internal server error"}},"summary":"Get Template Analytics","tags":["Marketing Messages"]}}}}
```

## Enable Template Analytics

> Enable analytics tracking for message templates. Requires enable=true query parameter.

```json
{"openapi":"3.1.0","info":{"title":"Messaging API","version":"1.57.1"},"tags":[{"name":"Marketing Messages","description":"Endpoints for marketing message features"}],"servers":[{"description":"Production server","url":"https://waba-v2.360dialog.io"}],"security":[{"D360-API-KEY":[]}],"components":{"securitySchemes":{"D360-API-KEY":{"description":"API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.","in":"header","name":"D360-API-KEY","type":"apiKey"}},"schemas":{"mm_lite.EnableTemplateAnalyticsResponse":{"description":"Response payload for successful analytics enablement","properties":{"success":{"description":"Whether analytics was enabled successfully","type":"boolean"}},"type":"object"},"utils.ErrorResp":{"properties":{"error":{"type":"string"}},"type":"object"}}},"paths":{"/marketing/template_analytics":{"post":{"description":"Enable analytics tracking for message templates. Requires enable=true query parameter.","operationId":"enable-template-analytics","parameters":[{"description":"Must be 'true' to enable analytics","in":"query","name":"enable","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/mm_lite.EnableTemplateAnalyticsResponse"}}},"description":"Template analytics enabled successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Bad request - enable=true required"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Internal server error"}},"summary":"Enable Template Analytics","tags":["Marketing Messages"]}}}}
```

## Get Ad Object Insights

> Retrieve insights and analytics data for a specific ad object (ad account, campaign, ad set, or ad). Returns performance metrics such as impressions, reach, spend, actions, and more.

```json
{"openapi":"3.1.0","info":{"title":"Messaging API","version":"1.57.1"},"tags":[{"name":"Marketing Messages","description":"Endpoints for marketing message features"}],"servers":[{"description":"Production server","url":"https://waba-v2.360dialog.io"}],"security":[{"D360-API-KEY":[]}],"components":{"securitySchemes":{"D360-API-KEY":{"description":"API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.","in":"header","name":"D360-API-KEY","type":"apiKey"}},"schemas":{"mm_lite.GetAdInsightsResponse":{"description":"Response payload containing ad object analytics and insights data. Fields in each entry depend on the fields query parameter.","properties":{"data":{"description":"Array of insights data entries","items":{"$ref":"#/components/schemas/mm_lite.InsightsDataEntry"},"type":"array","uniqueItems":false},"paging":{"$ref":"#/components/schemas/mm_lite.MMLitePaging"}},"type":"object"},"mm_lite.InsightsDataEntry":{"description":"A single insights data entry. Contains the requested metric fields plus date range. Actual fields vary based on the fields query parameter.","properties":{"account_id":{"description":"Ad account ID","type":"string"},"actions":{"description":"Actions taken on ads","items":{"$ref":"#/components/schemas/mm_lite.InsightsAction"},"type":"array","uniqueItems":false},"ad_id":{"description":"Ad ID","type":"string"},"adset_id":{"description":"Ad set ID","type":"string"},"campaign_id":{"description":"Campaign ID","type":"string"},"clicks":{"description":"Number of clicks (all)","type":"string"},"cost_per_action_type":{"description":"Cost per action type","items":{"$ref":"#/components/schemas/mm_lite.InsightsAction"},"type":"array","uniqueItems":false},"cost_per_unique_click":{"description":"Cost per unique click","type":"string"},"cpc":{"description":"Cost per click (all)","type":"string"},"cpm":{"description":"Cost per 1,000 impressions","type":"string"},"ctr":{"description":"Click-through rate (all)","type":"string"},"date_start":{"description":"Start date of the reporting period (YYYY-MM-DD)","type":"string"},"date_stop":{"description":"End date of the reporting period (YYYY-MM-DD)","type":"string"},"frequency":{"description":"Average number of times each person saw the ad","type":"string"},"impressions":{"description":"Number of times ads were on screen","type":"string"},"reach":{"description":"Number of unique people who saw the ads","type":"string"},"spend":{"description":"Total amount spent","type":"string"},"unique_clicks":{"description":"Number of unique people who clicked","type":"string"}},"type":"object"},"mm_lite.InsightsAction":{"description":"An action metric with value and optional attribution window breakdowns","properties":{"1d_click":{"description":"1-day click attribution value","type":"string"},"1d_view":{"description":"1-day view attribution value","type":"string"},"action_type":{"description":"Action type identifier","type":"string"},"value":{"description":"Action count or cost (default 7d_click attribution)","type":"string"}},"type":"object"},"mm_lite.MMLitePaging":{"description":"Pagination information","properties":{"cursors":{"$ref":"#/components/schemas/mm_lite.MMLitePagingCursors"}},"type":"object"},"mm_lite.MMLitePagingCursors":{"description":"Pagination cursors","properties":{"after":{"type":"string"},"before":{"type":"string"}},"type":"object"},"utils.ErrorResp":{"properties":{"error":{"type":"string"}},"type":"object"}}},"paths":{"/marketing/{ad_object_id}/insights":{"get":{"description":"Retrieve insights and analytics data for a specific ad object (ad account, campaign, ad set, or ad). Returns performance metrics such as impressions, reach, spend, actions, and more.","operationId":"get-ad-object-insights","parameters":[{"description":"Ad object ID (ad account, campaign, ad set, or ad)","in":"path","name":"ad_object_id","required":true,"schema":{"type":"string"}},{"description":"Comma-separated list of fields to return, e.g. impressions,reach,spend,actions","in":"query","name":"fields","schema":{"type":"string"}},{"description":"Predefined date range, e.g. today, yesterday, last_7d, last_30d, lifetime","in":"query","name":"date_preset","schema":{"type":"string"}},{"description":"JSON time range object, e.g. {\\","in":"query","name":"time_range","schema":{"type":"string"}},{"description":"Aggregate level: account, campaign, adset, ad","in":"query","name":"level","schema":{"type":"string"}},{"description":"JSON array of filter objects, e.g. [{\\","in":"query","name":"filtering","schema":{"type":"string"}},{"description":"Sort order, e.g. reach_descending, impressions_ascending","in":"query","name":"sort","schema":{"type":"string"}},{"description":"Comma-separated breakdowns, e.g. age,gender,country","in":"query","name":"breakdowns","schema":{"type":"string"}},{"description":"Comma-separated action breakdowns, e.g. action_type,action_device","in":"query","name":"action_breakdowns","schema":{"type":"string"}},{"description":"JSON array of attribution windows, e.g. ['1d_click','7d_click','1d_view']","in":"query","name":"action_attribution_windows","schema":{"type":"string"}},{"description":"Use ad-set-level attribution settings to match Ads Manager behavior","in":"query","name":"use_unified_attribution_setting","schema":{"type":"boolean"}},{"description":"Maximum number of results to return","in":"query","name":"limit","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/mm_lite.GetAdInsightsResponse"}}},"description":"Ad object insights retrieved successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Bad request - ad_object_id required or invalid parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Unauthorized - Invalid or missing access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Forbidden - Insufficient permissions (ads_read required)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Too many requests - Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Internal server error"}},"summary":"Get Ad Object Insights","tags":["Marketing Messages"]}}}}
```

## Post Conversion Events

> Send Conversions API events for business messaging using a dataset ID. Include data with event\_name, event\_time, action\_source=business\_messaging, messaging\_channel, and user\_data (for WhatsApp include whatsapp\_business\_account\_id and ctwa\_clid).

```json
{"openapi":"3.1.0","info":{"title":"Messaging API","version":"1.57.1"},"tags":[{"name":"Marketing Messages","description":"Endpoints for marketing message features"}],"servers":[{"description":"Production server","url":"https://waba-v2.360dialog.io"}],"security":[{"D360-API-KEY":[]}],"components":{"securitySchemes":{"D360-API-KEY":{"description":"API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.","in":"header","name":"D360-API-KEY","type":"apiKey"}},"schemas":{"mm_lite.ConversionEventRequest":{"description":"Request payload for posting Conversions API events. Send up to 1,000 events per request.","properties":{"data":{"description":"Array of server event entries. Maximum 1,000 events per request","items":{"$ref":"#/components/schemas/mm_lite.ConversionEventData"},"type":"array","uniqueItems":false},"partner_agent":{"description":"Partner agent identifier","type":"string"},"test_event_code":{"description":"Test event code from Events Manager. Use only for testing; remove before sending production events","type":"string"}},"type":"object"},"mm_lite.ConversionEventData":{"description":"A single Conversions API server event entry","properties":{"action_source":{"description":"Where the event occurred. Required for all events","enum":["email","website","app","phone_call","chat","physical_store","system_generated","business_messaging","other"],"type":"string"},"custom_data":{"$ref":"#/components/schemas/mm_lite.ConversionCustomData"},"data_processing_options":{"description":"Data processing options for US users. Pass empty array to not enable LDU, or ['LDU'] to enable","items":{"type":"string"},"type":"array","uniqueItems":false},"data_processing_options_country":{"description":"Country code for data processing. 0 for geolocation, 1 for US","type":"integer"},"data_processing_options_state":{"description":"State code for data processing. 0 for geolocation, 1000 for California","type":"integer"},"event_id":{"description":"Unique event ID for deduplication between Pixel and Conversions API events","type":"string"},"event_name":{"description":"A standard or custom event name","type":"string"},"event_source_url":{"description":"URL where the event occurred. Required for website events","type":"string"},"event_time":{"description":"Unix timestamp in seconds when the event occurred. Can be up to 7 days before the request (62 days for physical_store action_source)","type":"integer"},"messaging_channel":{"description":"Messaging channel. Required when action_source is business_messaging","enum":["whatsapp","messenger","instagram"],"type":"string"},"opt_out":{"description":"If true, this event is used for ads delivery optimization but excluded from custom audience targeting","type":"boolean"},"referrer_url":{"description":"Referrer URL","type":"string"},"user_data":{"$ref":"#/components/schemas/mm_lite.ConversionUserData"}},"type":"object"},"mm_lite.ConversionCustomData":{"description":"Custom data such as purchase value, currency, content info, and order details","properties":{"content_category":{"description":"Category of the content","type":"string"},"content_ids":{"description":"Product IDs associated with the event","items":{"type":"string"},"type":"array","uniqueItems":false},"content_name":{"description":"Name of the content","type":"string"},"content_type":{"description":"Content type: product or product_group","enum":["product","product_group"],"type":"string"},"contents":{"description":"Array of content objects with product details","items":{"$ref":"#/components/schemas/mm_lite.ConversionEventContent"},"type":"array","uniqueItems":false},"currency":{"description":"ISO 4217 currency code","type":"string"},"num_items":{"description":"Number of items in the order","type":"integer"},"order_id":{"description":"Order ID for the transaction","type":"string"},"search_string":{"description":"Search query made by the user","type":"string"},"status":{"description":"Status of the event","type":"string"},"value":{"description":"Value of the conversion event","type":"number"}},"type":"object"},"mm_lite.ConversionEventContent":{"description":"A content/product item in the conversion event","properties":{"brand":{"description":"Product brand","type":"string"},"category":{"description":"Product category","type":"string"},"delivery_category":{"description":"Type of delivery","enum":["in_store","curbside","home_delivery"],"type":"string"},"description":{"description":"Product description","type":"string"},"id":{"description":"Product ID","type":"string"},"item_price":{"description":"Price per item","type":"number"},"quantity":{"description":"Number of items","type":"integer"},"title":{"description":"Product title","type":"string"}},"type":"object"},"mm_lite.ConversionUserData":{"description":"Customer information for matching events. Some fields require SHA-256 hashing before sending. Fields vary by event type and action_source.","properties":{"client_ip_address":{"description":"Client IP address. Do not hash","type":"string"},"client_user_agent":{"description":"Client user agent. Do not hash. Required for website events","type":"string"},"country":{"description":"Hashed country codes (SHA-256)","items":{"type":"string"},"type":"array","uniqueItems":false},"ct":{"description":"Hashed cities (SHA-256)","items":{"type":"string"},"type":"array","uniqueItems":false},"ctwa_clid":{"description":"Click-to-WhatsApp click ID. Do not hash","type":"string"},"db":{"description":"Hashed dates of birth (SHA-256)","items":{"type":"string"},"type":"array","uniqueItems":false},"em":{"description":"Hashed email addresses (SHA-256)","items":{"type":"string"},"type":"array","uniqueItems":false},"external_id":{"description":"External IDs (hashing recommended)","items":{"type":"string"},"type":"array","uniqueItems":false},"fb_login_id":{"description":"Facebook Login ID. Do not hash","type":"string"},"fbc":{"description":"Facebook click ID. Do not hash","type":"string"},"fbp":{"description":"Facebook browser ID. Do not hash","type":"string"},"fn":{"description":"Hashed first names (SHA-256)","items":{"type":"string"},"type":"array","uniqueItems":false},"ge":{"description":"Hashed genders (SHA-256)","items":{"type":"string"},"type":"array","uniqueItems":false},"ig_account_id":{"description":"Instagram account ID. Do not hash","type":"string"},"ig_sid":{"description":"Click-to-Instagram ID / IGSID. Do not hash","type":"string"},"lead_id":{"description":"Lead ID. Do not hash","type":"string"},"ln":{"description":"Hashed last names (SHA-256)","items":{"type":"string"},"type":"array","uniqueItems":false},"page_id":{"description":"Facebook Page ID (for Messenger events). Do not hash","type":"string"},"page_scoped_user_id":{"description":"Page-scoped user ID / PSID (for Messenger events). Do not hash","type":"string"},"ph":{"description":"Hashed phone numbers (SHA-256)","items":{"type":"string"},"type":"array","uniqueItems":false},"st":{"description":"Hashed states (SHA-256)","items":{"type":"string"},"type":"array","uniqueItems":false},"subscription_id":{"description":"Subscription ID. Do not hash","type":"string"},"zp":{"description":"Hashed zip codes (SHA-256)","items":{"type":"string"},"type":"array","uniqueItems":false}},"type":"object"},"mm_lite.ConversionEventResponse":{"description":"Response payload for successfully posted conversion events","properties":{"events_received":{"description":"Number of events received","type":"integer"},"fbtrace_id":{"description":"Facebook trace ID for debugging","type":"string"},"messages":{"description":"Warning or informational messages","items":{"type":"string"},"type":"array","uniqueItems":false}},"type":"object"},"utils.ErrorResp":{"properties":{"error":{"type":"string"}},"type":"object"}}},"paths":{"/marketing/{dataset_id}/events":{"post":{"description":"Send Conversions API events for business messaging using a dataset ID. Include data with event_name, event_time, action_source=business_messaging, messaging_channel, and user_data (for WhatsApp include whatsapp_business_account_id and ctwa_clid).","operationId":"post-conversion-events","parameters":[{"description":"Dataset ID (not the WABA ID). The WhatsApp Business Account ID is passed separately in the request body under user_data.whatsapp_business_account_id.","in":"path","name":"dataset_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/mm_lite.ConversionEventRequest","summary":"requestBody","description":"Conversion events payload (data with event_name, event_time, action_source, messaging_channel, user_data, custom_data)"}}},"description":"Conversion events payload (data with event_name, event_time, action_source, messaging_channel, user_data, custom_data)","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/mm_lite.ConversionEventResponse"}}},"description":"Conversion events posted successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Bad request - Invalid parameters or dataset_id required"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Unauthorized - Invalid or missing access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Forbidden - Permissions error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Too many requests - Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Internal server error"}},"summary":"Post Conversion Events","tags":["Marketing Messages"]}}}}
```

## Get Conversion Dataset

> Retrieve conversion dataset information for a business account. meta\_node\_id is the account-level ID for the channel the dataset belongs to (not a dataset ID) - a WhatsApp Business Account (WABA) ID, a Facebook Page ID, or an Instagram User ID, depending on which channel you're integrating.

```json
{"openapi":"3.1.0","info":{"title":"Messaging API","version":"1.57.1"},"tags":[{"name":"Marketing Messages","description":"Endpoints for marketing message features"}],"servers":[{"description":"Production server","url":"https://waba-v2.360dialog.io"}],"security":[{"D360-API-KEY":[]}],"components":{"securitySchemes":{"D360-API-KEY":{"description":"API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.","in":"header","name":"D360-API-KEY","type":"apiKey"}},"schemas":{"mm_lite.ConversionDatasetResponse":{"description":"Response payload for conversion dataset operations. The returned id is the dataset_id used for sending events via the Conversions API.","properties":{"id":{"description":"Dataset ID used for Conversions API calls","type":"string"},"name":{"description":"Dataset name","type":"string"}},"type":"object"},"utils.ErrorResp":{"properties":{"error":{"type":"string"}},"type":"object"}}},"paths":{"/marketing/{meta_node_id}/dataset":{"get":{"description":"Retrieve conversion dataset information for a business account. meta_node_id is the account-level ID for the channel the dataset belongs to (not a dataset ID) - a WhatsApp Business Account (WABA) ID, a Facebook Page ID, or an Instagram User ID, depending on which channel you're integrating.","operationId":"get-conversion-dataset","parameters":[{"description":"Account-level node ID: WABA ID, Facebook Page ID, or Instagram User ID, depending on the messaging channel","in":"path","name":"meta_node_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/mm_lite.ConversionDatasetResponse"}}},"description":"Conversion dataset retrieved successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Bad request - Invalid parameters or meta_node_id required"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Unauthorized - Invalid or missing access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Forbidden - Permissions error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Too many requests - Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Internal server error"}},"summary":"Get Conversion Dataset","tags":["Marketing Messages"]}}}}
```

## Post Conversion Dataset

> Create or retrieve a conversion dataset for business messaging. meta\_node\_id is the account-level ID for the channel the dataset belongs to (not a dataset ID) - a WhatsApp Business Account (WABA) ID, a Facebook Page ID, or an Instagram User ID, depending on which channel you're integrating.

```json
{"openapi":"3.1.0","info":{"title":"Messaging API","version":"1.57.1"},"tags":[{"name":"Marketing Messages","description":"Endpoints for marketing message features"}],"servers":[{"description":"Production server","url":"https://waba-v2.360dialog.io"}],"security":[{"D360-API-KEY":[]}],"components":{"securitySchemes":{"D360-API-KEY":{"description":"API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.","in":"header","name":"D360-API-KEY","type":"apiKey"}},"schemas":{"mm_lite.ConversionDatasetRequest":{"description":"Request payload for creating or retrieving a conversion dataset. If a dataset already exists for the business account, the existing dataset_id is returned.","properties":{"name":{"description":"Dataset name","type":"string"}},"type":"object"},"mm_lite.ConversionDatasetResponse":{"description":"Response payload for conversion dataset operations. The returned id is the dataset_id used for sending events via the Conversions API.","properties":{"id":{"description":"Dataset ID used for Conversions API calls","type":"string"},"name":{"description":"Dataset name","type":"string"}},"type":"object"},"utils.ErrorResp":{"properties":{"error":{"type":"string"}},"type":"object"}}},"paths":{"/marketing/{meta_node_id}/dataset":{"post":{"description":"Create or retrieve a conversion dataset for business messaging. meta_node_id is the account-level ID for the channel the dataset belongs to (not a dataset ID) - a WhatsApp Business Account (WABA) ID, a Facebook Page ID, or an Instagram User ID, depending on which channel you're integrating.","operationId":"post-conversion-dataset","parameters":[{"description":"Account-level node ID: WABA ID, Facebook Page ID, or Instagram User ID, depending on the messaging channel","in":"path","name":"meta_node_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/mm_lite.ConversionDatasetRequest","summary":"requestBody","description":"Conversion dataset payload"}}},"description":"Conversion dataset payload","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/mm_lite.ConversionDatasetResponse"}}},"description":"Conversion dataset posted successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Bad request - Invalid parameters or meta_node_id required"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Unauthorized - Invalid or missing access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Forbidden - Permissions error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Too many requests - Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Internal server error"}},"summary":"Post Conversion Dataset","tags":["Marketing Messages"]}}}}
```

## Get Message Template

> Retrieve a specific WhatsApp message template by template ID.

```json
{"openapi":"3.1.0","info":{"title":"Messaging API","version":"1.57.1"},"tags":[{"name":"Marketing Messages","description":"Endpoints for marketing message features"}],"servers":[{"description":"Production server","url":"https://waba-v2.360dialog.io"}],"security":[{"D360-API-KEY":[]}],"components":{"securitySchemes":{"D360-API-KEY":{"description":"API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.","in":"header","name":"D360-API-KEY","type":"apiKey"}},"schemas":{"mm_lite.GetMessageTemplateResponse":{"description":"Response payload containing template details","properties":{"category":{"description":"Template category","type":"string"},"components":{"description":"Template components","items":{"$ref":"#/components/schemas/mm_lite.GetTemplateComponent"},"type":"array","uniqueItems":false},"id":{"description":"Template ID","type":"string"},"language":{"description":"Template language code","type":"string"},"name":{"description":"Template name","type":"string"},"status":{"description":"Template status","type":"string"}},"type":"object"},"mm_lite.GetTemplateComponent":{"properties":{"add_security_recommendation":{"description":"Include security recommendation","type":"boolean"},"buttons":{"description":"Buttons for button components","items":{"$ref":"#/components/schemas/mm_lite.GetTemplateButton"},"type":"array","uniqueItems":false},"code_expiration_minutes":{"description":"Code expiration in minutes","type":"integer"},"format":{"description":"Header format","enum":["TEXT","IMAGE","VIDEO","DOCUMENT"],"type":"string"},"text":{"description":"Component text","type":"string"},"type":{"description":"Component type","enum":["HEADER","BODY","FOOTER","BUTTONS"],"type":"string"}},"type":"object"},"mm_lite.GetTemplateButton":{"properties":{"phone_number":{"description":"Button phone number","type":"string"},"text":{"description":"Button text","type":"string"},"type":{"description":"Button type","enum":["QUICK_REPLY","URL","PHONE_NUMBER","COPY_CODE"],"type":"string"},"url":{"description":"Button URL","type":"string"}},"type":"object"},"utils.ErrorResp":{"properties":{"error":{"type":"string"}},"type":"object"}}},"paths":{"/marketing/{template_id}":{"get":{"description":"Retrieve a specific WhatsApp message template by template ID.","operationId":"get-message-template","parameters":[{"description":"Template ID","in":"path","name":"template_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/mm_lite.GetMessageTemplateResponse"}}},"description":"Template retrieved successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Bad request - Invalid parameter"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Unauthorized - Invalid or missing access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Forbidden - Permissions error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Too many requests - Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Internal server error"}},"summary":"Get Message Template","tags":["Marketing Messages"]}}}}
```

## Send Marketing Message

> Send a marketing message via the marketing messages endpoint. Used for template-based marketing messages.

```json
{"openapi":"3.1.0","info":{"title":"Messaging API","version":"1.57.1"},"tags":[{"name":"Marketing Messages","description":"Endpoints for marketing message features"}],"servers":[{"description":"Production server","url":"https://waba-v2.360dialog.io"}],"security":[{"D360-API-KEY":[]}],"components":{"securitySchemes":{"D360-API-KEY":{"description":"API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.","in":"header","name":"D360-API-KEY","type":"apiKey"}},"schemas":{"mm_lite.MarketingMessageRequest":{"description":"Request payload to send a marketing message","properties":{"bid_spec":{"$ref":"#/components/schemas/mm_lite.BidSpec"},"message_activity_sharing":{"description":"Optional flag to control message activity sharing","type":"boolean"},"messaging_product":{"description":"Messaging service used. Must be 'whatsapp'","type":"string"},"product_policy":{"description":"Optional product policy setting. One of: CLOUD_API_FALLBACK, STRICT","type":"string"},"recipient":{"description":"Business-scoped user ID (BSUID) of the message recipient, in the form <ISO 3166-2 country code>.<up to 128 alphanumeric chars>. Alternative to 'to'","type":"string"},"recipient_type":{"description":"Type of recipient. Must be 'individual'","type":"string"},"template":{"$ref":"#/components/schemas/mm_lite.TemplateObject"},"to":{"description":"WhatsApp ID or phone number of the message recipient. Optional if recipient (BSUID) is provided","type":"string"},"type":{"description":"Type of message. Must be 'template' for marketing messages","type":"string"}},"type":"object"},"mm_lite.BidSpec":{"description":"Bid settings applied to this message. Meta recommends setting the price on the template itself and using the multiplier only for single-message adjustments, because delivery performance differs even when the effective price is the same.","properties":{"per_message_bid_multiplier":{"description":"Multiplier applied to the template bid_amount for this message. Defaults to 1. For example, 1.5 raises the max price by 50%, 0.5 halves it","type":"number"}},"type":"object"},"mm_lite.TemplateObject":{"description":"Template object with name, language, and optional components","properties":{"components":{"description":"Array of components objects containing the parameters of the message","items":{"$ref":"#/components/schemas/mm_lite.TemplateComponent"},"type":"array","uniqueItems":false},"language":{"$ref":"#/components/schemas/mm_lite.LanguageObject"},"name":{"description":"Name of the template","type":"string"}},"type":"object"},"mm_lite.TemplateComponent":{"properties":{"index":{"description":"Button index","type":"integer"},"parameters":{"description":"Component parameters","items":{"$ref":"#/components/schemas/mm_lite.TemplateParameter"},"type":"array","uniqueItems":false},"sub_type":{"description":"Button subtype","enum":["quick_reply","url"],"type":"string"},"type":{"description":"Component type","enum":["header","body","button"],"type":"string"}},"type":"object"},"mm_lite.TemplateParameter":{"properties":{"currency":{"$ref":"#/components/schemas/mm_lite.Currency"},"date_time":{"$ref":"#/components/schemas/mm_lite.DateTime"},"document":{"$ref":"#/components/schemas/mm_lite.MediaObject"},"image":{"$ref":"#/components/schemas/mm_lite.MediaObject"},"location":{"$ref":"#/components/schemas/mm_lite.LocationMessage"},"text":{"description":"Text parameter","type":"string"},"type":{"description":"Parameter type","enum":["text","currency","date_time","image","document","video","location"],"type":"string"},"video":{"$ref":"#/components/schemas/mm_lite.MediaObject"}},"type":"object"},"mm_lite.Currency":{"description":"Currency parameter","properties":{"amount_1000":{"description":"Amount multiplied by 1000","type":"integer"},"code":{"description":"Currency code","type":"string"},"fallback_value":{"description":"Fallback value","type":"string"}},"type":"object"},"mm_lite.DateTime":{"description":"Date time parameter","properties":{"fallback_value":{"description":"Fallback value","type":"string"}},"type":"object"},"mm_lite.MediaObject":{"description":"Media referenced by ID or link (image, document or video parameter)","properties":{"id":{"description":"Media ID","type":"string"},"link":{"description":"Media link","type":"string"}},"type":"object"},"mm_lite.LocationMessage":{"description":"Location parameter","properties":{"address":{"description":"Location address","type":"string"},"latitude":{"description":"Latitude","type":"number"},"longitude":{"description":"Longitude","type":"number"},"name":{"description":"Location name","type":"string"}},"type":"object"},"mm_lite.LanguageObject":{"description":"Language object specifying the template language","properties":{"code":{"description":"Language code for the template","type":"string"}},"type":"object"},"mm_lite.MarketingMessageResponse":{"description":"Response payload for a successfully sent marketing message","properties":{"contacts":{"description":"Contacts the message was sent to","items":{"$ref":"#/components/schemas/mm_lite.MessageContact"},"type":"array","uniqueItems":false},"messages":{"description":"Message delivery information","items":{"$ref":"#/components/schemas/mm_lite.MessageResponse"},"type":"array","uniqueItems":false},"messaging_product":{"type":"string"}},"type":"object"},"mm_lite.MessageContact":{"properties":{"input":{"description":"Recipient identifier as sent in the request (phone number or BSUID)","type":"string"},"user_id":{"description":"Business-scoped user ID (BSUID) of the recipient. Present only for businesses onboarded to BSUID","type":"string"},"wa_id":{"description":"WhatsApp ID of the recipient","type":"string"}},"type":"object"},"mm_lite.MessageResponse":{"properties":{"id":{"description":"Message ID","type":"string"},"message_status":{"description":"Message status. One of: accepted, held_for_quality_assessment, paused","type":"string"}},"type":"object"},"utils.ErrorResp":{"properties":{"error":{"type":"string"}},"type":"object"},"utils.ErrorCodeResp":{"properties":{"code":{"description":"Machine-readable error code. insufficient_balance: the account ran out of funds while sending; add funds to continue","enum":["insufficient_balance"],"type":"string"},"error":{"type":"string"}},"type":"object"}}},"paths":{"/marketing_messages":{"post":{"description":"Send a marketing message via the marketing messages endpoint. Used for template-based marketing messages.","operationId":"send-marketing-message","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/mm_lite.MarketingMessageRequest","summary":"requestBody","description":"Marketing message payload"}}},"description":"Marketing message payload","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/mm_lite.MarketingMessageResponse"}}},"description":"Marketing message sent successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Bad request - Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Unauthorized - Invalid or missing D360-API-KEY"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorCodeResp"}}},"description":"Forbidden - Template not approved, insufficient permissions, or the balance is too low to send (code insufficient_balance)"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/utils.ErrorResp"}}},"description":"Internal server error"}},"summary":"Send Marketing Message","tags":["Marketing Messages"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.360dialog.com/docs/messaging-api/api-reference/marketing-messages.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
