Provisioning API
(Last Updated On: July 10, 2013)

Overview

The SnapEngage Provisioning REST API provides a method for 3rd parties to perform the following:

  • Create a new user account
  • Get existing user account details
  • Update an existing user account
  • Find out if a user account exists
  • Delete an existing user account
  • Create a Widget and add to existing user account

Note: All API requests require the use of HTTPS


API Key

A valid key is required to use the Provisioning REST API. Please contact us if you need to obtain an api key.


User Request Data Format

The REST API accepts requests in both JSON and XML formats. To specify, use the appropriate format: json or xml. For instance:

https://www.snapengage.com/api/v1/user.json
JSON User format
{
	"email" : "value",
	"name" : "value",
	"password" : "value",
	"phone" : "value",
	"accountType" : "value"
}
XML User format
<!--?xml version="1.0" encoding="UTF-8"?-->
	value
	value
	value
	value
	value
User data fields
email

Required, a valid email address less than 100 characters

name

– Valid name less than 100 characters

password

– Valid password between 5 and 100 characters

phone

– Valid telephone number

accountType

– Type of account, from the following:

biz
entr
stp
prem
trial

See our plans page for more details http://www.snapengage.com/plans?all


Create a new user account

Method: PUT
URL: https://www.snapengage.com/api/v1/user.format?api_key=key
Request Header: "Content-Type:application/json" or "Content-Type:application/xml"
Request Data:
    email
    name
    accountType
    password
    phone (optional)
Success: 201 Created
Returns: User data in specified format

Get user account details or check if user exists

Get existing user account details if created with same api key, Otherwise a check if user exists

Method: GET
URL: https://www.snapengage.com/api/v1/user.format?api_key=key&email=email
URL Parameters:
    email
Success: 200 OK
Returns: User data in specified format

Update an existing user account

Method: POST
URL: https://www.snapengage.com/api/v1/user.format?api_key=key
Request Header: "Content-Type:application/json" or "Content-Type:application/xml"
Request Data:
    email
    name (optional)
    accountType (optional)
    password (optional)
    phone (optional)
Success: 200 OK
Returns: User data in specified format

Delete an existing user account

Method: DELETE
URL: https://www.snapengage.com/api/v1/user.format?api_key=key&email=email
URL Parameters:
    email
Success: 200 OK

Widget Request Data Format

The REST API accepts requests in both JSON and XML formats. To specify, use the appropriate format: json or xml. For instance:

https://www.snapengage.com/api/v1/widget.json
JSON Widget format
{
   "email":"account email address",
   "destinationEmail":"email where transcripts are sent",
   "name":"widget name",
   "agents":[
      {
         "agentId":"agent id",
         "agentAlias":"agent displayed name",
         "agentAvatar":"link to agent image - 53x53px is recommended size",
         "agentType":"either google, skype, or webclient"
      }
   ],
   "onlineButtonUrl":"link to online button",
   "offlineButtonUrl":"link to offline button",
   "enableProactiveChat":"true/false",
   "proactiveSettings":[
      {
         "delayInSec":"time in sec - 45 is default",
         "enableSound":"true/false - default is true",
         "urlRule":"url rule - default is http*://*, matching all pages",
         "message":"proactive message - default is Hello, How can I assist you today?"
      }
   ]
}
XML User format
Coming soon...
Widget data fields
email

– Required, existing user account email address

name

– Valid name less than 100 characters

uuid

– Public UUID of Widget


Create a new Widget

Method: PUT
URL: https://www.snapengage.com/api/v1/widget.format?api_key=key
Request Header: "Content-Type:application/json" or "Content-Type:application/xml"
Request Data:
    email (required, matching User email)
    destinationEmail
    name
    agents: (at least one agent is required)
    agentId (required)
    agentAlias (required)
    agentAvatar (required)
    agentType (required)
    onlineButtonUrl
    offlineButtonUrl
    enableProactiveChat
    proactiveSettings:
    delayInSec
    message
Success: 201 Created
Returns: Widget data in specified format, including UUID

Get widget details

Method: GET
URL: https://www.snapengage.com/api/v1/widget.format?api_key=key&uuid=uuid&email=email
URL Parameters:
    String uuid (required)
    String email (required, matching User email)
Success: 200 OK
Returns: Widget data in specified format

Update an existing widget

Method: POST
URL: https://www.snapengage.com/api/v1/widget.format?api_key=key
Request Header: "Content-Type:application/json" or "Content-Type:application/xml"
Request Data:
    email (required, matching User email)
    destinationEmail
    name
    agents: (at least one agent is required)
    agentId (required)
    agentAlias (required)
    agentAvatar (required)
    agentType (required)
    onlineButtonUrl
    offlineButtonUrl
    enableProactiveChat
    proactiveSettings:
    delayInSec
    message
Success: 200 OK
Returns: Widget data in specified format

Delete an existing widget

Method: DELETE
URL: https://www.snapengage.com/api/v1/widget.format?api_key=key&uuid=uuid&email=email
URL Parameters:
    email
    uuid
Success: 200 OK