This is an old revision of the document!


API Contact Endpoints

The Contact Endpoints are used to modify Contacts within Sentori.

Add a Contact

This endpoint is used to add a new Contact to the Sentori Account. If no Contact Fields need to be set then the Contact can be added using a GET request, when including Contact Fields in a request then they must be in a POST request body.

Note: The EmailAddress Contact Field should not appear in the Add request body, and will fail if it doesn't match the request URI.

Endpoint

URI https://api.sentoriapp.com/v2.0/contact/add/joe%40example.sentoriapp.com/
Method GET, or POST if sending additional fields

Request Body

Request body is only required if including Contact Fields. The example below would add a new Contact with the FirstName and LastName Contact Fields being set.

Example
{
    "FirstName":"Joe",
    "LastName":"Bloggs"
}

Update a Contact

This endpoint is used to update an existing Contact's Contact Fields in the Sentori Account.
If updating the EmailAddress use the existing one in the URI (and URL encode it) and the new one in the request body.

Endpoint

URI https://api.sentoriapp.com/v2.0/contact/update/joe%40example.sentoriapp.com/
Method POST

Request Body

Request body should contain the Contact Fields to update. The below example updates the email address and first/last names.

Example
{
   "EmailAddress":"joe@example.sentoriapp.com",
    "FirstName":"Joe",
    "LastName":"Bloggs"
}

Subscribe Contact to Mailing List

This endpoint is used to subscribe a Contact to a Mailing List.
You can find the Mailing List external IDs on the Mailing List page in Sentori.

Endpoint

URI https://api.sentoriapp.com/v2.0/contact/subscribe/joe%40example.sentoriapp.com/MailingListExternalID/
Method GET

Unsubscribe Contact from Mailing List

This endpoint is used to unsubscribe a Contact from a Mailing List.
You can find the Mailing List external IDs on the Mailing List page in Sentori.

Endpoint

URI https://api.sentoriapp.com/v2.0/contact/unsubscribe/joe%40example.sentoriapp.com/MailingListExternalID/
Method GET

Unsubscribe Contact

This endpoint is used to unsubscribe a Contact from all Mailing Lists and add them to the Suppression List.

If no Contact exists for the Email Address, it'll simply be added to the Account's Suppression List.

Endpoint

URI https://api.sentoriapp.com/v2.0/contact/unsubscribe/joe%40example.sentoriapp.com/
Method GET

Import Contacts

This endpoint is used to add & update many Contacts to a Sentori Account, when imported a new Upload Group will appear in the Sentori Account.

Endpoint

URI https://api.sentoriapp.com/v2.0/contact/import/
Method POST

Request Body

Field TypeRequiredDescription
Contactsarraytrue Array of the Contacts to be included in the import. Must include the Email Address.
Descriptionstringfalse Will be the description of the created Upload Group.
Namestringfalse Will be the name of the created Upload Group.
Example
{
"Name":"My API Import",
"Description":"This Upload Group was created by an API Import",
"Contacts":[
{ "EmailAddress":"contact1@example.sentoriapp.com","FirstName":"Joe"},
{ "EmailAddress":"contact2@example.sentoriapp.com","FirstName":"Mary"},
{ "EmailAddress":"contact3@example.sentoriapp.com","FirstName":"John"},
{ "EmailAddress":"contact4@example.sentoriapp.com","FirstName":"Jane"}
]
}

Response

Field TypeDescription
CreatedContactsint Number of new Contacts created.
UpdatedContactsint Number of existing Contacts who where updated.
InvalidEmailAddressesint Number of Contacts who couldn't be Imported as the Email Addresses weren't valid.
IgnoredAsSuppressedint Number of Contacts who weren't Imported as they are already Suppressed.
IgnoredAsDuplicateint Number of Contacts who weren't Imported as they where duplicated in the request.
IgnoredAsRoleBasedint Number of Contacts who weren't Imported as they are role based.
UploadGroupIDint ID of the Upload Group created by this Import.
Example
{"CreatedContacts":4,"UpdatedContacts":2,"InvalidEmailAddresses":1,"IgnoredAsSuppressed":0,"IgnoredAsDuplicate":0,"IgnoredAsRoleBased":1,"UploadGroupID":1}

Import Contacts, Attach to Draft Email

This endpoint is used to attach an Upload Group to a Draft Email.

Endpoint

URI https://api.sentoriapp.com/v2.0/contact/import/{{UploadGroupID}}/attach/{{ExternalID}}
Method GET