Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Purlem API

The Purlem API is organized around REST, uses JSON for serialization and HTTP basic authentication. The API allows for basic CRUD operations on campaigns, contacts and results.


You authenticate to the Purlem API by providing your User ID and API token in the request throught HTTP basic authentication. You can find both your User ID and API Token in your Purlem dashboard under My Account.

In curl, that looks like:

curl -u user:token


All URLs start with The path is prefixed with the the API version.

To make a request for all the results in a campaign, you'd append the campaign's index path to the base url to form something like /results/{CAMPAIGN ID}. In curl, that looks like:

curl -u user:token{CAMPAIGN ID}

To add,update or delete something, it's the same deal except you also have to POST the data. To add a contact it would look like:

curl -u user:token
  -X POST 
  --data "campaignID={CAMPAIGN ID}&firstName=Bob&lastName=Jones"

That's all!


All responses will use JSON for serialization of data. The response for adding a contact would be something like:

"timestamp":"2012-12-21 01:01:01",
  "ID":"{CONTACT ID}",
	"userID":"{USER ID}",
	"campaignID":"{CAMPAIGN ID}",


If there is a problem with your request you will receive 4xx error, along with JSON data describing the error. An error response may look like:

{"message":"Bad Authentication data","code":400}


You can perform up to 100 requests per 1 hour period for the same account.

Available Resources

Get Contact

/v1/contacts/{CONTACT ID}

curl -u user:token

Get By Contact


curl -u user:token

Get Many By Contact


curl -u user:token

Get Many Where Exist


curl -u user:token

Add Contact /v1/contacts/add

curl -u user:token -X POST --data "campaignID=1051&firstName=Bob&lastName=Jones

Update Contact


curl -u user:token -X POST --data "contactID=123&company=XYZCorp"

Delete Contact

/v1/contacts/delete/{CONTACT ID}

curl -u user:token -X POST

Get All Campaigns


curl -u user:token

Get All Campaign Contacts

/v1/campaigns/{CAMPAIGN ID}/contacts

curl -u user:token

Get All Campaign Contacts Where Exist

/v1/campaigns/{CAMPAIGN ID}/contacts_where_exists/{FIELD}

curl -u user:token

Get All Campaign Contacts Since

/v1/campaigns/{CAMPAIGN ID}/contacts/since/{MINUTES}

curl -u user:token

Get Campaign Fields

/v1/campaigns/{CAMPAIGN ID}/get_fields

curl -u user:token

Get Campaign

/v1/campaigns/{CAMPAIGN ID}

curl -u user:token

Add instantPURL Campaign


curl -u user:token -X POST --data "name=My-Campaign&template=default"

Add FTP Campaign


curl -u user:token -X POST --data "name=My-Campaign&template=default&url="

Update Campaign


curl -u user:token -X POST --data "name=New-Name&campaignID=1"

Delete Campaign

/v1/campaigns/delete/{CAMPAIGN ID}

curl -u user:token -X POST

Get Campaign's Results

/v1/results/{CAMPAIGN ID}

curl -u user:token

Get Campaign's Results Since

/v1/results/{CAMPAIGN ID}/since/{MINUTES}

curl -u user:token

Get Contact's Results

/v1/results/get_contact/{CONTACT ID}

curl -u user:token

Delete Result

/v1/results/delete/{RESULT ID}

curl -u user:token -X POST

Get All Clients


curl -u user:token

Get Client

/v1/campaigns/{CLIENT ID}

curl -u user:token

Add Client


curl -u user:token -X POST --data "name=ClientName&username=user&password=pass&planID=2"

Update Client


curl -u user:token -X POST --data "clientID=1name=ClientName&username=user&password=pass&planID=2"

Delete Client

/v1/clients/delete/{CLIENT ID}

curl -u user:token -X POST

Get Customfield

/v1/customfields/get/{CUSTOMFIELD ID}

curl -u user:token


No description, website, or topics provided.






No releases published


No packages published