Create Mailing List Import
POST/print-mail/v1/mailing_list_imports
Create a new mailing list import.
Initiates the import process for a contact list file. The import enters the
validating status while contacts are processed and verified.
Body ParametersJSON
description: optional string
An optional string describing this resource. Will be visible in the API and the dashboard.
receiverMergeVariableMapping: optional map[string]
Optional mapping of columns for receiver merge variables.
Create Mailing List Import
curl https://api.postgrid.com/print-mail/v1/mailing_list_imports \
-H 'Content-Type: application/json' \
-H "X-API-Key: $POSTGRID_PRINT_MAIL_API_KEY" \
-d '{
"file": "https://signed-upload-url.csv",
"fileType": "csv",
"receiverAddressMapping": {
"description": "Description",
"firstName": "First Name",
"lastName": "Last Name",
"email": "Email",
"addressLine1": "Address",
"city": "City",
"postalOrZip": "Postal Code",
"provinceOrState": "State",
"countryCode": "Country"
}
}'{
"id": "mailing_list_import_123",
"live": false,
"createdAt": "2023-10-27T10:00:00Z",
"updatedAt": "2023-10-27T10:05:00Z",
"status": "completed",
"reportURL": "https://signed-report-url.csv",
"errors": [],
"notes": [],
"validRowCount": 100,
"invalidRowCount": 0,
"receiverStatusCount": {
"verifiedCount": 100,
"correctedCount": 0,
"failedCount": 0
},
"senderStatusCount": {
"verifiedCount": 100,
"correctedCount": 0,
"failedCount": 0
},
"organization": "org_123",
"file": {
"fileType": "csv",
"receiverAddressMapping": {
"description": "Description",
"firstName": "First Name",
"lastName": "Last Name",
"email": "Email",
"addressLine1": "Address",
"addressLine2": "Address Line 2",
"city": "City",
"postalOrZip": "Postal Code",
"provinceOrState": "Province",
"countryCode": "Country"
},
"url": "https://signed.url/import_123.csv"
}
}Returns Examples
{
"id": "mailing_list_import_123",
"live": false,
"createdAt": "2023-10-27T10:00:00Z",
"updatedAt": "2023-10-27T10:05:00Z",
"status": "completed",
"reportURL": "https://signed-report-url.csv",
"errors": [],
"notes": [],
"validRowCount": 100,
"invalidRowCount": 0,
"receiverStatusCount": {
"verifiedCount": 100,
"correctedCount": 0,
"failedCount": 0
},
"senderStatusCount": {
"verifiedCount": 100,
"correctedCount": 0,
"failedCount": 0
},
"organization": "org_123",
"file": {
"fileType": "csv",
"receiverAddressMapping": {
"description": "Description",
"firstName": "First Name",
"lastName": "Last Name",
"email": "Email",
"addressLine1": "Address",
"addressLine2": "Address Line 2",
"city": "City",
"postalOrZip": "Postal Code",
"provinceOrState": "Province",
"countryCode": "Country"
},
"url": "https://signed.url/import_123.csv"
}
}