This endpoint can be used to check the status of a contact export job.
To use this call, you will need the id
from the "Export Contacts" call.
If you would like to download a list, take the id
that is returned from the "Export Contacts" 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 contacts regularly as a backup to avoid issues or lost data.
Bearer <<YOUR_API_KEY_HERE>>
The export job's status. Allowed values: pending
, ready
, or failure
.
pending
ready
failure
The ISO8601 timestamp when the export was begun.
The ISO8601 timestamp when the export was updated.
The ISO8601 timestamp when the export was completed.
The ISO8601 timestamp when the exported file on S3 will expire.
One or more download URLs for the contact file if the status is ready
.
A human readable message if the status is failure
.
The total number of exported contacts.
1const client = require('@sendgrid/client');2client.setApiKey(process.env.SENDGRID_API_KEY);34const id = "ZGkrHSypTsudrGkmdpJJ";56const request = {7url: `/v3/marketing/contacts/exports/${id}`,8method: 'GET',910}1112client.request(request)13.then(([response, body]) => {14console.log(response.statusCode);15console.log(response.body);16})17.catch(error => {18console.error(error);19});