Signup Forms API Calls
There are currently two REST methods to get a list of your data fields and other associated sign up details.
API Endpoint
https://api.robly.com/
Note
As with all API methods, the api_key and api_id parameters are required for all methods.
API Actions:
- View Data Fields (show)
- Subscribe a New Contact (generate)
View Data Fields and Sub Lists for Signup Form
This API call will display the data fields and sub lists that you can use when generating a new subscribed contact. By default the API call will return only those fields that are publicly accessible, if you want to view all possible fields pass in the optional param ‘include_all=true’.
/api/v1/sign_up/show?api_key=api_key&api_id=api_id [GET]
Optional Params: include_all [true, false]
example
Example API call (GET)
https://api.robly.com/api/v1/sign_up/show?api_id=8ec55ecb23a8facac6280e84be513fee&api_key=eb81bd1f0ad28b0a
JSON Output:{"fields":[{"field":{"id":406,"label":"Last Name","tag_type":"Textfield","is_required":false,"position":2,"created_at":"2013-07-27T03:29:38Z","updated_at":"2013-11-06T18:31:28Z","default_tag":"data2","user_tag":"lname"}},{"field":{"id":404,"label":"Email Address","tag_type":"Emailfield","is_required":true,"position":0,"created_at":"2013-07-27T03:29:38Z","updated_at":"2013-07-27T03:29:38Z","default_tag":"data0","user_tag":"email"}},{"field":{"id":405,"label":"First Name","tag_type":"Textfield","is_required":false,"position":1,"created_at":"2013-07-27T03:29:38Z","updated_at":"2014-02-24T22:32:30Z","default_tag":"data1","user_tag":"fname"}}],"sub_lists":[{"sub_list":{"id":17269,"name":"List B","position":2,"created_at":"2014-06-26T18:42:33Z","updated_at":"2014-07-08T03:20:34Z"}},{"sub_list":{"id":17276,"name":"List C","position":3,"created_at":"2014-06-26T18:42:33Z","updated_at":"2014-06-26T22:16:08Z"}},{"sub_list":{"id":17277,"name":"List D","position":4,"created_at":"2014-06-26T18:42:33Z","updated_at":"2014-06-26T22:16:09Z"}}]}
Subscribe a New Contact
Using the data fields and sub lists submitted the new contact will be subscribed to your newsletters. You could recreate our signup widget using this API call if you wanted to, but it is typically used for close integration with CRMs.
/api/v1/sign_up/generate?api_key=api_key&api_id=api_id [POST]
example
Example - email & first name (POST)
https://api.robly.com/api/v1/sign_up/generate?api_id=8ec55ecb23a8facac6280e84be513fee&api_key=eb81bd1f0ad28b0a&email=new_contact@newemail.com&fname=Mike
JSON Output:{"successful":true,"message":"Contact added"}
example – email, last 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[]). If you pass the parameter as just sub_lists twice (without using the []) only one sub list will be assigned to the contact.
/api/v1/sign_up/generate?api_id=8ec55ecb23a8facac6280e84be513fee&api_key=eb81bd1f0ad28b0a&email=mike@newemail.com&lname=Smith&sub_lists[]=17277&sub_lists[]=17276
JSON Output:{"successful":true,"message":"Contact added"}
Optional Parameters:
We have four optional parameters.
Parameter: double_opt_in=true
The first is for a full double opt-in process to occur. With this parameter the contact will be sent a confirmation email which must be clicked before they are added as a subscribed contact. They will then receive the welcome email.
Parameter: welcome_email=true
The second optional parameter is to skip the confirmation email and just send the welcome email.
Parameter: include_autoresponder=true
This optional param will trigger any autoresponders that match the criteria for this newly subscribed contact.
Parameter: return_contact=true
This optional param will pass back the contact and any sublists associated to the contact after being created.
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"}}