curl --location 'https://api.weya.live/backend/api/whatsapp/store-email-and-whatsapp?msg_type=outbound&service=whatsapp' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"user_phone_number": "+919876543210",
"api_phone_number": "+15551234567",
"logs": []
}'
{
"status": true,
"code": 200,
"message": "Logs stored successfully",
"errorMessage": null,
"data": {}
}
WhatsApp
Store WhatsApp Conversation Log
Save WhatsApp messages of a conversation in your Weya logs.
POST
/
api
/
whatsapp
/
store-email-and-whatsapp
curl --location 'https://api.weya.live/backend/api/whatsapp/store-email-and-whatsapp?msg_type=outbound&service=whatsapp' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"user_phone_number": "+919876543210",
"api_phone_number": "+15551234567",
"logs": []
}'
{
"status": true,
"code": 200,
"message": "Logs stored successfully",
"errorMessage": null,
"data": {}
}
Overview
Save messages of a WhatsApp conversation so they appear in your WhatsApp logs. Messages are added to the conversation between the user’s number and your number; the conversation is created if it doesn’t exist yet. Only WhatsApp is supported.Prerequisites
- An API key for your workspace
Request
curl --location 'https://api.weya.live/backend/api/whatsapp/store-email-and-whatsapp?msg_type=outbound&service=whatsapp' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"user_phone_number": "+919876543210",
"api_phone_number": "+15551234567",
"logs": []
}'
Response
{
"status": true,
"code": 200,
"message": "Logs stored successfully",
"errorMessage": null,
"data": {}
}
Error Handling
Errors returnstatus: false, with the reason in errorMessage.
- 400 Bad Request
Valid msg_type (outbound/inbound) is required.Only service=whatsapp is supported.user_phone_number and api_phone_number are required.
- 401 Unauthorized – Missing or invalid API key.
- 429 Too Many Requests – More than 1,000 WhatsApp requests in 15 minutes from your IP address.
- 500 Internal Server Error – Unexpected server error.
Was this page helpful?

