Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Import Contacts Status



Operation overview

operation-overview page anchor

GET/v3/marketing/contacts/imports/{id}

Base url: https://api.sendgrid.com

This endpoint can be used to check the status of a contact import job.

Use the job_id from the "Import Contacts," "Add or Update a Contact," or "Delete Contacts" endpoints as the id in the path parameter.

If there is an error with your PUT request, download the errors_url file and open it to view more details.

The job status field indicates whether the job is pending, completed, errored, or failed.

Pending means not started. Completed means finished without any errors. Errored means finished with some errors. Failed means finished with all errors, or the job was entirely unprocessable: for example, if you attempt to import file format we do not support.

The results object will have fields depending on the job type.

Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.


Authentication

authentication page anchor
Property nameTypeRequiredDescription
Authorizationstringrequired
Default: Bearer <<YOUR_API_KEY_HERE>>
Property nameTypeRequiredDescription
idstringrequired
200400401403404500
Schema
Property nameTypeRequiredDescriptionChild properties
idstring

The job ID.


statusstring

The job state. Allowed values: pending, completed, errored, or failed.


job_typestring

The job type. Allowed values: upsert, or delete.


resultsobject

Result map of the import job.


started_atstring

The ISO8601 timestamp when the job was created.


finished_atstring

The ISO8601 timestamp when the job was finished.

Import Contacts Status

import-contacts-status page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
curl

_19
const client = require('@sendgrid/client');
_19
client.setApiKey(process.env.SENDGRID_API_KEY);
_19
_19
const id = "ZGkrHSypTsudrGkmdpJJ";
_19
_19
const request = {
_19
url: `/v3/marketing/contacts/imports/${id}`,
_19
method: 'GET',
_19
_19
}
_19
_19
client.request(request)
_19
.then(([response, body]) => {
_19
console.log(response.statusCode);
_19
console.log(response.body);
_19
})
_19
.catch(error => {
_19
console.error(error);
_19
});


Rate this page: