...
...
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.
This section provides further details on the operations related to contacts .
Anchor |
---|
| createContact |
---|
| createContact |
---|
|
Creating a new contactThe createContact
operation creates a new contact.
Code Block |
---|
language | xml |
---|
title | createContact |
---|
|
<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> |
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.1form:
The optional subscription form ID to inherit those redirection settings.listDetails:
All the details of lists this contact belongs to.
Sample requestFollowing is a sample REST/JSON request that can be handled by the createContact
operation.
Code Block |
---|
language | xml |
---|
title | Sample 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"
}
} |
http://www.activecampaign.com/api/example.php?call=contact_add
Anchor |
---|
| getContactByEmail |
---|
| getContactByEmail |
---|
|
Retrieving a contact by e-mailThe getContactByEmail
operation retrieves a contact by e-mail.
Code Block |
---|
language | xml |
---|
title | getContactByEmail |
---|
|
<activecampaign.getContactByEmail>
<email>{$ctx:email}</email>
</activecampaign.getContactByEmail> |
email:
The e-mail address of the contact being looked up.
Following is a sample REST/JSON request that can be handled by the getContactByEmail
operation.
Code Block |
---|
language | xml |
---|
title | getContactByEmail |
---|
|
{
"apiUrl":"http://wso2.api-us1.com",
"apiKey":"eaae213ef1b8d842aba960423308c2e516d7704b95be8899fae897a1580a40e0a5cea198",
"apiOutput":"json",
"email":"wso2connector.abdera@gmail.com"
} |
http://www.activecampaign.com/api/example.php?call=contact_view_email
Anchor |
---|
| sampleconfiguration |
---|
| sampleconfiguration |
---|
|
Sample configurationFollowing 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.
...