Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
maxLevel3
typeflat

...

Overview

The following operations allow you to work with contacts. Click an operation name to see details on how to use it.

For a sample proxy service that illustrates how to work with contacts, see Sample configuration

Operation details

This section provides further details on the operations related to contacts .

Anchor
createContact
createContact
Creating a new contact

The createContact operation creates a new contact.

Code Block
languagexml
titlecreateContact
<activecampaign.createContact>
    <email>{$ctx:email}</email>
    <firstName>{$ctx:firstName}</firstName>
    <lastName>{$ctx:lastName}</lastName>
    <phone>{$ctx:phone}</phone>
    <orgName>{$ctx:orgName}</orgName>
    <tags>{$ctx:tags}</tags>
    <ip4>{$ctx:ip4}</ip4>
    <form>{$ctx:form}</form>
	<listDetails>{$ctx:listDetails}</listDetails>
</activecampaign.createContact>
Properties
  • email: The e-mail of the new contact.
  • firstName: The first name of the contact.
  • lastName: The last name of the contact.
  • phone: The telephone number of the contact.
  • orgName: The organization name (if it does not exist, this will create a new organization).
  • tags: Tags for this contact (comma-separated).
  • ip4: The IP address of the contact. Default: 127.0.0.1
  • form: The optional subscription form ID to inherit those redirection settings.
  • listDetails: All the details of lists this contact belongs to.
Anchor
request
request
Sample request

Following is a sample REST/JSON request that can be handled by the createContact operation.

Code Block
languagexml
titleSample Request for createContact
{
	"apiUrl":"http://wso2.api-us1.com",
	"apiKey":"eaae213ef1b8d842aba960423308c2e516d7704b95be8899fae897a1580a40e0a5cea198",
	"apiOutput":"json",
	"email":"wso2connector123.abdera@gmail.com",
	"firstName":"Randika",
	"lastName":"Rodrigo",
	"phone":"+942788087",
	"orgName":"Virtusa",
	"tags":"Tag Contact",
	"ip4":"192.22.210.125",
	"form":"14",
	"listDetails":{
	"p[1]":"1",
	"status[1]":"1",
	"noresponders[1]":"0",
	"sdate[1]":"2015-05-07 06:00:00",
	"instantresponders[1]":"0",
	"lastmessage[1]":"0",
	"field[1,0]":"Custom1 Value",
	"field[%CUSTOM2%,0]":"Custom2 Value"
				  }
}
Related ActiveCampaign documentation

http://www.activecampaign.com/api/example.php?call=contact_add

Anchor
getContactByEmail
getContactByEmail
Retrieving a contact by e-mail

The getContactByEmail operation retrieves a contact by e-mail.

Code Block
languagexml
titlegetContactByEmail
<activecampaign.getContactByEmail>
	<email>{$ctx:email}</email>
</activecampaign.getContactByEmail>
Properties
  • email: The e-mail address of the contact being looked up.
Sample request

Following is a sample REST/JSON request that can be handled by the getContactByEmail operation.

Code Block
languagexml
titlegetContactByEmail
{
	"apiUrl":"http://wso2.api-us1.com",
	"apiKey":"eaae213ef1b8d842aba960423308c2e516d7704b95be8899fae897a1580a40e0a5cea198",
	"apiOutput":"json",
	"email":"wso2connector.abdera@gmail.com"
}
Related ActiveCampaign documentation

http://www.activecampaign.com/api/example.php?call=contact_view_email

Anchor
sampleconfiguration
sampleconfiguration
Sample configuration

Following is a sample proxy service that illustrates how to connect to ActiveCampaign with the init operation and use the createContact operation. The sample request for this proxy can be found in the createContact sample request. You can use this sample as a template for using other operations in this category.

...