====== API Contact Endpoints ======
The Contact Endpoints are used to modify Contacts within Sentori.
===== Add a Contact =====
This endpoint is used to add a new [[/contacts|Contact]] to the Sentori Account. If no [[/contact-fields|Contact Fields]] need to be set then the [[/contacts|Contact]] can be added using a GET request, when including [[/contact-fields|Contact Fields]] in a request then they most be in a POST body.
Note: The EmailAddress [[/contact-fields|Contact Field]] should not appear in the Add request body, add will fail if it doesn't match the request URI.
==== Endpoint ====
|URI| https://api.sentoriapp.com/v2.0/contact/add/email%40domain.com/|
|Method| POST or GET |
==== Request Body ====
Request body is only required if including [[/contact-fields|Contact Fields]]. The example below would add a new [[/contacts|Contact]] with the FirstName and LastName [[/contact-fields|Contact Fields]] being set.
|Example|{
"FirstName":"Joe",
"LastName":"Blogs"
}
|
===== Update a Contact =====
This endpoint is used to update an existing [[/contacts|Contacts]] [[/contact-fields|Contact Fields]] in the Sentori Account. \\
If updating the EmailAddress use the existing one in the URI and the new one in the request body.
==== Endpoint ====
|URI| https://api.sentoriapp.com/v2.0/contact/update/email%40domain.com/|
|Method| POST|
==== Request Body ====
Request body should contain the [[/contact-fields|Contact Fields]] to update. The below example updates the email address and first/last names.
|Example|{
"EmailAddress":"newaddress@domain.com",
"FirstName":"Joe",
"LastName":"Blogs"
}
|
===== Subscribe Contact to Mailing List =====
This endpoint is used to subscribe a [[/contacts|Contact]] to a [[/mailing-lists|Mailing List]].\\
You can find the [[/mailing-lists|Mailing List]] external IDs on the [[/mailing-lists|Mailing List]] page in Sentori.
==== Endpoint ====
|URI| https://api.sentoriapp.com/v2.0/contact/subscribe/email%40domain.com/MailingListExternalID/|
|Method| GET |
===== Unsubscribe Contact from Mailing List =====
This endpoint is used to unsubscribe a [[/contacts|Contact]] from a [[/mailing-lists|Mailing List]].\\
You can find the [[/mailing-lists|Mailing List]] external IDs on the [[/mailing-lists|Mailing List]] page in Sentori.
==== Endpoint ====
|URI| https://api.sentoriapp.com/v2.0/contact/unsubscribe/email%40domain.com/MailingListExternalID/|
|Method| GET |
===== Unsubscribe Contact =====
This endpoint is used to unsubscribe a [[/contacts|Contact]] from all [[/mailing-lists|Mailing Lists]] and add them to the [[/suppressed-contacts#suppression-list|Suppression List]].
==== Endpoint ====
|URI| https://api.sentoriapp.com/v2.0/contact/unsubscribe/email%40domain.com/|
|Method| GET |