This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
api:v2.0:contact [2015/01/16 14:29] Daniel Longworth |
api:v2.0:contact [2015/01/21 12:57] (current) Daniel Longworth |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== API Contact Endpoints ====== | ====== API Contact Endpoints ====== | ||
+ | |||
+ | The Contact Endpoints are used to modify Contacts within Sentori. | ||
===== Add a Contact ===== | ===== Add a Contact ===== | ||
- | This API Endpoint is used to add a new Contact to the Sentori Account. If no Contact Fields are included in the add you can use GET on this Endpoint, if including Contact Fields then you must use POST. | + | 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 ==== | ==== Endpoint ==== | ||
Line 11: | Line 15: | ||
==== Request Body ==== | ==== 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. | + | 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|<code>{ | + | |Example|<code javascript>{ |
"FirstName":"Joe", | "FirstName":"Joe", | ||
"LastName":"Blogs" | "LastName":"Blogs" | ||
Line 21: | Line 25: | ||
===== Update a Contact ===== | ===== Update a Contact ===== | ||
- | This API Endpoint is used to add a update an existing Contact in the Sentori Account. | + | 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 ==== | ==== Endpoint ==== | ||
Line 30: | Line 35: | ||
==== Request Body ==== | ==== Request Body ==== | ||
- | Request body should contain the Contact Fields to update. The below example updates the email address and first/last names. | + | Request body should contain the [[/contact-fields|Contact Fields]] to update. The below example updates the email address and first/last names. |
- | |Example|<code>{ | + | |Example|<code javascript>{ |
"EmailAddress":"newaddress@domain.com", | "EmailAddress":"newaddress@domain.com", | ||
"FirstName":"Joe", | "FirstName":"Joe", | ||
Line 39: | Line 44: | ||
- | ===== Subscribe a Contact ===== | + | ===== Subscribe Contact to Mailing List ===== |
- | This API Endpoint is used to add a Contact to a Mailing List. You can find the Mailing List external IDs on the Mailing List page in Sentori. | + | 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 ==== | ==== Endpoint ==== | ||
- | |URI| <nowiki>https://api.sentoriapp.com/v2.0/contact/subscribe/email%40domain.com/MailingListExternalID</nowiki>| | + | |URI| <nowiki>https://api.sentoriapp.com/v2.0/contact/subscribe/email%40domain.com/MailingListExternalID/</nowiki>| |
|Method| GET | | |Method| GET | | ||
- | ===== Unsubscribe a Contact ===== | + | ===== Unsubscribe Contact from Mailing List ===== |
- | This API Endpoint is used to remove a Contact from a Mailing List or to remove from all Mailing Lists and suppress the Contact. You can find the Mailing List external IDs on the Mailing List page in Sentori. | + | 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 (Unsubscribe from Mailing List) ==== | + | ==== Endpoint ==== |
|URI| <nowiki>https://api.sentoriapp.com/v2.0/contact/unsubscribe/email%40domain.com/MailingListExternalID/</nowiki>| | |URI| <nowiki>https://api.sentoriapp.com/v2.0/contact/unsubscribe/email%40domain.com/MailingListExternalID/</nowiki>| | ||
|Method| GET | | |Method| GET | | ||
- | ==== Endpoint (Unsubscribe from everything) ==== | + | ===== 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| <nowiki>https://api.sentoriapp.com/v2.0/contact/unsubscribe/email%40domain.com/</nowiki>| | |URI| <nowiki>https://api.sentoriapp.com/v2.0/contact/unsubscribe/email%40domain.com/</nowiki>| | ||
|Method| GET | | |Method| GET | |