curl --location 'https://api.weya.live/backend/api/whatsapp/get-whatsapp-agent/6894a98a7fcde123456789ab' \
--header 'x-api-key: YOUR_API_KEY'
{
"status": true,
"code": 200,
"message": "Whatsapp agent fetched successfully",
"errorMessage": null,
"data": {
"_id": "6894a98a7fcde123456789ab",
"agentName": "Support Assistant",
"gender": "Female",
"systemMessage": "You are a helpful customer support assistant.",
"selectedLanguage": ["en-IN"],
"sessionTimeout": 30,
"phoneNumberId": "6891f1d0c45d123456789abc",
"createdAt": "2026-07-21T13:45:18.000Z",
"updatedAt": "2026-07-21T14:12:30.000Z"
}
}
WhatsApp
Get WhatsApp Agent By ID
Retrieve the full configuration of one of your WhatsApp agents.
GET
/
api
/
whatsapp
/
get-whatsapp-agent
/
{agentId}
curl --location 'https://api.weya.live/backend/api/whatsapp/get-whatsapp-agent/6894a98a7fcde123456789ab' \
--header 'x-api-key: YOUR_API_KEY'
{
"status": true,
"code": 200,
"message": "Whatsapp agent fetched successfully",
"errorMessage": null,
"data": {
"_id": "6894a98a7fcde123456789ab",
"agentName": "Support Assistant",
"gender": "Female",
"systemMessage": "You are a helpful customer support assistant.",
"selectedLanguage": ["en-IN"],
"sessionTimeout": 30,
"phoneNumberId": "6891f1d0c45d123456789abc",
"createdAt": "2026-07-21T13:45:18.000Z",
"updatedAt": "2026-07-21T14:12:30.000Z"
}
}
Overview
Retrieve a WhatsApp agent’s full configuration, including its start template and the voice name. The agent must have been created by the user who owns the API key.Prerequisites
- An API key for your workspace
- The agent’s ID, from Get WhatsApp Agents
Request
curl --location 'https://api.weya.live/backend/api/whatsapp/get-whatsapp-agent/6894a98a7fcde123456789ab' \
--header 'x-api-key: YOUR_API_KEY'
Response
{
"status": true,
"code": 200,
"message": "Whatsapp agent fetched successfully",
"errorMessage": null,
"data": {
"_id": "6894a98a7fcde123456789ab",
"agentName": "Support Assistant",
"gender": "Female",
"systemMessage": "You are a helpful customer support assistant.",
"selectedLanguage": ["en-IN"],
"sessionTimeout": 30,
"phoneNumberId": "6891f1d0c45d123456789abc",
"createdAt": "2026-07-21T13:45:18.000Z",
"updatedAt": "2026-07-21T14:12:30.000Z"
}
}
The agent’s configuration: name, gender, voice, instructions (
systemMessage), languages, analysis metrics, tools, templates, knowledge base (rag), variables, sessionTimeout and settings. The example shows the main fields.Error Handling
Errors returnstatus: false, with the reason in errorMessage.
- 400 Bad Request –
Invalid Agent ID. - 401 Unauthorized – Missing or invalid API key.
- 404 Not Found –
WhatsApp agent not found: it doesn’t exist or wasn’t created by the user who owns the 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?

