Skip to main content
POST

Overview

Creates a template webhook. It does not depend on an instance — the instanceId is stored as null automatically — and receives only WhatsApp template events. The events field accepts only UPDATE_TEMPLATE_STATUS and UPDATE_TEMPLATE_CATEGORY. Any non-template event results in 422.

payloadFormat is ignored

For template webhooks the format is always DEFAULT. You may omit the field; if sent (any value), it is silently discarded and persisted as DEFAULT.

HMAC signing

If signing: true, the secret field is generated and returned only in this response. Store it securely — it will not be shown again.
After creation, routing may take up to ~5 min to reflect (cache TTL).

Authorizations

Authorization
string
header
required

Secret Key generated in the Omni Z-API Security panel

Body

application/json
url
string
required

Destination URL for the events

Example:

"https://destination/webhook"

events
enum<string>[]
required

Template events only. At least one required. Any non-template event results in 422.

Minimum array length: 1

Accepted template events: UPDATE_TEMPLATE_STATUS (template status update — approved/rejected etc.) and UPDATE_TEMPLATE_CATEGORY (template category update).

Available options:
UPDATE_TEMPLATE_STATUS,
UPDATE_TEMPLATE_CATEGORY
Example:
description
string

Optional webhook description

Example:

"Template webhook"

signing
boolean
default:false

Enables HMAC-SHA256 signing. When true, generates and returns a 64-character hex secret only on create/update.

Example:

false

authType
enum<string>
default:NONE

Authentication type (flat form). Alternative to the auth object.

Available options:
NONE,
BEARER,
API_KEY,
BASIC,
CUSTOM_HEADER
Example:

"NONE"

token
string

Credential for BEARER (flat form)

key
string

Credential for API_KEY (flat form)

auth
object

Nested authentication form. For BASIC use username+password; for CUSTOM_HEADER use headerName+headerValue.

payloadFormat
enum<string>
default:DEFAULT

Ignored for template webhooks — the format is always DEFAULT. May be omitted; if sent (any value), it is discarded and persisted as DEFAULT.

Available options:
DEFAULT
Example:

"DEFAULT"

customAttributes
object

Free-form map of extra attributes

Example:

Response

Template webhook created successfully. channelId and instanceId come back null. The secret field is returned only in this response when signing is true.

id
string

Unique template webhook ID

Example:

"8F2C00000000000000000000000000A1"

channelId
string | null

Always null for template webhooks

Example:

null

instanceId
string | null
deprecated

Deprecated and always null for template webhooks

Example:

null

url
string

Destination URL for the events

Example:

"https://destination/webhook"

description
string | null

Webhook description

Example:

"Template webhook"

events
enum<string>[]

Configured template events

Accepted template events: UPDATE_TEMPLATE_STATUS (template status update — approved/rejected etc.) and UPDATE_TEMPLATE_CATEGORY (template category update).

Available options:
UPDATE_TEMPLATE_STATUS,
UPDATE_TEMPLATE_CATEGORY
Example:
status
enum<string>

Current webhook status

Available options:
ENABLED,
DISABLED
Example:

"ENABLED"

signing
boolean

Indicates whether HMAC signing is enabled

Example:

false

auth
object

Summary of the configured authentication — credentials are not returned for security reasons

payloadFormat
enum<string>

Always DEFAULT for template webhooks

Available options:
DEFAULT
Example:

"DEFAULT"

customAttributes
object
Example:
createdAt
string<date-time>
Example:

"2026-07-15T19:00:00.000+00:00"

updatedAt
string<date-time>
Example:

"2026-07-15T19:00:00.000+00:00"

secret
string | null

64-character hex HMAC secret — returned only when signing = true on create/update. null when signing is disabled. It cannot be retrieved afterwards.

Example:

null