V3 REFERENCE Contact Properties

/contacthistorydata

This resource can be used to examine the associated extra historical data of a contact.

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

# list contacthistorydata resources

curl -s -X GET \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/contacthistorydata
Properties
Name Description
ContactID
OR
ContactALT
ContactID
ID reference to Contact
ContactALT
Value of the Email field of the related Contact resource
  • [ Type TContact ]
CreatedAt Timestamp when the historical data was registered by Mailjet
  • [ Type TRFC3339DateTime ]
Data The data as a string.
  • [ Type AnsiString ]
ID ID of the data item.
  • Read Only
  • [ Type Int64 ]
Name Name of the history data item.
  • [ Type AnsiString ]
Filters
Name Description
Contact Only retrieve contacthistorydata resources for the specified contact.
  • [ Type Int64 ]
Last Is set to true, then only the last recorded value is returned. This can only be specified if Contact and Name are specified.
  • [ Type TBooleanFilter ]
MaxCreatedAt Only retrieve contacthistorydata resources for which CreatedAt is strictly less than the specified value.
  • [ Type TRFC3339DateTime ]
MinCreatedAt Only retrieve contacthistorydata resources for which CreatedAt is greater than or equal to the specified value.
  • [ Type TRFC3339DateTime ]
Name Only retrieve contacthistorydata resources for which Name equals the specified value.
  • [ Type AnsiString ]

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

# access the contacthistorydata resource identified by $ID

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

    
    
Properties
Name Description
ContactID
OR
ContactALT
ContactID
ID reference to Contact
ContactALT
Value of the Email field of the related Contact resource
  • [ Type TContact ]
CreatedAt Timestamp when the historical data was registered by Mailjet
  • [ Type TRFC3339DateTime ]
Data The data as a string.
  • [ Type AnsiString ]
ID ID of the data item.
  • Read Only
  • [ Type Int64 ]
Name Name of the history data item.
  • [ Type AnsiString ]

Add a new contacthistorydata resource with a POST request.

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

curl -s -X POST \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/contacthistorydata \
-H 'Content-Type: application/json' \
-d '{"Contact": ...}'
Properties
Name Description
ContactID
OR
ContactALT
ContactID
ID reference to Contact
ContactALT
Value of the Email field of the related Contact resource
  • [ Type TContact ]
CreatedAt Timestamp when the historical data was registered by Mailjet
  • [ Type TRFC3339DateTime ]
Data The data as a string.
  • [ Type AnsiString ]
ID ID of the data item.
  • Read Only
  • [ Type Int64 ]
Name Name of the history data item.
  • [ Type AnsiString ]

Remove one given contacthistorydata resource with a DELETE request, providing the contacthistorydata's ID value.

# delete resource contacthistorydata with ID $ID

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