Skip to main content
TypeScript

Authorizations

Authorization
string
header
required

Your Periskope API token, sent as Authorization: Bearer <token>. Generate one from the Periskope dashboard under Settings → API & Webhooks. API access requires an active Pro or Enterprise plan.

Body

application/json
chat_id
string
required

Id of the chat the AI agent should reply in — an individual chat (countrycode + number followed by @c.us, e.g. 911111111111@c.us) or a group chat (id followed by @g.us).

Minimum string length: 1
Example:

"120363000000000000@g.us"

unique_id
string
required

Unique id of the message the AI agent should reply to, as returned in the unique_id field of message records. The generated reply is sent as a reply to this message.

Minimum string length: 1
Example:

"3B35D00FB468D3XE3XBX"

org_phone
string
required

Org phone the AI agent should reply from, in WhatsApp server format: country code + number followed by @c.us (e.g. 911111111111@c.us). Must be a phone connected to the org.

Minimum string length: 1
Example:

"911111111111@c.us"

Response

The AI reply run was queued

success
enum<boolean>

Always true when the AI reply run was queued

Available options:
true
message
string

Human-readable confirmation message

Example:

"AI reply triggered"

trace_id
string

Trace id (UUID) assigned to the queued AI reply run. Use it to correlate the run in logs and when reporting issues — the 200 response only confirms the run was queued, not that the reply was sent.

Example:

"00000000-0000-0000-0000-000000000000"