Pull events
Pull is the outbound-HTTPS alternative to webhooks. Use it when the consumer sits behind NAT, a firewall, or a private network and cannot receive WazzAPI callbacks. Webhook is still the default when you have a reachable HTTPS URL. Pull delivers the same event types; it is not message-history pagination and not the provider webhook WazzAPI uses to ingest WhatsApp.When to use Pull vs webhooks
Create a subscription
Management calls use your organization API key. Creation is gated bywebhook_access. Store the returned token immediately — plaintext is shown only on create and rotate.
client.pull_subscriptions (Python) and client.pullSubscriptions (Node).
Poll
Polling uses only the Pull token (Authorization: Bearer wzpull_...). Do not poll with the org API key.
timeout=0is a short poll.1..60enables long polling.- SDKs set a transport timeout of server timeout + 10 seconds. Raw HTTP clients must do the same.
- A
200means the batch was returned, not that your handler succeeded. - Persist
next_offsetonly after the entire batch is processed. Deduplicate by stableevent_id. - One active poller per subscription. A second poller gets
409 poller_conflict.
Offset rules
New subscriptions start at the current head. Existing events are not replayed.
Skip a poison event
Only the current contiguous cursor head can be skipped. There is no automatic skip.SDK consumer
Both SDKs shipPullSubscriptionConsumer with a durable offset store. An in-memory integer is not enough across restarts.
examples/pull-events.ts and examples/pull_events.py in the SDK repos.
Error codes
invalid_offset, poller_conflict, cursor_expired, subscription_paused, rate_limited, invalid_token.
Limits: limit 1..100, timeout 0..60. Excessive short polling returns 429 with Retry-After.