curl --request POST \
--url https://api.omni.z-api.io/v1/default-instance-webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://app.yourcompany.com/webhooks/omni-zapi",
"description": "Events from all channels",
"events": [
"MESSAGE_RECEIVED",
"MESSAGE_STATUS",
"DISCONNECTED"
]
}
'{
"id": "5B7E3A90C2D14F6A8E1B2C3D4E5F6A7B",
"channelId": null,
"instanceId": null,
"url": "https://app.yourcompany.com/webhooks/omni-zapi",
"description": "Events from all channels",
"events": [
"MESSAGE_RECEIVED",
"MESSAGE_STATUS",
"DISCONNECTED"
],
"status": "ENABLED",
"signing": false,
"secret": null,
"auth": {
"type": "NONE",
"configured": false
},
"payloadFormat": "DEFAULT",
"customAttributes": {},
"createdAt": "2026-10-22T15:00:00.000+00:00",
"updatedAt": "2026-10-22T15:00:00.000+00:00"
}Create default webhook
Register a webhook that receives the events of every channel in the workspace
curl --request POST \
--url https://api.omni.z-api.io/v1/default-instance-webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://app.yourcompany.com/webhooks/omni-zapi",
"description": "Events from all channels",
"events": [
"MESSAGE_RECEIVED",
"MESSAGE_STATUS",
"DISCONNECTED"
]
}
'{
"id": "5B7E3A90C2D14F6A8E1B2C3D4E5F6A7B",
"channelId": null,
"instanceId": null,
"url": "https://app.yourcompany.com/webhooks/omni-zapi",
"description": "Events from all channels",
"events": [
"MESSAGE_RECEIVED",
"MESSAGE_STATUS",
"DISCONNECTED"
],
"status": "ENABLED",
"signing": false,
"secret": null,
"auth": {
"type": "NONE",
"configured": false
},
"payloadFormat": "DEFAULT",
"customAttributes": {},
"createdAt": "2026-10-22T15:00:00.000+00:00",
"updatedAt": "2026-10-22T15:00:00.000+00:00"
}Overview
Creates a default webhook in the secret key’s workspace. From then on, Omni Z-API sends to the given URL the subscribed events of every channel in the workspace that has no active webhook of its own. See Who receives each event. Theevents field accepts only channel events (MESSAGE_RECEIVED, MESSAGE_STATUS, CONNECTED, etc.). A template event results in 422.
Format
payloadFormat accepts DEFAULT (when omitted) and Z_API. CHATWOOT results in 422: Chatwoot is configured on each channel’s webhook.
Limit
Each workspace has up to 5 default webhooks, counting enabled and disabled ones. The sixth results in422 with Default instance webhook limit reached (5).
HMAC signing
Ifsigning: true, the secret field is generated and returned only in this response. Store it securely: it will not be shown again.
The signature arrives in the x-webhook-signature header and is computed over a canonical string of five fields, not just the body. See HMAC signing.
http or https, up to 2048 characters, and its host must resolve only to public addresses.Authorizations
Secret Key generated in the Omni Z-API Security panel
Body
Creation body
Destination URL for the events. Absolute http or https URL, up to 2048 characters, whose host resolves only to public addresses.
"https://app.yourcompany.com/webhooks/omni-zapi"
Channel events the webhook receives. At least one. Names are accepted in any case.
1MESSAGE_RECEIVED, MESSAGE_DELIVERY, MESSAGE_STATUS, RECEIVED_STATUS, RECEIVED_AND_DELIVERY, CONNECTED, DISCONNECTED, PRESENCE_CHAT, INITIAL_DATA, BLOCK [
"MESSAGE_RECEIVED",
"MESSAGE_STATUS",
"DISCONNECTED"
]
Optional webhook description
"Events from all channels"
true generates a 64-character hexadecimal secret for HMAC signing, returned only in this response.
Authentication type (flat form). Alternative to the auth object.
NONE, BEARER, API_KEY, BASIC, CUSTOM_HEADER Credential for BEARER (flat form)
Credential for API_KEY (flat form)
How Omni Z-API authenticates when calling your URL
Show child attributes
Show child attributes
DEFAULT (used when omitted) or Z_API. CHATWOOT is rejected with 422: configure Chatwoot on the channel webhook. Any other value is treated as DEFAULT.
DEFAULT, Z_API Free map of extra attributes
Response
Default webhook created. channelId and instanceId are null. secret is filled only when the request has signing: true, and this is the only time it is shown.
Default webhook ID
"5B7E3A90C2D14F6A8E1B2C3D4E5F6A7B"
Always null: the default webhook does not belong to a channel
null
Always null. Legacy field, kept for compatibility
null
"https://app.yourcompany.com/webhooks/omni-zapi"
"Events from all channels"
MESSAGE_RECEIVED, MESSAGE_DELIVERY, MESSAGE_STATUS, RECEIVED_STATUS, RECEIVED_AND_DELIVERY, CONNECTED, DISCONNECTED, PRESENCE_CHAT, INITIAL_DATA, BLOCK ENABLED or DISABLED
ENABLED, DISABLED true when HMAC signing is on
HMAC signing secret. Filled only in the response that generated it (signing: true); null otherwise.
Summary of the configured authentication. Credentials are not returned.
Show child attributes
Show child attributes
DEFAULT, Z_API Creation date
Last update date