Skip to contentSkip to navigationSkip to topbar
On this page

Download CSV



API Overview

api-overview page anchor

You must purchase additional email activity history(link takes you to an external page) to gain access to the Email Activity Feed API.

The Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages.

Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them.

See "Getting Started with the Email Activity Feed API" for help building queries and working with the API.

You can also work with email activity in the Activity section of the Twilio SendGrid App(link takes you to an external page).


GET/v3/messages/download/{download_uuid}

Base url: https://api.sendgrid.com (The Twilio SendGrid v3 API)

This endpoint will return a presigned URL that can be used to download the CSV that was requested from the "Request a CSV" endpoint.


Authentication

authentication page anchor
Property nameTypeRequiredDescription
Authorizationstringrequired
Default: Bearer <<YOUR_API_KEY_HERE>>
Property nameTypeRequiredDescription
download_uuidstring<uuid>required

UUID used to locate the download csv request entry in the DB.

This is the UUID provided in the email sent to the user when their csv file is ready to download

200404500
SchemaExample
Property nameTypeRequiredDescriptionChild properties
presigned_urlstring<uri>

A signed link that will allow you to download the CSV file requested by the Request a CSV endpoint.


csvstring

Returns the aws signed link to the csv file which mako UI should perform a get on to trigger the csv download for the user

Pattern: ^((http[s]?|ftp):\/)?\/?([^:\/\s]+)((\/\w+)*\/)([\w\-\.]+[^#?\s]+)(.*)?(#[\w\-]+)?$Min length: 5
Download CSVLink to code sample: Download CSV
1
const client = require("@sendgrid/client");
2
client.setApiKey(process.env.SENDGRID_API_KEY);
3
4
const download_uuid = "f15982c1-a82c-4e87-a6b2-a4a63b4b7644";
5
6
const request = {
7
url: `/v3/messages/download/${download_uuid}`,
8
method: "GET",
9
};
10
11
client
12
.request(request)
13
.then(([response, body]) => {
14
console.log(response.statusCode);
15
console.log(response.body);
16
})
17
.catch((error) => {
18
console.error(error);
19
});

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.