Event-triggered instant deployment API

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.

Run In Postman

Headers

The following are the request headers:

Request HeaderDescription
content-Typeapplication/json
authorizationAccess 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:

ParameterTypeMandatoryDescription
event-idStringYesA unique identifier for the event definition in the Webex Campaign.
event-keyStringYesThe identification parameter of the intended recipient customer e.g. Email address, mobile number, App Device ID or Customer ID.
event-paramsJSONObjectConditionally MandatorySpecifies 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 CodeCode within API ResponseDescription
200/500 *1002Mandatory field missing? EventID / EventKey
401430Authorization failed. This resource is not allowed to access using this TOKEN or KEY
401498Invalid token or Access token expired
404404Error - Page Not Found
405405Method not supported
429429Too many requests. Throttle limit reached for the time window.
499499Request failed. Check the exact reason of failure in application code and description of error stream.
200/500 *500Internal server error
200/500 *1001Invalid input JSON
200/500 *1003No recommendation available
502502Bad 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.
Language