Create async request for an analytics report using a template

POST {{baseUrl}}/ad_accounts/:ad_account_id/templates/:template_id/reports?start_date=<date>&end_date=<date>&granularity=DAY

This takes a template ID and an optional custom timeframe and constructs an asynchronous report based on the template. It returns a token that you can use to download the report when it is ready.

Request Params

KeyDatatypeRequiredDescription
start_datestringMetric report start date (UTC). Format: YYYY-MM-DD. Cannot be more than 2.5 years back from today.
end_datestringMetric report end date (UTC). Format: YYYY-MM-DD. Cannot be more than 2.5 years past start date.
granularitystringTOTAL - metrics are aggregated over the specified date range.<br> DAY - metrics are broken down daily.<br> HOUR - metrics are broken down hourly.<br>WEEKLY - metrics are broken down weekly.<br>MONTHLY - metrics are broken down monthly

HEADERS

KeyDatatypeRequiredDescription
Acceptstring

RESPONSES

status: OK

{&quot;report_status&quot;:&quot;EXPIRED&quot;,&quot;token&quot;:&quot;\u003cstring\u003e&quot;,&quot;message&quot;:&quot;\u003cstring\u003e&quot;}