This API triggers an event that can be processed as per the predefined event deployment configuration.
The events are the regular transactions performed by the customers/targets in real-time. These events are tracked automatically. You can trigger actions based on these events.
This API triggers an event that can be processed as per the predefined event deployment configuration. This event is processed asynchronously.
Know your endpoint
Based on the domain you use to log in to Webex Campaign, the endpoint domain for your API varies. For more information, refer to the Know Your API Endpoints section.
Go to the Postman Collection section to learn how to import a Postman collection. Click the below button, If you already know how to import a postman collection.
Headers
The following are the request headers:
Request Header | Description |
---|---|
content-Type | application/json |
authorization | Access token or API Secret Key in Bearer format Example: Bearer $(key) |
Authorization
API Secret Key can be generated in Webex Campaign > Administration > Users & Roles > API Users by a user with the permissions to do so.
The API user must be enabled to access Event Campaign API.
Body Parameters
The following table describes the parameters of the request body:
Parameter | Type | Mandatory | Description |
---|---|---|---|
event-id | String | Yes | A unique identifier for the event definition in the Webex Campaign. |
event-key | String | Yes | The identification parameter of the intended recipient customer e.g. Email address, mobile number, App Device ID or Customer ID. |
event-params | JSONObject | Conditionally Mandatory | Specifies the extra parameters that can be sent along with event details. These parameters can be used as part of message personalization and conditions. If any mandatory extra parameters were specified within the event definition in Webex Campaign, then those become mandatory to raise the event. |
The maximum event parameters are limited to 400 and each event payload cannot be more than 24KB.
Request Example
{
"event-id": "evt_14296935520105",
"event-key": "44839382928",
"event-params":
{
"account": "123",
"firstname": "joe",
"lastname": "bloggs"
}
}
An event parameter value cannot be "NULL" or "null" even if it is marked as non mandatory parameter in event definition. The error code 200 or 500 will be returned if you pass "NULL" or "null" for the event parameter value.
Failure Response Codes
The API will return code within the response as per the following table in case of failure scenarios.
HTTP Status Code | Code within API Response | Description |
---|---|---|
200/500 * | 1002 | Mandatory field missing? EventID / EventKey |
401 | 430 | Authorization failed. This resource is not allowed to access using this TOKEN or KEY |
401 | 498 | Invalid token or Access token expired |
404 | 404 | Error - Page Not Found |
405 | 405 | Method not supported |
429 | 429 | Too many requests. Throttle limit reached for the time window. |
499 | 499 | Request failed. Check the exact reason of failure in application code and description of error stream. |
200/500 * | 500 | Internal server error |
200/500 * | 1001 | Invalid input JSON |
200/500 * | 1003 | No recommendation available |
502 | 502 | Bad gateway |
Based on the API configuration the HTTP status code will return 200 or 500.
Below is the configuration setting in the system:
- imicampaign.eventapi.resp.statuscode. = 1 then Http status is 500.
- imicampaign.eventapi.resp.statuscode. = 0 then Http status is 200.