Before You Start
Before you begin, review Activetrail’s basic API calls, and make sure you’re comfortable making those basic calls.
Identify Contacts
We identify your contacts by the id or email lowercase so you can easily predict the API URL of a contact's data.
For example, to get the user 1234 ‘who has the email abc@123.com
, you can get the list contacts from the /contacts endpoint with the User id and get the id from the response or just add the id to the end point like this: /contacts/1234
Group members
To see if an email address is a member of your group, you’ll need your group ID and the email address or the contact id.
For the address, abc@123.com
, you’d make a GET request - to /groups/12345/members/12656565
.
If the call returns a 404 response, the contact does not exist. They may have been deleted, or they were never in your account at all.
If the call returns a 404 response, the contact isn’t a member of your group. They may have been deleted, or they were never in the group at all.
Add a member to a group
To add someone to your group, send a POST request to the Group Members endpoint: http://webapi.mymarketing.co.il/api/groups/{id}/members
. The request body should be a JSON object that has the member information you want to add, with is_do_not_mail and any other required list fields
{ "campaign_id": 1, "is_trigger_events": true, "first_name": "sample string 2", "last_name": "sample string 3", "email": "sample string 4", "anniversary": "sample string 5", "birthday": "sample string 6", "city": "sample string 7", "encryptedext1": "sample string 8", "encryptedext2": "sample string 9", "encryptedext3": "sample string 10", "encryptedext4": "sample string 11", "ext1": "sample string 12", "ext2": "sample string 13", "ext3": "sample string 14", "ext4": "sample string 15", "ext5": "sample string 16", "ext6": "sample string 17", "fax": "sample string 18", "phone1": "sample string 19", "phone2": "sample string 20", "street": "sample string 21", "zip_code": "sample string 22", "is_do_not_mail": false }
You won’t receive errors if the address is already on your list.
Update a contact in a group (does the same as update contact)
Use a PUT request to the address’s endpoint to update an address’s metadata. The body can be a JSON object with only the data you want to change.
For example, to update 123@abc.com
, make a PUT request to http://webapi.mymarketing.co.il/api/groups/{id}/members/12345678
with a JSON object as the body:
{ "campaign_id": 1, "is_trigger_events": true, "first_name": "sample string 2", "last_name": "sample string 3", "email": "sample string 4", "anniversary": "sample string 5", "birthday": "sample string 6", "city": "sample string 7", "encryptedext1": "sample string 8", "encryptedext2": "sample string 9", "encryptedext3": "sample string 10", "encryptedext4": "sample string 11", "ext1": "sample string 12", "ext2": "sample string 13", "ext3": "sample string 14", "ext4": "sample string 15", "ext5": "sample string 16", "ext6": "sample string 17", "fax": "sample string 18", "phone1": "sample string 19", "phone2": "sample string 20", "street": "sample string 21", "zip_code": "sample string 22", "is_do_not_mail": false }
You can include read-only fields like email_address with your PUT request, but they will be ignored. We pull an address’s most recent data with a GET request, change it, and give the entire JSON object back in a PUT request.
Remove a contact from a group
make a DELETE call to that Group member’s endpoint. http://webapi.mymarketing.co.il/api/groups/{id}/members/12345678