Retrieve one chatbot by its public chatbot UID.
Get Chatbot
Summary
Retrieve one chatbot by its public chatbot UID.
Prerequisites
- Authorization: Bearer w91_live_xxx
- Content-Type: application/json for JSON requests
Related documentation
Endpoint: GET /api/v2/chatbots/{chatbotUid}. chatbotUid is the public identifier returned after creation and must belong to the authenticated sender.
GET
/api/v2/chatbots/{chatbotUid}| Parameter | Type | Required | Description |
|---|---|---|---|
chatbotUid | string | Required | Public chatbot identifier returned by create or list responses. |
senderId | string | Optional | WhatsApp sender number for global tokens. Number-scoped tokens can only access their assigned sender. |
Get one chatbot
curl -X GET "https://graph.whats91.com/api/v2/chatbots/bot_invoice_help?senderId=916268662275" \
-H "Authorization: Bearer w91_public_token_here"Get response
{
"success": true,
"message": "Chatbot retrieved",
"data": {
"senderId": "916268662275",
"phoneNumberId": "1043189608869917",
"wabaId": "1605386820498470",
"chatbot": {
"chatbotUid": "bot_invoice_help",
"uid": "bot_invoice_help",
"name": "Invoice Help",
"botType": "simple",
"triggerType": "contains",
"replyTrigger": "invoice, bill",
"replyText": "Please share your invoice number.",
"status": 1,
"priority": 5
}
},
"metadata": {
"apiVersion": "v2",
"requestId": "request-uuid"
}
}Error Response
CHATBOT_NOT_FOUND
{
"success": false,
"error": {
"code": "CHATBOT_NOT_FOUND",
"message": "Chatbot UID does not belong to the authenticated sender."
},
"metadata": {
"apiVersion": "v2",
"requestId": "request-uuid"
}
}SDK Examples
Use these examples as starting points for server-side implementations.
cURL
curl -X GET "https://graph.whats91.com/api/v2/chatbots/{chatbotUid}" \
-H "Authorization: Bearer w91_live_xxx"Node.js
const response = await fetch("https://graph.whats91.com/api/v2/chatbots/{chatbotUid}", {
method: "GET",
headers: {
"Authorization": "Bearer w91_live_xxx",
"Content-Type": "application/json"
}
});
const data = await response.json();
console.log(data);PHP
$ch = curl_init("https://graph.whats91.com/api/v2/chatbots/{chatbotUid}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer w91_live_xxx",
"Content-Type: application/json"
]
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;Python
import requests
response = requests.request(
"GET",
"https://graph.whats91.com/api/v2/chatbots/{chatbotUid}",
headers={
"Authorization": "Bearer w91_live_xxx",
"Content-Type": "application/json",
}
)
print(response.json())C#
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer w91_live_xxx");
var request = new HttpRequestMessage(HttpMethod.Get, "https://graph.whats91.com/api/v2/chatbots/{chatbotUid}");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());Related APIs
Chatbot
List Whats91 chatbot configurations for the resolved WhatsApp sender.
Create Chatbot
Create a chatbot with the generic public v2 endpoint by providing response.type.
Text Chatbot
Create simple keyword-triggered text chatbot responses.
Media Chatbot
Create chatbot replies that include public HTTPS media assets.