Skip to content

Retries, duplicates and ordering

How UserLoop delivers webhook events, at least once and in no set order, how it retries, when it turns an endpoint off, and the limits on size, URLs and endpoints.

UserLoop delivers each webhook event at least once, and in no guaranteed order. A receiver that deduplicates on the event ID and doesn’t depend on order handles every case below.

At least once, in any order

An event can reach your receiver more than once: when your answer was lost or slow, when an admin selects Resend, or when the same event goes to two of your endpoints. Every copy has the same event ID.

Events can also arrive out of order. A response.new for the last answer can arrive after the response.completed for the same response, and a retried event arrives after events that happened later. Don’t infer order from arrival:

  • Each envelope has created_at, when the event happened.
  • response.updated carries generation: 1 for the first update after the response was completed, then 2 and so on. Keep the copy of a response with the highest generation, and treat response.completed as generation 0.
  • When you need a response’s current state, read it with GET /responses/{response_id}.

What counts as success

UserLoop judges each attempt by the HTTP status your receiver returns. It never reads the body of your answer.

Your receiver UserLoop treats it as
Answers 2xx within 10 seconds Delivered.
Answers 410 Gone Remove this endpoint. See below.
Answers any other status, 3xx included Failed: retried. Redirects are never followed.
Doesn’t answer within 10 seconds, or can’t be reached Failed: retried.
Its host doesn’t resolve, or resolves to a private address Failed: retried.

Answer with a 2xx as soon as the event is verified and stored, and do the rest afterwards.

The retry schedule

A delivery gets 10 attempts. After each failed attempt, the next waits twice as long as the one before, starting at about a minute. Each wait is chosen at random between half and all of its value, so retries from many events don’t arrive together:

After failed attempt The next attempt comes after
1 30 seconds to 1 minute
2 1 to 2 minutes
3 2 to 4 minutes
4 4 to 8 minutes
5 8 to 16 minutes
6 16 to 32 minutes
7 32 to 64 minutes
8 About 1 to 2 hours
9 About 2 to 4¼ hours

From the first attempt to the tenth takes roughly 4 to 9 hours. If the tenth fails, the delivery shows as Failed in the endpoint’s Deliveries, and nothing more is tried. An organisation admin can select Resend on it to start a fresh set of 10 attempts, with the same event ID.

When an endpoint keeps failing

An endpoint with a failed delivery since its last success shows as Failing on the Webhooks page. If no delivery to it has succeeded for 3 days since that first failure, UserLoop turns it off at its next failed attempt:

  • Its status becomes Turned off, with “No successful delivery for 3 days”, and status: "disabled" with status_reason: "failing" in GET /webhooks.
  • The organisation’s admins get one email about it.
  • Events for it are skipped while it is off. They are not saved for later.

When your receiver works again, select Turn on again on the endpoint. Its failure count starts afresh. To catch up on what you missed, read the responses from the time it was off with GET /responses and a date range: see List and search responses.

Answering 410 removes the endpoint

A 410 Gone answer removes the endpoint at once: it shows as Removed, “It answered 410 Gone”, and nothing more is sent to it, including events waiting to retry. This is how Zapier, Make and n8n unsubscribe. Answer 410 only when you want the subscription gone; to get events again, add the endpoint again, with a new secret.

Deduplicate on the event ID

The event ID is in the envelope’s id and in the UserLoop-Event-Id header. It is the same on every retry, on a Resend, and for every endpoint the event goes to, and different for every event: each answer’s response.new, each response.updated generation and each test has its own.

Store the IDs you have handled and skip one you have seen. A unique key in your database does both in one step, even when two copies arrive at once:

CREATE TABLE userloop_events (
  id TEXT PRIMARY KEY,           -- evt_…
  type TEXT NOT NULL,
  received_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);

-- For each verified event: handle it only when this inserts a row.
INSERT INTO userloop_events (id, type) VALUES ($1, $2)
ON CONFLICT (id) DO NOTHING;

UserLoop-Delivery names one series of attempts to one endpoint. It is useful in your logs and in a support request, but not for deduplication.

Large responses are truncated

An event’s body is at most 256 KB. When a submission is bigger, UserLoop leaves answers out from the end of data.answers until the body fits, and adds "truncated": true to the envelope. Read the whole submission with GET /responses/{response_id}.

An event that can’t fit even with no answers isn’t sent. Its delivery shows as Failed with “The event is too large to send.”, it isn’t retried, and it doesn’t count as a failure of your endpoint.

Where an endpoint can point

UserLoop checks the URL when you add the endpoint and again before every delivery. A URL must:

  • start with https://, and use port 443 (the default) or 8443;
  • have a full public host name with at least one dot, such as hooks.example.com: not localhost, nor a name ending in .local, .localhost, .internal, .localdomain, .home.arpa, .onion, .test, .example or .invalid;
  • not be an IP address in a private, loopback, link-local, shared, documentation, multicast or other special-use range;
  • resolve, through DNS, only to public addresses;
  • not be one of UserLoop’s own addresses, such as any name under userloop.io;
  • not contain a user name or password;
  • be at most 2,048 characters.

For development, expose your local receiver through a tunnel that gives it a public https URL.

Limits

Limit Value
Endpoints per organisation 20, counting paused and turned-off ones; removed ones don’t count
Surveys one endpoint can name 100 (or every survey)
Time to answer 10 seconds
Attempts per delivery 10, over roughly 4 to 9 hours
Event body 256 KB
Test events 5 a minute per endpoint
Endpoint description 120 characters
Delivery log 90 days
Overlap after a secret roll 24 hours

Adding a 21st endpoint is refused: in the dashboard with An organisation can have at most 20 webhook endpoints. Remove one to add another., and through the API with 409 conflict and reason: "limit_reached".

Type to search…

↑↓ navigate↵ selectEsc close