WhatsApp · Business Agent

Send a test message

Sends a test message.

POSThttps://api.pozy.ai/v1/accounts/{accountId}/business-agent/test-messages
sendBusinessAgentTestMessage

Guide: Business AI agent

Request

Send your API key as Authorization: Bearer pz_live_.... Read-only keys cannot call it. Keys with the messages resource group disabled get 403 resource_group_disabled. Authentication

Path parameters

NameTypeNotes
accountIdrequiredstring

Request body

application/json, required

  • messagestringrequired

    Up to 4096 characters.

  • conversationIdstring

Example

curl -X POST "https://api.pozy.ai/v1/accounts/696e0b682d0a31188e7a2ba9/business-agent/test-messages" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "message": "Hello from Pozy"
}'

Response

200 on success

  • message_idstringrequired
  • agent_responsestringrequired
  • conversation_idstringrequired
  • timestampinteger
  • handoff_reasonstring
  • no_response_reasonstring
  • quick_repliesarray of string
  • product_variant_idsarray of string
200 response
{
  "message_id": "68fa713eb12c02cd1b5b5f8d",
  "agent_response": "string",
  "conversation_id": "6c0c59452238e0c7d5a35100",
  "timestamp": 1,
  "handoff_reason": "string",
  "no_response_reason": "string",
  "quick_replies": [
    "string"
  ],
  "product_variant_ids": [
    "string"
  ]
}

Errors

Errors use one shape: { error, type, code, param?, details? }. The ones you are most likely to see here:

400invalid_request_errorA parameter or body field is missing or invalid. param names it.
401authentication_errorThe API key is missing, revoked or expired.
403permission_errorThe key is read-only, scoped to other profiles, or has this resource group disabled.
404not_foundNothing with that id exists in your workspace.
429rate_limit_errorToo many requests this minute. Wait for Retry-After seconds.

Every code is listed in Errors.

More in Business Agent