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.

For Global Data Center (Default)

If your WebEngage dashboard URL starts with dashboard.webengage.com, then it means you're using our Global Data Center. Please use the following host to access resources via API:

https://api.webengage.com/

For India Data Center

Please note, you must specifically ask for your data to be stored in our India Data Center in your contract with WebEngage. If you're using the India Data Center, then your WebEngage dashboard URL will start with dashboard.in.webengage.com.

Please use the following host to access resources via API:

https://api.in.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 following format:

📘

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 <HOST>/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"
    }'

🚧

For All API Requests

Please ensure that you:

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

Please feel free to drop in a few lines at [email protected] in case you have further queries. We're always just an email away!

Updated 7 months ago



Getting Started


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.