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.
Get Single Send Click Tracking Stats by ID
GET /v3/marketing/stats/singlesends/{id}/links
Base url: https://api.sendgrid.com
This endpoint lets you retrieve click-tracking stats for one Single Send.
The stats returned list the URLs embedded in the specified Single Send and the number of clicks each one received.
Responses are paginated. You can limit the number of responses returned per batch using the page_size
query string parameter. The default is 50, but you specify a value between 1 and 100.
You can retrieve a specific page of responses with the page_token
query string parameter.
Authentication
- API Key
Headers
Path Parameters
The ID of the Event Webhook you want to retrieve.
default: NoneQuery String
The number of elements you want returned on each page.
default: 50The stats endpoints are paginated. To get the next page, call the passed _metadata.next
URL. If _metadata.prev
doesn't exist, you're at the first page. Similarly, if _metadata.next
is not present, you're at the last page.
A/B Single Sends have multiple variation IDs and phase IDs. Including these additional fields allows further granularity of stats by these fields.
default: NoneResponses
This is the index of the link's location in the email contents.
This is the URL of the link clicked. If {{custom_fields}}
are part of the URL, they will be included.
This is the location of the link clicked in each Single Send A/B variation, or in the Single Send itself if there are no variations. Links are numbered from the top down; the topmost link is index 0
.
This is the A/B variation of the Single Send stat returned. It is set to "all"
if the ab_variation
query parameter was not set in the request and group_by
doesn't contain ab_variation
.
This is the A/B phase of the Single Send stat returned. If the ab_phase
query parameter was not provided, it will return "all"
.
the number of clicks on this particular link
minimum: 1The URL of the previous page of results. If this field isn't present, you're at the start of the list.
format: uriThe URL of the current page of results.
format: uriThe URL of the next page of results. If this field isn't present, you're at the end of the list.
format: uriThe number of items in the entire list, i.e., across all pages.
the error message
the field that generated the error
helper text or docs for troubleshooting
{
"errors": [
{
"field": "field_name",
"message": "error message"
}
]
}
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.