I need list the Email object within some date range , how to get it through marketo API?
I'm working with marketo API and I need to get the emails which are created between some date. I know the response will have createdAt
, how can I query it while making the API call itself?
I tried this,
/rest/asset/v1/createdAtGreaterThan=2023-01-01T00:00:00Z &createdAtLessThan=2023-01-31T23:59:59Z
Also is there a way I can sort this result?
Maybe it's a little bit late to answer this, but Marketo provides the /rest/asset/v1/emails.json
endpoint to browse emails.
You can filter by a few fields, two of them are earliestUpdatedAt
and latestUpdatedAt
combined to get all the emails created in a date range.
Both dates need to be formatted into ISO-8601.
Here are some references: https://developers.marketo.com/rest-api/endpoint-reference/asset-endpoint-reference/#!/Emails/getEmailUsingGET