Send single message
You can use send message API to send messages, including text, media, addresses, options, and product messages.
Request parameters
Name | Type | Required/Optional | Description |
---|---|---|---|
medium | string | Required | Messages will be send through this medium( whatsapp for now ) |
contactIdentifier | string | Required | Phone number of user |
type | string | Required | Message type( text , image , video , document , options , buttons , address , single_product , multiple_product ) |
businessPhoneNumber | string | Optional | Business phone number from which you want to send the message |
payload | BikTextMessagePayload or BikMediaMessagePayload or BikInteractiveMessagePayload or BikAddressMessagePayload or BikProductMessagePayload | Required | Message object type. Check the BikTextMessagePayload, BikMediaMessagePayload, BikInteractiveMessagePayload, BikAddressMessagePayload, BikProductMessagePayload type here. |
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."
}
}'
JSON response example:
{
"status": 200,
"success": true,
"data": {
"id": "wamid.HBgMOTE5OTM4NDM4MTM4FQIAERgSMTJCRTg3M0MxREkUzQatyAaaqA=="
}
}
Response parameters
Name | Type | Description |
---|---|---|
status | number | Response status |
success | boolean | Is successful response or not |
data | Response | Message ID in the response |
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 | Response status |
success | boolean | Is successful response or not |
response | Response | Message ID in the response |
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"
}
]
}