Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
api:v2.0:contact [2015/01/16 10:19]
dan
api:v2.0:contact [2017/07/24 14:15] (current)
Line 1: Line 1:
-====== API v2.0 Contact Endpoints ======+====== API Contact Endpoints ======
  
-  * [[api:v2.0:contact:add|Add]] +The Contact Endpoints are used to modify Contacts within Sentori. 
-  ​* ​[[api:v2.0:contact:update|Update]] +===== Add a Contact ===== 
-  ​* ​[[api:v2.0:contact:subscribe|Subscribe]] + 
-  ​* ​[[api:v2.0:contact:unsubscribe|Unsubscribe]]+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.  
 + 
 +NoteThe 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| <​nowiki>​https://​api.sentoriapp.com/​v2.0/contact/add/​email%40domain.com/</​nowiki>​| 
 +|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|<​code javascript>​{ 
 +    "​FirstName":"​Joe",​ 
 +    "​LastName":"​Blogs"​ 
 +}</​code>​| 
 + 
 + 
 +===== 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| <​nowiki>​https://​api.sentoriapp.com/​v2.0/contact/update/​email%40domain.com/</​nowiki>​| 
 +|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|<​code javascript>​{ 
 +   "​EmailAddress":"​newaddress@domain.com",​ 
 +    "​FirstName":"​Joe",​ 
 +    "​LastName":"​Blogs"​ 
 +}</​code>​| 
 + 
 + 
 +===== 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| <​nowiki>​https://​api.sentoriapp.com/​v2.0/contact/subscribe/​email%40domain.com/​MailingListExternalID/</​nowiki>​| 
 +|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| <​nowiki>​https://​api.sentoriapp.com/​v2.0/contact/unsubscribe/​email%40domain.com/​MailingListExternalID/</​nowiki>​| 
 +|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| <​nowiki>​https://​api.sentoriapp.com/​v2.0/​contact/​unsubscribe/​email%40domain.com/</​nowiki>​| 
 +|Method| GET |