Contacts (developers)

Santeri

Last Update 6 maanden geleden

Contacts can be used for storing information about your customers or employees. You can add contacts to different lists. You can send survey invitations to lists and track individual contacts answers.

Contact object 

Attributes:

id string 

Unique identifier for the object.


email string

Contact email address. Requires a valid email.


eid string

External identifier, use your CRM/ERP contact identifier to 

sync data back to your system


name string

Contact full name, first name and last name


phone string

Contact phone number with area code.


company string

Contact company name.


type string

Type of contact. Allowed values: customer, employee


status string

Deliverability status of the contact. Allowed values: unsubscribed, unapproved_country_code, missing_contact_info, error, complaint, bounce, active. If status is other than active no new messages can be sent to the contact.


field_YOURFIELDNAME string (optional)

Any number of custom fields can be added. Custom fields need to be added to Trustmary before they can be used.


created_at ISO 8601 with timezone

Time contact was created.


updated_at ISO 8601 with timezone

Time of last action performed on the contact object.


deleted_at ISO 8601 with timezone or null

If contact was deleted, time of the last deletion.

 Example

Getting contacts

Query parameters:

email string (optional) 

Contact email address. If an email address is given, it will return an array with one contact_object, with corresponding email.


offset integer (optional)

This enpoint giveS a maximum of 1000 contacts per request. To request the next 1000 contacts, give offset parameter with value 1000, after that 2000 etc.

Returning

Creating a Contact

Body attributes:

email string

Contact email address. Requires a valid email.


name string (optional)

Contact name.


eid string (optional)

External identifier, use your CRM/ERP contact identifier to sync data back to your system.


name string (optional)

Contact full name, first name and last name


phone string (optional)

Contact phone number with area code.


company string (optional)

Contact company name.


field_YOURFIELDNAME string (optional)

Any number of custom fields can be added. Custom fields need to be added to Trustmary before they can be used.


type string (optional)

Type of contact. Allowed values: customer, employee (will default to customer)


addToLists array (optional)

Array of list ids. You can get available list IDs from the app, by opening a list and scrolling down to the bottom where an ID field is located. A list will not be updated if the contact has been added to it earlier.

Example

Returning

Attributes:

contact contact_object

Contains the created/updated contact object.


action string

If the email address was unique action will be 

IMPORT_CREATE, otherwise corresponding contact was updated and the action will be IMPORT_UPDATE.


listUpdate integer

Number of lists that the contact was added to. If the contact is already on a list, it will not be updated.

Example 

Deleting a Contact

Was this article helpful?

0 out of 0 liked this article

Still need help? Message Us