You are viewing the Legacy Marketing Campaigns API reference. For guidance migrating to the current version of Marketing Campaigns, see Migrating from Legacy Marketing Campaigns
You can use this endpoint only after your system has been upgraded. Learn more about the updates to the SendGrid Legacy API.
You can export recipients, get all existing exports, or check the export status using the /v3/contactdb/exports
and /v3/contactdb/exports/{id}
endpoints.
This endpoint can be used to check the status of a recipient export job.
To use this call, you will need the id
from the "Export Recipients" call.
If you would like to download a list, take the id
that is returned from the "Export Recipients" endpoint and make an API request here to get the urls
. Once you have the list of URLs, make a GET
request on each URL to download your CSV file(s).
Twilio SendGrid recommends exporting your recipients regularly as a backup to avoid issues or lost data.
Bearer <<YOUR_API_KEY_HERE>>
Optional
Optional
The export job's status. Allowed values: pending
, ready
, or failure
.
pending
ready
failure
Optional
The ISO8601 timestamp when the export was begun.
Optional
The ISO8601 timestamp when the export was updated.
Optional
The ISO8601 timestamp when the export was completed.
Optional
The ISO8601 timestamp when the exported file on S3 will expire.
Optional
One or more download URLs for the recipient file if the status is ready
.
Optional
A human readable message if the status is failure
.
Optional
Optional
The total number of exported recipients.
1const client = require("@sendgrid/client");2client.setApiKey(process.env.SENDGRID_API_KEY);34const id = "id";56const request = {7url: `/v3/contactdb/exports/${id}`,8method: "GET",9};1011client12.request(request)13.then(([response, body]) => {14console.log(response.statusCode);15console.log(response.body);16})17.catch((error) => {18console.error(error);19});