Skip to contentSkip to navigationSkip to topbar
Page toolsOn this page
Looking for more inspiration?Visit the

Download CSV


API Overview

api-overview page anchor

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
Authorizationstring
required
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>

Optional

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

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
});