Send single message
Use the Send Message API to deliver messages to a recipient. Supported message formats include text, media, addresses, options, and product messages.
Request parameters
| Name | Type | Required/Optional | Description |
|---|---|---|---|
medium | string | Required | The delivery channel for the message (currently only whatsapp is supported) |
contactIdentifier | string | Required | The recipient's phone number |
type | string | Required | The message type: text, image, video, document, options, buttons, address, single_product, or multiple_product |
businessPhoneNumber | string | Optional | The business phone number from which the message is sent |
payload | BikTextMessagePayload or BikMediaMessagePayload or BikInteractiveMessagePayload or BikAddressMessagePayload or BikProductMessagePayload | Required | The message payload object. Refer to the type definitions for BikTextMessagePayload, BikMediaMessagePayload, BikInteractiveMessagePayload, BikAddressMessagePayload, BikProductMessagePayload. |
callbackData | string | Optional | V2 only. Stringified JSON (max 1024 characters) for passing metadata (e.g. order ID, campaign name). Must be valid, parseable JSON. This value is echoed back in status-update and link-click webhooks. |
Callback data (callbackData) — V2 only
callbackData is supported only in the Send Message V2 API. It is not available in the deprecated V1 API.
Use callbackData to attach metadata to the message that will be returned in delivery/status and link-click webhooks (e.g. for order mapping, campaign attribution, or analytics).
- Format: A string containing valid JSON (e.g.
JSON.stringify({ "order_id": "ORD123", "campaign": "summer_sale" })). - Validation: Must be a non-empty string, parseable as JSON, and must not exceed 1024 characters. If validation fails, the request returns
400with an error message.
Request Information
- Send Message V2
- Send Message
| Category | Value |
|---|---|
| Http request | POST |
| URL | https://bikapi.bikayi.app/integrations/bikPlatformFunctions-messages/v2/sendMessage |
Sample request
curl --location 'https://bikapi.bikayi.app/integrations/bikPlatformFunctions-messages/v2/sendMessage' \
--header 'Authorization: Basic AUTH_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"contactIdentifier": "+919900990090",
"medium": "whatsapp",
"type": "text",
"payload": {
"message": "This is a test message."
},
"callbackData": "{\"order_id\":\"ORD123\",\"campaign\":\"summer_sale\"}"
}'
JSON response example:
{
"status": 200,
"success": true,
"data": {
"id": "wamid.HBgMOTE5OTM4NDM4MTM4FQIAERgSMTJCRTg3M0MxREkUzQatyAaaqA=="
}
}
Response parameters
| Name | Type | Description |
|---|---|---|
status | number | HTTP status code |
success | boolean | Indicates whether the request succeeded |
data | Response | Contains the message ID |
Note:
API version 1 is deprecated. Please use v2.
| Category | Value |
|---|---|
| Http request | POST |
| URL | https://bikapi.bikayi.app/integrations/bikPlatformFunctions-messages/sendMessage |
Sample request
curl --location 'https://bikapi.bikayi.app/integrations/bikPlatformFunctions-messages/sendMessage' \
--header 'Authorization: Basic AUTH_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"contactIdentifier": "+919900990090",
"medium": "whatsapp",
"type": "text",
"payload": {
"message": "This is a test message."
}
}'
JSON response example:
{
"status": 200,
"success": true,
"response": {
"id": "wamid.HBgMOTE5OTM4NDM4MTM4FQIAERgSMTJCRTg3M0MxREUyNkUzQaAA=="
}
}
Response parameters
| Name | Type | Description |
|---|---|---|
status | number | HTTP status code |
success | boolean | Indicates whether the request succeeded |
response | Response | Contains the message ID |
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": "'message' is required"
}
]
}