Skip to main content

Send single event

You can use the send event API to ingest events happening inside your system.

Request parameters

info

Either email or phoneNumber must be provided; both cannot be empty at the same time.

NameTypeRequired/OptionalDescription
eventEventRequiredList 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/sendEvent

Sample request

curl --location 'https://bikapi.bikayi.app/integrations/bikPlatformFunctions-events/sendEvent' \
--header 'Authorization: Basic AUTH_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"event": {
"name": "Name",
"email": "test@bik.ai",
"phoneNumber": "+19494572787",
"eventName": "purchasedAProduct",
"eventProperties": {
"productId": "PRODUCT_ID",
"orderId": "test-order-id1234",
"orderName": "my-order",
"productName": "my-product",
"itemPrice": 500,
"currency": "INR",
"customerId": "CUST_TEST_123",
"variantId": "1234567890"
}
}
}'

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.