Fetch messages by IDs
You can use the fetch messages by ID API to get the message IDs.
Request parameters
Name | Type | Required/Optional | Description |
---|---|---|---|
messageIds | string[] | Required | List of message ids |
Request Information
Category | Value |
---|---|
Http request | POST |
URL | https://bikapi.bikayi.app/integrations/bikPlatformFunctions-message/fetchMessagesById |
curl --location 'https://bikapi.bikayi.app/integrations/bikPlatformFunctions-message/fetchMessagesById' \
--header 'Authorization: Basic AUTH_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"messageIds": ["message_id1"],
}'
JSON response example:
{
"status": 200,
"success": true,
"data": {
"messages": [
{
"id": 9749131,
"messageId": "message_id1",
"createdAt": "2024-07-24T08:13:49.363Z",
"receiverId": "4154000",
"status": "failed",
"type": "whatsapp",
"message": "This is the test template carousel for the automation Test message..",
"assetValue": "+919909009000",
"failureReason": "Message Undeliverable."
}
]
}
}
Response parameters
Name | Type | Description |
---|---|---|
status | number | Response status |
success | boolean | Is successful response or not |
data | BikPlatformMessage[] | List of messages if found |
BikPlatformMessage Type
Name | Type | Description |
---|---|---|
id | string | Message ID |
createdAt | string | Message created date |
messageId | string | Whatsapp message ID |
status | string | Message status |
message | string | Message details |
type | string | Message type |
assetValue | string | Phone number or any other details |
failureReason | string | Failed reason if any |
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": 200,
"success": true,
"data": {
"messages": [
{
"createdAt": null,
"message": "No messages found for the given messageIds"
}
]
}
}