Marketing
List connected ad accounts
Return the Meta ad accounts connected to the workspace.
Returns the Meta (Facebook/Instagram) ad accounts the workspace has connected, which one is selected, and any hidden ones. Use it to find the adAccountId that marketing.adAnalytics needs. Read-only; it never exposes the access token and does not connect, select or hide accounts.
List connected ad accounts › Responses
The API key is missing, malformed, expired, or its owner is inactive.
successGet ad analytics
Return ad spend and results joined with CRM leads for a date range.
Returns Meta ad performance (spend, impressions, clicks) for one ad account together with the CRM leads and revenue attributed to it, for a date range of at most 90 days (default: the last days up to now). Use it to judge cost per lead. Without adAccountId only the CRM side is returned. Calls the Meta API, so it is rate limited as expensive. Read-only.
query Parameters
adAccountIdAd account id from marketing.adAccounts. Omit for the CRM side only.
Ad account id from marketing.adAccounts. Omit for the CRM side only.
fromRange start, ISO-8601 date-time with timezone.
Range start, ISO-8601 date-time with timezone.
toRange end, ISO-8601 date-time with timezone.
Range end, ISO-8601 date-time with timezone.
leadMetricHow a lead is counted: activeInbound (default) or newLeads.
How a lead is counted: activeInbound (default) or newLeads.
timezoneIANA timezone that day boundaries use, e.g. Asia/Jakarta. Defaults to UTC.
IANA timezone that day boundaries use, e.g. Asia/Jakarta. Defaults to UTC.
sourceChannelOnly leads from this channel, e.g. WHATSAPP.
Only leads from this channel, e.g. WHATSAPP.
channelAccountIdOnly this channel account. Requires sourceChannel.
Only this channel account. Requires sourceChannel.
customerTagOnly customers carrying these tags. Repeat the parameter for several.
Only customers carrying these tags. Repeat the parameter for several.
treatmentKeyOnly leads for this treatment or product key.
Only leads for this treatment or product key.
Get ad analytics › Responses
The API key is missing, malformed, expired, or its owner is inactive.
successSet a customer conversion status
Mark a customer qualified, unqualified or converted and report it to Meta.
Sets the lead-quality status of a customer. When the Meta Conversions API is configured for the workspace, a changed status SENDS a conversion event to Meta, which feeds ad optimisation and cannot be unsent. Use it only when the user confirms the customer really reached that stage. Setting the status a customer already has changes nothing. The response shows the stored status and the latest event delivery state; use marketing.conversionEvents.retry if delivery failed.
path Parameters
idCustomer id from customers.list.
Customer id from customers.list.
Set a customer conversion status › Request Body
statusQUALIFIED, UNQUALIFIED or CONVERTED.
Set a customer conversion status › Responses
The API key is missing, malformed, expired, or its owner is inactive.
successRetry a conversion event
Resend a failed Meta Conversions API event.
Resends a conversion event whose delivery to Meta failed. This SENDS data to Meta and cannot be recalled, so use it only for an event whose deliveryStatus shows a failure, and only once. The event id comes from the latestEvent of marketing.conversionStatus.set.
path Parameters
idConversion event id from latestEvent.id of a conversion status.
Conversion event id from latestEvent.id of a conversion status.
Retry a conversion event › Responses
The API key is missing, malformed, expired, or its owner is inactive.
success