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.
Name | Type | Required/Optional | Description |
---|---|---|---|
event | 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/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
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.