API Contacts

Updated on: January 23, 2017 Category: API

Contacts API Calls

There are currently 9 REST methods for viewing and managing your contacts.

API Endpoint

https://api.robly.com/

Note
As with all API methods, the api_key and api_id paramaters are required for all methods.


API Actions:

  • View Contacts (show)
  • Search Contacts (search)
  • Add Contact to a List (add_sub_list)
  • Remove Contact from a List (remove_sub_list)
  • Update Contacts Details (update_contact)
  • Update Full Contact Details (update_full_contact)
  • Unsubscribe (unsubscribe)
  • Delete (delete)
  • Resubscribe (resubscribe)
  • Member Exists in List (exists_in_sub_list)

View Contacts

This method will display contact details paginating over your entire list. There are optional parameters for viewing unsubscribed, subscribed, and deleted contacts as well as including all contact details and their sub lists. By default, 25 contacts will be returned with the API call. You can request up to 100 contacts per call and page through the results using the ‘offset’ parameter.

/api/v1/contacts/show?api_key=api_key&api_id=api_id [GET]

Optional Params: is_subscribed [true, false], is_unsubscribed [true, false], is_deleted [true, false], include_sub_lists [true, false], include_fields [true, false], limit [1-100], offset [0+], updated_since [epoch time]

example
Example API call (GET)
https://api.robly.com/api/v1/contacts/show?api_id=8ec55ecb23a8facac6280e84be513fee&api_key=eb81bd1f0ad28b0a

JSON Output:[{"member":{"id":11735245,"email":"user_123@newemail.com","is_subscribed":true,"is_deleted":false,"subscription_date":"2014-07-07T23:22:30-04:00","sign_up_source":"List Import","created_at":"2014-07-07T23:22:30-04:00","updated_at":"2014-07-07T23:22:30-04:00"}},{"member":{"id":11735244,"email":"user_234@newemail.com","is_subscribed":true,"is_deleted":false,"subscription_date":"2014-07-07T23:20:33-04:00","sign_up_source":"Subscribed","created_at":"2014-07-07T23:20:07-04:00","updated_at":"2014-07-07T23:21:11-04:00"}},{"member":{"id":11801345,"email":"user_345@newemail.com","is_subscribed":true,"is_deleted":false,"subscription_date":"2014-07-08T14:13:22-04:00","sign_up_source":"API","created_at":"2014-07-08T14:13:22-04:00","updated_at":"2014-07-08T14:13:22-04:00"}},{"member":{"id":11735220,"email":"user_456@newemail.com","is_subscribed":true,"is_deleted":false,"subscription_date":"2014-07-07T23:16:14-04:00","sign_up_source":"List Import","created_at":"2014-07-07T23:16:14-04:00","updated_at":"2014-07-07T23:16:14-04:00"}}]

Search Contacts

/api/v1/contacts/search?api_key=api_key&api_id=api_id [GET]

Optional Params: member_id or email, include_fields [true, false], include_sub_lists[true, false]

example
Example API call (GET)
https://api.robly.com/api/v1/contacts/search?api_id=8ec55ecb23a8facac6280e84be513fee&api_key=eb81bd1f0ad28b0a&email=user@newemail.com

JSON Output:{"member":{"id":11801345,"email":"user@newemail.com","is_subscribed":true,"is_deleted":false,"subscription_date":"2014-07-08T14:13:22-04:00","sign_up_source":"API","created_at":"2014-07-08T14:13:22-04:00","updated_at":"2014-07-08T14:13:22-04:00"}}

Remove Sub List from a Contact

/api/v1/contacts/remove_sub_list?api_key=api_key&api_id=api_id&member_id=member_id&sub_list_id=sub_list_id [POST]

Required Params: member_id or email, sub_list_id

example
Example API call (POST)
https://api.robly.com/api/v1/contacts/remove_sub_list?api_id=8ec55ecb23a8facac6280e84be513fee&api_key=eb81bd1f0ad28b0a&member_id=27384732&sub_list_id=75843

JSON Output:{"successful":true,"message":"Member removes from sub list."}

Add Sub List to a Contact

/api/v1/contacts/add_sub_list?api_key=api_key&api_id=api_id&member_id=member_id&sub_list_id=sub_list_id [POST]

Required Params: member_id or email, sub_list_id

Optional Parameter: include_autoresponder=true

This optional param will trigger any autoresponders that match the criteria for this newly subscribed contact into the sub list.

