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 from the number (API or phone); MESSAGE.STATUS_UPDATED = a message you sent was delivered or read; CONNECTION.UPDATED = the number connected, disconnected, was logged out or banned; QRCODE.UPDATED = pairing QR Code generated or expired.

Available options:
MESSAGE.RECEIVED,
MESSAGE.SENT,
MESSAGE.STATUS_UPDATED,
CONNECTION.UPDATED,
QRCODE.UPDATED
Example:
enabled
boolean
default:true

Whether the webhook is active. Default: true.

Response

Webhook created.

data
object

Created webhook, including its signing secret.