Contact Properties

Contact properties allow you to store details about your subscribers - e.g. a name, age or location. They allow you to personalize the content of the emails you are sending, and help you with targeting a specific segment of customers within a contact list.

Use the resources below to manage the available contact properties (/contactmetadata) and the values of those properties for each contact (/contactdata).

post

Create the contact property values relating to a specific contact

post

Create a new contact property

post

/contactdata

Create extra static data for a contact by using your already created `/contactmetadata` objects (contact properties) and assigning values to them for the specific contact ID. Any already existing property values will be overwritten, if a new value is set in the payload.

Full API path

https://api.mailjet.com/v3/REST/contactdata

Body parameters

ContactID

integer

Unique numeric ID for this contact.

Data

array

A JSON array containing contact properties and their values. The properties must have been created beforehand (refer to `/contactmetadata`).

Name

string

The name of the contact property.

Value

string

The value of the contact property for this contact. The type of values accepted depends on the respective contactmetadata's type.

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

ContactID

integer

Unique numeric ID for this contact.

Data

array

A JSON array containing contact properties and their values. The properties must have been created beforehand (refer to /contactmetadata).

ID

integer

Unique numeric ID for this contact's Data object. ID value will always equal the value of ContactID.

Total

integer

post

/contactmetadata

Create a new contact property. Select its name and data type, then use it to assign property values for contacts of your choice (with `/contactdata`).

Full API path

https://api.mailjet.com/v3/REST/contactmetadata

Body parameters

Datatype

string

Indicates the type of data accepted for this contact property:

  • str - string
  • int - integer
  • float - float / number
  • bool - boolean
  • datetime - datetime (Unix Timestamp or RFC 3339)

Default value: str

Name

string

Name of the contact property. The name must be unique for the respective namespace.

NameSpace

string

Indicates the namespace of this contact property:

  • static - Can keep only 1 value. Each change to the value of the property for a contact overwrites the previously selected value. The values are saved in a contactdata object.
  • historic - Each change to the value of the property creates a record in a new contacthistorydata object, saving the property value and a timestamp of when it was submitted.

Default value: static

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

Datatype

string

Indicates the type of data accepted for this contact property:

  • str - string
  • int - integer
  • float - float / number
  • bool - boolean
  • datetime - datetime (Unix Timestamp or RFC 3339)

Default value: str

ID

integer

Unique numeric ID for the contact property.

Name

string

Name of the contact property. The name must be unique for the respective namespace.

NameSpace

string

Indicates the namespace of this contact property:

  • static - Can keep only 1 value. Each change to the value of the property for a contact overwrites the previously selected value. The values are saved in a contactdata object.
  • historic - Each change to the value of the property creates a record in a new contacthistorydata object, saving the property value and a timestamp of when it was submitted.

Default value: static

Total

integer