Home/Email API/Webhook vs API

Webhook vs API

An API is you asking. A webhook is being told. One pulls on demand, the other pushes on events, and almost every production system needs both.

Verified By Kam Low, Co-founder · Updated

The difference in one table

An API call is a question you ask when you want an answer now: send this, fetch that. A webhook is a standing instruction: when this happens, tell me at this URL. The API puts you in control of timing; the webhook puts the event in control.

Polling an API for changes is the tell you needed a webhook: asking "anything new?" every minute is expensive on both sides and still up to a minute late. The push arrives once, when it happened.

The split shapes how I design ours. The raw API is more transactional: one request, one effect, an answer now. Credentials follow the same line. API keys should just be for REST, with webhooks trusted by signature instead of by key.

API shape matters as much as API existence. When the question is repetitive, the answer belongs in the contract.

In email, you need both

Email makes the split concrete. The API sends the message: POST, message ID back, done. The webhook reports its life afterwards: delivered, opened, clicked, bounced, complained, each POSTed to your endpoint as it happens. Each arrives with one typed name, email.delivered, email.opened, email.clicked, email.bounced, email.complained, so a handler keys on one vocabulary. Feedback arrives classified, hard and soft bounces with subtypes and complaint feedback types, and every event carries a deduplication key, so your handler can drop a replayed POST instead of counting it twice.

Build with only the API and you're blind after the send. Build with only webhooks and you can't send. The two are one loop: act through the API, react through the webhook, and let your agent close the loop, a bounce fires, the contact gets suppressed, and you read about it afterwards.

A real trace of that loop from our own ops: a send reports six failures, and every one reads contact email is suppressed from earlier bounce suppressions. That's the system working: yesterday's webhook events protecting today's API calls, with nobody watching a dashboard in between. The counters behind that loop hold one invariant: provider open webhooks are mirrored into email:open_total, so the number stays true whichever writer records it. And the loop runs in your direction too: POST /v1/my/events accepts arbitrary event names with a custom data payload and fires flow triggers, so your own product events can start flows exactly the way email events do.

George, our co-founder, tracks where the traffic actually goes: 94% of our usage is now via API, not UI. That number is why the contract gets guarded like one. After a weekend breaking change got past us, we stood up an 80/20 API canary so a future contract break surfaces in CI or within about 24 hours, not through customer complaints. The same conservatism applies where we are the consumer: product fixes, like one to Stripe checkout return URLs, are scoped so they never change Stripe webhook semantics, subscription creation, pricing, or payment state transitions.

The unglamorous failure modes sit at the edges. Slack webhook verification and delivery even ships as a product feature. The pattern generalizes: the webhook you did not register, verify, or version is the one that costs you.

Agents bend the pull-push split in an interesting way. An agent is transient: it runs, acts, and exits, so it usually can't host the public HTTPS endpoint a webhook wants to POST to. Agents poll. The first fully productized MCP client on our platform checks campaign state every fifteen minutes, and nitro_query now accounts for 43 percent of agent traffic: agents asking what happened, then deciding what to do next. Push for servers, pull for agents, the same events underneath both.

Full parameters and responses live in the REST API docs and the API reference.

API - you ask
09:00anything new? → no
09:05anything new? → no
09:10anything new? → no
09:15anything new? → yes, 12m ago
Polling: late by design.
Webhook - you're told
09:03
POST yourapp.com/hooks
"bounced" - the moment it happened
One request. Zero seconds stale.

API out, webhook back, a person closing the loop in between: that's the pattern this whole page describes. The pattern I actually want is an agent closing it, Claude, Cursor, or Codex sending through the API and reading the webhook events without you writing the glue code between the two. That's the platform Nitrosend is built to be, and it's why we're a listed app in the ChatGPT app marketplace rather than just an API with a webhook bolted on.

Go deeper

The mechanics: webhooks explained. Before production: test your webhook and secure it. Whichever you choose, the receipts feed the same things: bounce rate and the reliability of transactional email.

FAQ

What is the difference between a webhook and an API?

An API is request-response: your code asks and waits for an answer. A webhook is event-push: the platform POSTs to your URL the moment something happens. APIs act; webhooks react.

When should I use a webhook instead of an API?

Whenever you'd otherwise poll. If your code asks an API on a timer whether anything changed, register a webhook and let the change come to you.

First send in thirty seconds.

Unlimited contacts. Choose your sending volume.

Campaigns, flows and transactional email on every plan. See current prices, included allowances and prepaid services.

Compare plans → · Pricing for agents