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 14:27]
dan
api:v2.0:contact [2017/07/24 14:15] (current)
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 Endpointif 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 requestwhen 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"​
 }</​code>​| }</​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 |