Skip to main content

Send multiple events

The Send Events API follows the same schema as the Send Event API and supports submitting up to 100 events in a single request.

Each event in the list can be used 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[]RequiredArray of event objects (maximum 100)

Event Type

NameTypeRequired/OptionalDescription
namestringOptionalCustomer name
phoneNumberstringOptionalCustomer phone number
emailstringOptionalCustomer email address
eventNamestringRequiredEvent name
eventProperties[key: string]: string or number or boolean or objectRequiredKey-value pairs describing the event
createdAtstringOptionalISO 8601 timestamp of the original event. Defaults to ingestion time if omitted.
isMigrationbooleanOptionalSet to true to route through the historical migration pipeline. Defaults to false.

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
statusnumberHTTP status code
successbooleanIndicates whether the request succeeded

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"
}
]
}

Historical Data Migration

By default, events are processed in real time. To backfill historical data, set "isMigration": true on each event object — this routes it through a separate low-priority pipeline that preserves the original createdAt timestamp.

ScenarioisMigrationcreatedAtResult
Normal real-time eventfalse / omittedomittedIngestion time used, goes to real-time stream
Historical eventtrue"2024-11-15T..."Supplied date preserved, routed to migration pipeline
Historical event, no datetrueomittedIngestion time used, still routed to migration pipeline
Back-date only, no flagfalse / omitted"2024-11-15T..."Date preserved but goes to real-time stream — will be rejected by data stream
danger

Always set both isMigration: true and createdAt together when pushing historical data.


Note: BIK does not currently support custom event ingestion.