Bringing AutoConfig to Polling Endpoints

- Name
- Luciano Bianchi
A few weeks ago, we launched Webhooks AutoConfig, a much easier way to set up and consume webhooks.
Now, we're bringing the same convenience to Polling Endpoints. Polling Endpoints still had to be created and updated in the UI, separately from the worker that reads them. With AutoConfig, the endpoint configuration and the worker code can live in the same place and stay in sync.
How to use it
In the Application Portal, webhook consumers can now select Use AutoConfig when creating a Polling Endpoint.

The portal will issue a token. It also contains the credentials for polling, so you don't need to wire in any additional keys. Pass that to AutoConfigConsumer and call subscribe():
import { AutoConfigConsumer } from 'svix'
const consumer = new AutoConfigConsumer(AUTO_CONFIG_TOKEN, {
filterTypes: ['invoice.paid', 'user.created'],
})
await consumer.subscribe()
Like AutoConfig for regular webhook endpoints, subscribe() creates or updates the endpoint with the given configuration.
Polling for events
The AutoConfigConsumer instance has convenient methods to get batches of events and commit the processed ones, so the worker loop can be as simple as:
const consumerId = 'my-consumer'
while (workerRunning) {
const msgs = await consumer.receive(consumerId)
for (const msg of msgs.data) {
// Process msg.data...
console.log(msg)
}
if (msgs.data.length > 0) {
await consumer.commit(consumerId, msgs.data.at(-1).offset)
}
}
The Consumer ID is used to track progress, so the worker can pick up where it left off after a restart.
AutoConfig and Polling Endpoints can be enabled for your environment from the Svix dashboard. It's included on all plans and supported in every Svix SDK language.
For more information, please refer to the Polling Endpoints AutoConfig docs.
Great for AI agents
Polling Endpoints and AutoConfig are also great primitives for personal AI agents like OpenClaw or Hermes.
With Polling Endpoints, you don't need to expose public URLs from your machine to the internet. They also guarantee your agent never misses an event and always processes events in order, even after being down temporarily.
AutoConfig provides a simple API agents can understand and manage on their own, so you don't have to deal with any manual webhook configuration. Give your agent the AutoConfig token, and it does the rest.
Closing words
Polling Endpoints remove the need to expose a public HTTP endpoint to listen for events. AutoConfig lets you manage the endpoint configuration in code.
Together they make it easier to consume events, solving many of the difficulties that come with regular webhooks, like having to expose a public URL, verifying webhook signatures, or dealing with configuration drift.
We are excited about the possibilities that this combination opens up, and have many new things in the works to make it even more powerful!
For more content like this, make sure to follow us on Twitter, Github, or RSS for the latest updates for the Svix webhook service, or join the discussion on our community Slack.
Ready to send webhooks?
Svix is the enterprise ready webhooks service. Build a secure, reliable, and scalable webhook platform in minutes.