Skip to main content
Trigger AI Reply
curl --request POST \
  --url https://api.periskope.app/v1/ai/reply \
  --header 'Content-Type: application/json' \
  --data '
{
  "chat_id": "120363025896399300@g.us",
  "unique_id": "BAE58B775A57D71E",
  "org_phone": "919874532456"
}
'
{
  "success": true,
  "message": "AI reply triggered",
  "trace_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}

Headers

x-phone
string

The connected WhatsApp phone number for scope validation

Example:

"919874532456"

Body

application/json
chat_id
string
required

The unique identifier of the chat to reply in

Example:

"120363025896399300@g.us"

unique_id
string
required

The unique_id of the message to reply to. The AI will use this message and its surrounding context to generate a reply

Example:

"BAE58B775A57D71E"

org_phone
string
required

The phone number of the organization (connected WhatsApp number) in the format country_code + number without special characters

Example:

"919874532456"

Response

AI reply triggered successfully

success
boolean
Example:

true

message
string
Example:

"AI reply triggered"

trace_id
string<uuid>

A unique trace ID for tracking the AI reply processing

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"