Contacts API

The various resources proposed by the API

The contact management API has several resources according to the desired functionality.

Of course, the basic resource is the contact resource. It provides the basic structure required for storing the various information about a person (last name, first name, mobile telephone number, email address, date of birth...).

The list resource allows contacts to be grouped together. The main interest is to establish distribution lists for sending campaigns, but these lists can also be used to deactivate a set of contacts.

As its name indicates, the statistic resource allows you to retrieve statistics on the number of contacts in its database or from a particular list and also the number of contacts that can be reached for an SMS, Email or voice sending.

The optout resource corresponds to blocking messages to a contact. Several reasons can result in blocking:

  • An unsubscription by the contact himself
  • The creator of the contact no longer wants any contact. This happens when a user already has an existing base with a list of unsubscribed persons and the user wants to synchronize it with this contact management API.
  • The email address is no valid (hardbounce)
  • The recipient has complained about an email and has declared it as SPAM

Finally, the field resource represents one of the contact attributes (last name, first name, mobile telephone number, …). This resource is used in the two following contexts:

  • It is possible to assign an alias to each contact attribute. These aliases are included when importing a contact file. This allows you to import contact files coming from a CRM export for which the column header would be different from those provided by default by this API.
  • This resource also contains statistics concerning the contact attributes:
    • The length that this contact attribute can have. This is useful when creating an SMS campaign with customized fields (as the length of the message is important)
    • The number of contacts for which this attribute is defined. Indeed, it is not necessary to use a customized field in a campaign if the latter is defined for only 10% of the contacts.