V3 REFERENCE Contact Lists

/csvimport

A wrapper for the CSV importer

List csvimport resources available for this apikey, use a GET request. Alternatively, you may want to add one or more filters.

# list csvimport resources

curl -s -X GET \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/csvimport
Properties
Name Description
AliveAt Timestamp when the CSV import background job reported a status.
  • Read Only
  • [ Type TRFC3339DateTime ]
ContactsListID
OR
ContactsListALT
ContactsListID
ID reference to ContactsList
ContactsListALT
Value of the Address field of the related ContactsList resource
  • Mandatory
  • [ Type TContactsList ]
Count Number of contacts detected in the CSV file.
  • Read Only
  • [ Type LongInt ]
Current Number of processed contacts.
  • Read Only
  • [ Type LongInt ]
DataID ID of uploaded CSV data file.
  • Mandatory
  • [ Type Int64 ]
Errcount Number of errors encountered so far.
  • Read Only
  • [ Type LongInt ]
ErrTreshold Maximum number of errors that can occur before the job is aborted.
  • [ Type SmallInt ]
ID Unique ID of this CSV import file.
  • Read Only
  • [ Type Int64 ]
ImportOptions a string with a JSON structure describing the import options in effect.
  • [ Type AnsiString ]
JobEnd When the job was ended.
  • Read Only
  • [ Type TRFC3339DateTime ]
JobStart When the job was started.
  • Read Only
  • [ Type TRFC3339DateTime ]
Method Method to use when importing a list of contacts.
  • [ Type AnsiString ]
RequestAt Time when the job was registered.
  • Read Only
  • [ Type TRFC3339DateTime ]
Status Current status of the job. If set during POST, the only allowed value is 'Upload'. During PUT, the only allowed value is 'Abort'.
  • [ Type AnsiString ]
Filters

No filters are available for this resource.

Access a given csvimport resource, use a GET request, providing the csvimport's ID value.

# access the csvimport resource identified by $ID

curl -s -X GET \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/csvimport/$ID

    
    
Properties
Name Description
AliveAt Timestamp when the CSV import background job reported a status.
  • Read Only
  • [ Type TRFC3339DateTime ]
ContactsListID
OR
ContactsListALT
ContactsListID
ID reference to ContactsList
ContactsListALT
Value of the Address field of the related ContactsList resource
  • Mandatory
  • [ Type TContactsList ]
Count Number of contacts detected in the CSV file.
  • Read Only
  • [ Type LongInt ]
Current Number of processed contacts.
  • Read Only
  • [ Type LongInt ]
DataID ID of uploaded CSV data file.
  • Mandatory
  • [ Type Int64 ]
Errcount Number of errors encountered so far.
  • Read Only
  • [ Type LongInt ]
ErrTreshold Maximum number of errors that can occur before the job is aborted.
  • [ Type SmallInt ]
ID Unique ID of this CSV import file.
  • Read Only
  • [ Type Int64 ]
ImportOptions a string with a JSON structure describing the import options in effect.
  • [ Type AnsiString ]
JobEnd When the job was ended.
  • Read Only
  • [ Type TRFC3339DateTime ]
JobStart When the job was started.
  • Read Only
  • [ Type TRFC3339DateTime ]
Method Method to use when importing a list of contacts.
  • [ Type AnsiString ]
RequestAt Time when the job was registered.
  • Read Only
  • [ Type TRFC3339DateTime ]
Status Current status of the job. If set during POST, the only allowed value is 'Upload'. During PUT, the only allowed value is 'Abort'.
  • [ Type AnsiString ]

Add a new csvimport resource with a POST request.

# add a new csvimport resource, beware of the Read Only fields!

curl -s -X POST \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/csvimport \
-H 'Content-Type: application/json' \
-d '{"ContactsList": ...}'
Properties
Name Description
AliveAt Timestamp when the CSV import background job reported a status.
  • Read Only
  • [ Type TRFC3339DateTime ]
ContactsListID
OR
ContactsListALT
ContactsListID
ID reference to ContactsList
ContactsListALT
Value of the Address field of the related ContactsList resource
  • Mandatory
  • [ Type TContactsList ]
Count Number of contacts detected in the CSV file.
  • Read Only
  • [ Type LongInt ]
Current Number of processed contacts.
  • Read Only
  • [ Type LongInt ]
DataID ID of uploaded CSV data file.
  • Mandatory
  • [ Type Int64 ]
Errcount Number of errors encountered so far.
  • Read Only
  • [ Type LongInt ]
ErrTreshold Maximum number of errors that can occur before the job is aborted.
  • [ Type SmallInt ]
ID Unique ID of this CSV import file.
  • Read Only
  • [ Type Int64 ]
ImportOptions a string with a JSON structure describing the import options in effect.
  • [ Type AnsiString ]
JobEnd When the job was ended.
  • Read Only
  • [ Type TRFC3339DateTime ]
JobStart When the job was started.
  • Read Only
  • [ Type TRFC3339DateTime ]
Method Method to use when importing a list of contacts.
  • [ Type AnsiString ]
RequestAt Time when the job was registered.
  • Read Only
  • [ Type TRFC3339DateTime ]
Status Current status of the job. If set during POST, the only allowed value is 'Upload'. During PUT, the only allowed value is 'Abort'.
  • [ Type AnsiString ]

Update one specific csvimport resource with a PUT request, providing the csvimport's ID value. Be sure to include all the mandatory properties.

# update content of resource csvimport identified by ID $ID

curl -s -X PUT \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/csvimport/$ID \
-H 'Content-Type: application/json' \
-d '{"ContactsList": ...}'

    
Properties
Name Description
AliveAt Timestamp when the CSV import background job reported a status.
  • Read Only
  • [ Type TRFC3339DateTime ]
ContactsListID
OR
ContactsListALT
ContactsListID
ID reference to ContactsList
ContactsListALT
Value of the Address field of the related ContactsList resource
  • Mandatory
  • [ Type TContactsList ]
Count Number of contacts detected in the CSV file.
  • Read Only
  • [ Type LongInt ]
Current Number of processed contacts.
  • Read Only
  • [ Type LongInt ]
DataID ID of uploaded CSV data file.
  • Mandatory
  • [ Type Int64 ]
Errcount Number of errors encountered so far.
  • Read Only
  • [ Type LongInt ]
ErrTreshold Maximum number of errors that can occur before the job is aborted.
  • [ Type SmallInt ]
ID Unique ID of this CSV import file.
  • Read Only
  • [ Type Int64 ]
ImportOptions a string with a JSON structure describing the import options in effect.
  • [ Type AnsiString ]
JobEnd When the job was ended.
  • Read Only
  • [ Type TRFC3339DateTime ]
JobStart When the job was started.
  • Read Only
  • [ Type TRFC3339DateTime ]
Method Method to use when importing a list of contacts.
  • [ Type AnsiString ]
RequestAt Time when the job was registered.
  • Read Only
  • [ Type TRFC3339DateTime ]
Status Current status of the job. If set during POST, the only allowed value is 'Upload'. During PUT, the only allowed value is 'Abort'.
  • [ Type AnsiString ]