API Quick Links

API

Using our public API you can work with Contacts and Events.

Contacts - Posting A Contact

URL

https://appmarket-publicapi.sitebuilder.com/v1.0/contacts/post

HTTP Method POST
Request Headers
Content-Type: application/json
instance-jwt: JSON Web Token
Request Body
{
   "name":"John Doe",
   "phone":"978978978",
   "company":"Aqua Inc.",
   "email":"johndoe@webmail.com",
   "addresses": [
      {
         "address":"100 Quarter Blvd",
         "address2":"",
         "city":"Ayer",
         "state_code":"MA",
         "state":"Massachusetts",
         "postal_code":"01432",
         "country_code":"US"
      },
      {
         "address":"51 Mystic Place",
         "address2":"Apt 39B",
         "city":"Houston",
         "state_code":"TX",
         "state":"Texas",
         "postal_code":"77001",
         "country_code":"US"
      }
   ]
}
Response Body
{
   "name":"John Doe",
   "phone":"978978978",
   "company":"Aqua Inc.",
   "email":"johndoe@webmail.com",
   "addresses": [
      {
         "address":"100 Quarter Blvd",
         "address2":"",
         "city":"Ayer",
         "state_code":"MA",
         "state":"Massachusetts",
         "postal_code":"01432",
         "country_code":"US"
      },
      {
         "address":"51 Mystic Place",
         "address2":"Apt 39B",
         "city":"Houston",
         "state_code":"TX",
         "state":"Texas",
         "postal_code":"77001",
         "country_code":"US"
      }
   ],
   "modified_on":"2018-08-22T16:47:10.0549203",
   "created_on":"2018-08-22T16:47:10.0549203"
}

Note about updating existing Contacts

The above endpoint can also be used to update an existing contact. If email address included in the request body already exists, the associated contact information will be updated as per the new request body. Such updated contacts will include “modified_on” field in the response body.

Contacts - Getting Contacts

URL

https://appmarket-publicapi.sitebuilder.com/v1.0/contacts/get?scope=app&offset=johndoe%40webmail.com&limit=50

HTTP Method GET
Query Parameters
scope: 'site' OR 'app'
limit: <=1000 (default is 50)
offset: Contact Email Address (If the specified email does not exist, no contacts will be returned. Otherwise, the contacts will be returned in accordance with limit specified and paginated ending at this email address)
Request Headers
Content-Type: application/json
instance-jwt: JSON Web Token
Response Body
[
   {
      "name":"James Jacob",
      "phone":"978678945",
      "company_name":"Beta Inc.",
      "email":"jjacob@web.com",
      "created_on":"2018-08-21T16:47:10.0549203"
      "addresses": [
         {
            "address":"75 Parker Road",
            "address2":"",
            "city":"Los Angeles",
            "state_code":"CA",
            "state":"California",
            "postal_code":"90005",
            "country_code":"US"
         }
      ]
   },
   {
      "name":"John Doe",
      "phone":"978978978",
      "company_name":"Aqua Inc.",
      "email":"johndoe@webmail.com",
      "created_on":"2018-08-22T16:47:10.0549203",
      "modified_on":"2018-08-22T16:47:10.0549203",
      "addresses": [
         {
            "address":"100 Quarter Blvd",
            "address2":"",
            "city":"Ayer",
            "state_code":"MA",
            "state":"Massachusetts",
            "postal_code":"01432",
            "country_code":"US"
         },
         {
            "address":"51 Mystic Place",
            "address2":"Apt 39B",
            "city":"Houston",
            "state_code":"TX",
            "state":"Texas",
            "postal_code":"77001",
            "country_code":"US"
         }
      ]
   }
]

Dashboard - Posting Setup Status

URL

https://appmarket-publicapi.sitebuilder.com/v1.0/dashboard/setupstatus

HTTP Method POST
Request Headers
Content-Type: application/json
instance-jwt: JSON Web Token
Request Body
{
   "Setup_Status":Percentage completion of the app setup
}

The above endpoint is used to update the extent, in terms of percentage, to which the setup of the app has been completed. The end user does not get to manage settings of the app in the site editor till its setup is in progress. To mark the completion of app setup, the above endpoint needs to be called with ‘Setup_Status’ value as 100. On doing so, the end user would start seeing ‘MANAGE’ option for the app in the site editor.