Menu

Expand
Rate this page:

Marketing Campaign Stats

The Marketing Campaigns Stats endpoints allow you to retrieve stats for both Automations and Single Sends.

Note: These endpoints provide stats for Marketing Campaigns only. For stats related to event tracking, please see the Stats section under Event Tracking below.

Export Automation Stats

GET /v3/marketing/stats/automations/export

Base url: https://api.sendgrid.com

This endpoint allows you to export Automation stats as CSV data.

You can specify one Automation or many: include as many Automation IDs as you need, separating them with commas, as the value of the ids query string paramter.

The data is returned as plain text response but in CSV format, so your application making the call can present the information in whatever way is most appropriate, or just save the data as a .csv file.

Authentication

  • API Key

Headers

Authorization
string
default: Bearer <<YOUR_API_KEY_HERE>>
required

Query String

ids
array

The IDs of Automations for which to export stats.

default: None
timezone
string

The IANA Area/Region string representing the timezone in which the stats are to be presented; i.e. "America/Chicago". This parameter changes the timezone format only; it does not alter which stats are returned.

default: UTC

Responses

string

CSV data

object
errors
array[object]
message
string

the error message

field
string or null

the field that generated the error

help
object

helper text or docs for troubleshooting

id
string
{
  "errors": [
    {
      "field": "field_name",
      "message": "error message"
    }
  ]
}
        
        
        
        Rate this page:

        Need some help?

        We all do sometimes. Get help now from the Twilio SendGrid Support Team.

        Running into a coding hurdle? Lean on the wisdom of the crowd by browsing the SendGrid tag on Stack Overflow or visiting Twilio's Stack Overflow Collective.

              
              
              

              Thank you for your feedback!

              Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

              Sending your feedback...
              🎉 Thank you for your feedback!
              Something went wrong. Please try again.

              Thanks for your feedback!

              thanks-feedback-gif