example
Example API call (POST)
https://api.robly.com/api/v1/contacts/add_sub_list?api_id=8ec55ecb23a8facac6280e84be513fee&api_key=eb81bd1f0ad28b0a&member_id=27384732&sub_list_id=75843

JSON Output:{"successful":true,"message":"Member has been added to that sub list."}

Update a Contact

/api/v1/contacts/update_contact?api_key=api_key&api_id=api_id [POST]

Required Params: member_id or email, detail_id[], detail_value[]

example

Example - first name & shoe size (POST)
https://api.robly.com/api/v1/contacts/update_contact?api_id=8ec55ecb23a8facac6280e84be513fee&api_key=eb81bd1f0ad28b0a&member_id=84938493&detail_id[]=172833&detail_value[]=Smith&detail_id[]=292813&detail_value[]=11

JSON Output:{"successful":true,"message":"Member updated."}


Update Full Contact Details – including Sub Lists

/api/v1/contacts/update_full_contact?api_key=api_key&api_id=api_id [POST]

Required Params: member_id or email
Optional Params: sub_lists[], remove_other_sub_lists[true, false], remove_from_lists[], include_autoresponder=true

The ‘include_autoresponder’ optional param will trigger any autoresponders that match the criteria for this contact if they were for example subscribed to a new list.

example
Example - first name & sub lists (POST)
https://api.robly.com/api/v1/contacts/update_full_contact?api_id=8ec55ecb23a8facac6280e84be513fee&api_key=eb81bd1f0ad28b0a&member_id=84938493&fname=Smith&&sub_lists[]=49216&&sub_lists[]=49217&remove_other_sub_lists=true

JSON Output:{"successful":true,"message":"Member updated."}

example – email, first name & 2 sub lists
Note that when submitting multiple values for the same parameter (eg. sub_lists) in this case, you must pass the parameter as an array (sub_lists[] multiple times). If you pass the parameter as just sub_lists twice (without using the []) only one sub list will be assigned to the contact.
If you include the param 'remove_other_sub_lists' the API call will remove all sub lists that the contact is associated with. 
If you include the param 'sub_lists[]=' once or more, the contact will be added to, or remain associated to those sub lists.
If you include the param 'remove_from_lists[]=' once or more, the contact will be removed from those sub lists.

Unsubscribe a Contact

/api/v1/contacts/unsubscribe?api_key=api_key&api_id=api_id [POST]

Required Params: member_id or email

example
Example - (POST)
https://api.robly.com/api/v1/contacts/unsubscribe?api_id=8ec55ecb23a8facac6280e84be513fee&api_key=eb81bd1f0ad28b0a&member_id=84938493

JSON Output:{"successful":true,"message":"Member is unsubscribed."}


Delete a Contact

/api/v1/contacts/delete?api_key=api_key&api_id=api_id [POST]

Required Params: member_id or email

example
Example - (POST)
https://api.robly.com/api/v1/contacts/delete?api_id=8ec55ecb23a8facac6280e84be513fee&api_key=eb81bd1f0ad28b0a&member_id=84938493

JSON Output:{"successful":true,"message":"Member is deleted."}


Resubscribe a Contact

/api/v1/contacts/resubscribe?api_key=api_key&api_id=api_id [POST]

Required Params: member_id or email

example
Example - (POST)
https://api.robly.com/api/v1/contacts/resubscribe?api_id=8ec55ecb23a8facac6280e84be513fee&api_key=eb81bd1f0ad28b0a&member_id=84938493

JSON Output:{"successful":true,"message":"Member is resubscribed."}



Member Exists in a List

/api/v1/contacts/exists_in_sub_list?api_key=api_key&api_id=api_id&sub_list_id=xxxxx&member_id=yyyyyy [GET]

Required Params: sub_list_id and member_id or email

example
Example - (GET)
https://api.robly.com/api/v1/contacts/exists_in_sub_list?api_id=8ec55ecb23a8facac6280e84be513fee&api_key=eb81bd1f0ad28b0a&member_id=84938493&sub_list_id=8478574

JSON Output:{"successful":true,"message":"Member is part of this list."}
OR
JSON Output:{"successful":false,"message":"Member is not part of this list."}
 

You can also contact us here

  • Live Chat Support

    Live chat is open
    between 9am-7pm EST.

  • Email Support

    During business hours,
    we usually answer emails within minutes.

  • FAQ's

    Check out our FAQ
    for our most common issues.

'