Search results for "{{ search.query }}"

No results found for "{{search.query}}". 
View All Results

Getting started

REST API allows you to programatically transfer information over the internet using a predefined schema. WebEngage offers endpoints with specific requirements which perform actions and/or return data. Using this API, you can track your users and their actions, along with accessing your on-site feedback and survey data, and creating surveys.

API endpoint

Access to all the resources available via API is over HTTPS and from the host api.webengage.com.

https://api.webengage.com/

Response format

The data can be sent in either JSON or XML format. To select this, format parameter can be passed in the URL as json or xml. Data is sent in JSON format by default. Any parameters can be passed as HTTP query string parameters in the API URLs.

Date format

All timestamps are returned in the format illustrated below.

yyyy-MM-ddTHH:mm:ssZ

Example: 2013-01-26T07:31+0000

Response container

Each API response will be wrapped in a main container called response. It will have three properties: status, data and message. status will be either success or error depending upon the server response. message will explain the reason of this corresponding status. data will contain the data for the requested resource.

{
	"response" : {
		"data" : {
			...
		},
		"message" : "success",
		"status" : "success"
	}
}

User authentication

WebEngage API follows Bearer Authentication Scheme for API access.

You will find your API key on WebEngage dashboard. Log in to your WebEngage dashboard, navigate to Integrations > REST API to find it. Each account manager of your WebEngage account will have a different API key. Access restrictions for an API key is driven by the access privileges of that account manager. You have to pass this API key in header, as illustrated below.

curl -X POST https://api.webengage.com/v1/accounts/<YOUR_WEBENGAGE_LICENSE_CODE>/users \
    --header 'Authorization: Bearer <YOUR_API_KEY>' \
    --header 'Content-Type: application/json' \
    --data '{
    "userId": "johndoe",
    "firstName": "John",
    "lastName": "Doe"
    }'

Make sure you replace YOUR_WEBENGAGE_LICENSE_CODE with your WebEngage license code and YOUR_API_KEY with your WebEngage API key.

Errors

Errors are returned using standard HTTP error code syntax. The response body is always in JSON.

Errors by status code

Code
Description

400

Invalid resource / parameters

401

Invalid auth / access

404

Invalid URL

Next steps

Getting started