Skip to main content
POST
Create webhook

Authorizations

Authorization
string
header
required

Account token (zpfy_acct_...) — manages instances and webhooks.

Path Parameters

id
string
required

Instance ID.

Body

application/json
url
string<uri>
required

HTTPS URL that will receive the events via POST.

Example:

"https://your-app.com/webhooks"

events
enum<string>[]
required

Events that trigger the webhook.

Minimum array length: 1

Event type. MESSAGE_RECEIVED = incoming message; MESSAGE_SENT = message sent by the instance; MESSAGE_STATUS = delivery/read status change; CONNECTION_UPDATE = instance connection change; QRCODE_UPDATED = new QR Code to pair.

Available options:
MESSAGE_RECEIVED,
MESSAGE_SENT,
MESSAGE_STATUS,
CONNECTION_UPDATE,
QRCODE_UPDATED
Example:
enabled
boolean
default:true

Whether the webhook is active. Default: true.

Response

Webhook created.

data
object