post
https://partner.gupshup.io/partner/app//bizai/agent_test
Tests the agent without a real consumer. Testing tokens are not billed. Conversations cannot be deleted.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Request parameters
| Parameter | Type | Required | In | Description |
|---|---|---|---|---|
Authorization | string | Yes | Header | Partner app token, sent raw. Bearer <token> is also accepted. |
Content-Type | string | Yes | Header | application/json |
appId | string (uuid) | Yes | Path | Partner Portal app id. Stands in for Meta's entity_id. |
user_msg | string | Yes | Body | Message to send to the agent as if from a consumer. |
conversation_id | string | No | Body | Reuse to continue a test conversation. Must be a string. |
Example request
curl --location --request POST 'https://partner.gupshup.io/partner/app/<appId>/bizai/agent_test' \
--header 'Authorization: <PARTNER_APP_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"user_msg": "Hello, what are your store hours?",
"conversation_id": "conv_12345"
}'Response parameters — 200
200| Parameter | Type | Description |
|---|---|---|
message_id | string | Id of the agent's reply. |
agent_response | string | The agent's reply text. |
conversation_id | string | Test conversation id. Reuse it to continue the same conversation. |
timestamp | integer | Unix seconds, sent as a string. |
handoff_reason | string | Why the agent handed off, if it did. |
no_response_reason | string | e.g. ELIGIBILITY_CHECK_FAILED. |
quick_replies | array of string | Quick-reply buttons the agent offered. |
product_variant_ids | array of string | Catalog products the agent referenced. |
Example response — 200 OK
200 OK{
"message_id": "wamid.HBgMOTE5OTk5OTk5OTk5FQIAERgSExampleId",
"agent_response": "We are open 9AM to 6PM IST, Monday to Saturday.",
"conversation_id": "conv_12345",
"timestamp": 1789630852,
"quick_replies": ["Talk to an agent"],
"product_variant_ids": []
}Error responses
400 Bad Request — The app is not live, or WASS does not consider it live.
{
"message": "App is not live.",
"status": "error"
}400 Bad Request — The app has no phone number attached. Checked before the live check.
{
"message": "Phone id not found for the given App",
"status": "error"
}401 Unauthorized — Authorization is missing or invalid, belongs to another app, or appId is unknown or not a UUID.
{
"status": "error",
"message": "Unauthorised access to the resource. Please review request parameters and headers and retry"
}405 Method Not Allowed — Any method other than GET, POST, PUT or DELETE, e.g. PATCH.
{
"status": "error",
"message": "Request method 'PATCH' is not supported"
}429 Too Many Requests — More than 30 /bizai/** requests in 60 seconds for this app. The 31st is rejected.
{
"status": "error",
"message": "Too Many Requests"
} 429Per-app rate limit exceeded. Retry after the 60-second window.
