Skip to main content

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.

NameTypeRequired/OptionalDescription
eventsEvent[]RequiredList of event object

Event Type

NameTypeRequired/OptionalDescription
namestringOptionalName of the customer
phoneNumberstringOptionalPhone number of the customer
emailstringOptionalEmail of the customer
eventNamestringRequiredName of the event
eventProperties[key: string]: string or number or boolean or objectRequiredEvent properties details

Request Information

CategoryValue
Http requestPOST
URLhttps://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

NameTypeDescription
statusnumberResponse status
successbooleanIs successful response or not

Errors

Error CodeMeaning
400Invalid payload -- Your request is invalid.
401Unauthorized -- User is not authenticated.
404Not Found -- The specified API could not be found.
500Internal 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.