Send multiple events
Send events API follows the same schema as the send event API and can be used to push upto 100 events in one go.
The send events API takes in a list of events, these events can be used later to power cohorts on the bik dashboard.
Request parameters
info
Either email or phoneNumber must be provided; both cannot be empty at the same time.
Name | Type | Required/Optional | Description |
---|---|---|---|
events | Event[] | Required | List of event object |
Event Type
Name | Type | Required/Optional | Description |
---|---|---|---|
name | string | Optional | Name of the customer |
phoneNumber | string | Optional | Phone number of the customer |
email | string | Optional | Email of the customer |
eventName | string | Required | Name of the event |
eventProperties | [key: string]: string or number or boolean or object | Required | Event properties details |
Request Information
Category | Value |
---|---|
Http request | POST |
URL | https://bikapi.bikayi.app/integrations/bikPlatformFunctions-events/sendEvents |
Sample request
curl --location 'https://bikapi.bikayi.app/integrations/bikPlatformFunctions-events/sendEvents' \
--header 'Authorization: Basic AUTH_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"events": [
{
"name": "Name",
"email": "test@bik.ai",
"phoneNumber": "+19494572000",
"eventName": "catalogViewed",
"eventProperties": {
"catalogId": "1234",
"catalogName": "Test catalog 1"
}
},
{
"name": "Name",
"email": "test@bik.ai",
"phoneNumber": "+19494572000",
"eventName": "purchasedAProduct",
"eventProperties": {
"productId": "PRODUCT_ID",
"orderId": "test-order-id1234",
"orderName": "my-order",
"productName": "my-product",
"itemPrice": 500,
"currency": "INR",
"customerId": "CUST_TEST_123"
}
}
]
}'
JSON response example:
{
"status": 200,
"success": true
}
Response parameters
Name | Type | Description |
---|---|---|
status | number | Response status |
success | boolean | Is successful response or not |
Errors
Error Code | Meaning |
---|---|
400 | Invalid payload -- Your request is invalid. |
401 | Unauthorized -- User is not authenticated. |
404 | Not Found -- The specified API could not be found. |
500 | Internal Server Error -- We had a problem with our server. Try again later. |
Error response example:
{
"status": 400,
"errors": [
{
"message": "'eventProperties.variantId' is required"
}
]
}
Please note that Bik doesn't support custom events ingestion at the current moment.