Skip to content

Receive responses as they happen

Add a webhook endpoint in the dashboard or with the API, choose its events and surveys, keep its signing secret, send a test and read the delivery log.

A webhook endpoint is a URL of yours that UserLoop posts a signed JSON event to the moment something happens: a customer answers, a submission is completed, a survey goes live. Use one to put responses into your own database, CRM or support tool without polling the API.

Before you start

  • You need a URL on the public internet that accepts POST requests over https (port 443 or 8443) and answers with a 2xx status within 10 seconds. The full list of what a URL may be is in Retries, duplicates and ordering.
  • To add an endpoint with the API, you need a key with the reports:write scope, and also responses:read when the endpoint receives any response. event. See Authentication and scopes.

Choose the events

Each endpoint picks its own events. An event reaches only the endpoints that chose it, and only for the surveys they chose.

Event In the dashboard Sent when data holds
response.new New response Each answer to a question, as it arrives, before the customer has finished. The answer, with response_id, survey, received_at and final (true when it is the survey’s last answer).
response.completed Submission completed The submission settles: 15 seconds after its final answer, 90 seconds after its latest answer, and at most 15 minutes after its first. The whole submission, as GET /responses/{response_id} returns it.
response.updated Submission updated More answers arrive after the submission settled. The whole submission with every answer so far, and generation (1 for the first update, then 2 …).
response.low_score Low-score submission With response.completed, when a number score answer is low: 0 to 6 on NPS, else the bottom quarter of the scale. The whole submission, and low_score with the question_id and score.
survey.published Survey published A survey goes live, or its live version is replaced. The survey, as GET /surveys lists it, and its version.
survey.unpublished Survey unpublished A live survey is unpublished, switched off, archived or deleted. The survey; deleted: true when it was deleted.

For a copy of each submission in your own system, response.completed alone is usually enough. Add response.updated if customers sometimes come back to a survey. Every event’s full schema is in Webhook events.

Add an endpoint in the dashboard

  1. Open the Webhooks page

    In the sidebar, select Integrations, then Webhooks. Select Add endpoint.

  2. Enter the URL and the events

    In Endpoint URL, enter your receiver’s address, starting https://. Under Events, tick the events it should get.

    The Add a webhook endpoint dialog: Endpoint URL holding https://hooks.example.com/userloop, the Events checkboxes with Submission completed ticked, Surveys with Every survey, new ones included selected, the Completed submissions only and Include customers’ contact details checkboxes, and Description (optional)
  3. Choose the surveys

    Under Surveys, keep Every survey, new ones included, or choose Only some surveys and tick them (at most 100).

  4. Choose what the events include

    Tick Completed submissions only to send Submission completed, Submission updated and Low-score submission only for customers who reached the last question. New response is always sent.

    Tick Include customers’ contact details to send customers’ email addresses and names in full. Without it they are masked (ja**@ex*****.com).

    In Description (optional), add a note that tells your endpoints apart, such as “Data warehouse”.

  5. Add it and copy the secret

    Select Add endpoint. The dialog changes to Endpoint added, with the signing secret under Copy the signing secret now. Select Copy, store the secret where your receiver can read it, then select I’ve copied it.

    The Endpoint added dialog: A test event is on its way to hooks.example.com, the Copy the signing secret now alert, the secret (covered in this picture) with its Copy button, and I’ve copied it

Adding an endpoint sends it a webhook.test event straight away.

Or add it with the API

curl https://app.userloop.io/api/v1/webhooks \
  -H "Authorization: Bearer ulk_live_…" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://hooks.example.com/userloop",
    "events": ["response.completed", "response.updated"],
    "survey_ids": ["1710884429805x361876466030084100"],
    "completed_only": true,
    "description": "Data warehouse"
  }'

UserLoop answers 201 Created with the endpoint and its secret:

{
  "webhook": {
    "id": "jd7c4x9m2q8w1r5t3y6n0v4b8h2k7f1p",
    "host": "hooks.example.com",
    "url": "https://hooks.example.com/userloop",
    "description": "Data warehouse",
    "events": ["response.completed", "response.updated"],
    "survey_ids": ["k17f3n8w2q9d0c6v4m1r5t7y3h2b8x0j"],
    "completed_only": true,
    "include_contact_details": false,
    "status": "active",
    "status_reason": null,
    "source": "api",
    "created_at": "2026-11-11T10:02:11.000Z",
    "last_success_at": null,
    "last_failure_at": null,
    "failing_since": null,
    "last_http_status": null,
    "previous_secret_valid_until": null
  },
  "secret": "whsec_…",
  "existing": false
}
Field What it does
url Required. Your receiver, at most 2,048 characters.
events Required. One or more of the six events above.
survey_formats Optional. Keep events to checkout, popup, app_block, link, email or website. Omit it for all formats. Zapier connections are always restricted to link, email and website surveys.
survey_ids Only these surveys (id or public_id), at most 100. Leave it out for every survey, new ones included.
completed_only As Completed submissions only. Default false.
include_contact_details As Include customers’ contact details. Default false. Only a key created with access to contact details may turn it on.
description At most 120 characters.
source zapier, make or n8n when one of those apps subscribes; default api. Shown on the Webhooks page.
  • secret is returned only in this answer. Store it straight away.
  • Sending the same subscription again (same key, URL, events, surveys and options) returns the existing endpoint with "existing": true and "secret": null, so a subscribe step that runs twice doesn’t create two endpoints.
  • With an Idempotency-Key header, a replay returns "secret": null and a note: the secret is never stored for replays. Roll the secret if you lost it.
  • An endpoint added with an API key stops when that key does: once the key is revoked or expires, or its creator leaves the organisation, the endpoint is paused and can’t be resumed with that key. One added in the dashboard belongs to the organisation.

GET /webhooks lists the organisation’s endpoints, and DELETE /webhooks/{webhook_id} removes one.

Send a test

On the Webhooks page, select Send test on the endpoint. UserLoop posts a signed webhook.test event and shows the result under the endpoint, for example Delivered: HTTP 200 in 84 ms, or why it failed.

With the API:

curl -X POST https://app.userloop.io/api/v1/webhooks/jd7c4x9m2q8w1r5t3y6n0v4b8h2k7f1p/test \
  -H "Authorization: Bearer ulk_live_…"
{ "ok": true, "status": 200, "duration_ms": 84, "error": null, "event_id": "evt_6f1d0b9a3c7e45d28b4a9e0c1f7d3b52" }

ok is true when your receiver answered with a 2xx within 10 seconds. A test doesn’t change the endpoint’s health. Each endpoint takes at most 5 tests a minute.

To map fields before a real event arrives, GET /webhooks/samples/{event_type} returns up to 10 recent real items in that event’s exact envelope (contact details masked). Add survey_id to take them from one survey.

Read the delivery log

On the Webhooks page, select Deliveries on an endpoint. Each delivery shows its event, when it was sent, its status, its attempts (such as “3 of 10 attempts · next 5 Nov, 12:07”), the last HTTP status, and the error when there was one.

The Deliveries panel of an endpoint: rows marked Retrying, Failed and Delivered, each with its event and the error or HTTP status, and a Resend button on the failed row
Status Meaning
Queued Waiting for its first attempt.
Delivered Your receiver answered with a 2xx.
Retrying An attempt failed; the next one is scheduled.
Failed Every attempt failed, or the event couldn’t be sent. An organisation admin can select Resend to give it a fresh set of attempts.
Skipped Not sent, because the endpoint was removed, paused or turned off, or the plan no longer includes webhooks.

Deliveries are kept for 90 days. How attempts are spaced, and when an endpoint is turned off, is in Retries, duplicates and ordering.

What an event looks like

Every event is a POST with a JSON body and these headers:

Header Value
Content-Type application/json
User-Agent UserLoop-Webhooks/1
UserLoop-Event The event type, such as response.completed.
UserLoop-Event-Id The event’s ID, the same on every retry and for every endpoint. Deduplicate on it.
UserLoop-Delivery One series of attempts to one endpoint.
UserLoop-Signature t=<Unix seconds>,v1=<signature>. See Verify a webhook’s signature.

The body is the event envelope. A response.completed event, in full:

POST /userloop HTTP/1.1
Host: hooks.example.com
Content-Type: application/json
User-Agent: UserLoop-Webhooks/1
UserLoop-Event: response.completed
UserLoop-Event-Id: evt_3b9e2d7f0a6c4851b2e9d4f7a0c3e6b1
UserLoop-Delivery: kx72m9c4q1w8r3t6y0n5v2b7h4j9f1d6
UserLoop-Signature: t=1762855466,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd

{
  "id": "evt_3b9e2d7f0a6c4851b2e9d4f7a0c3e6b1",
  "type": "response.completed",
  "api_version": "v1",
  "created_at": "2026-11-11T10:04:11.000Z",
  "organisation_id": "org_2xK9pQ7mT3vN8bR1",
  "data": {
    "response_id": "3f9c1a7e5b2d48c6a0e1f7b9d3c5a8e2f4b6d8a0c2e4f6a8b0d2c4e6f8a0b2c4",
    "survey": { "public_id": "1710884429805x361876466030084100", "title": "Post-purchase survey" },
    "received_at": "2026-11-11T10:04:11.000Z",
    "started_at": "2026-11-11T10:03:40.000Z",
    "channel": "thank_you",
    "customer": { "name": "J. D.", "email": "ja**@ex*****.com", "masked": true },
    "order": { "order_id": "5839201847361", "order_number": 1042, "total": 64.5, "currency": "GBP", "products": ["Rose face oil"] },
    "attribution": { "source": "instagram", "medium": "social" },
    "answers": [
      {
        "question_id": "1710884436289x589566297607766000",
        "question": "How likely are you to recommend us to a friend?",
        "type": "number_score",
        "score": 9
      },
      {
        "question_id": "1710884441102x447120985331204100",
        "question": "How did you hear about us?",
        "type": "single_select",
        "answer": ["Instagram"],
        "answer_ids": ["1710884441108x118605297512448000"]
      }
    ]
  }
}
Envelope field What it is
id The event’s ID (evt_…), equal to the UserLoop-Event-Id header.
type The event type.
api_version v1. An endpoint keeps the version it was created with.
created_at When the event happened (ISO 8601, UTC).
organisation_id The UserLoop organisation (org_…).
data The event’s content: see the first table. A submission’s fields are described in List and search responses.
truncated Present, and true, when answers were left out to keep the body within 256 KB.

data.response_id opens the same response with GET /responses/{response_id}. New fields and event types can be added within v1, so ignore what you don’t recognise.

Answer quickly

Answer with a 2xx as soon as you have checked the signature and stored the event, and do the slow work afterwards. A receiver that takes longer than 10 seconds counts as failed, and the event is sent again. See Retries, duplicates and ordering.

Pause, roll the secret or remove

Each endpoint on the Webhooks page has a menu (⋯) with:

  • Pause: nothing is sent until you select Resume. Events that happen meanwhile are skipped, not saved for later.
  • Roll secret: a new signing secret, shown once. For 24 hours every event is signed with both the old and the new secret, so you can switch without missing one. With the API, POST /webhooks/{webhook_id}/roll-secret does the same.
  • Remove: nothing more is sent, including events waiting to retry. It can’t be undone: add the URL again to get events, with a new secret.

Only the person who added an endpoint, or an organisation admin, can change it.

Check it worked

After you add the endpoint, your receiver gets a webhook.test event, and the endpoint’s Deliveries show it as Delivered. Then answer one of the endpoint’s surveys yourself: a response.completed event follows once the response settles, 15 seconds after you answer the last question.

What can go wrong

You see What to do
The URL must start with https://. Use an https address.
The URL can use port 443 or 8443 only. Serve the receiver on 443 or 8443, or leave the port out.
The URL must be on the public internet, not a private, local or special-use address. or The URL’s host resolves to a private, local or special-use address. UserLoop only posts to public addresses. For local testing, use a tunnel that gives you a public https URL.
The URL needs a full public host name, such as hooks.example.com. Use a full host name, not localhost or a bare name.
The URL can’t be one of UserLoop’s own addresses. Use your own server’s URL. Point it at your own server.
An organisation can have at most 20 webhook endpoints. Remove one to add another. Remove an endpoint you no longer use.
This API key was created without access to customers’ contact details, so its webhooks can’t include them. Create a key with Include customers’ contact details when asked, or leave include_contact_details out.
That endpoint had 5 tests in the last minute. Try again in a minute. Wait a minute.
The test fails with The endpoint answered HTTP 301. (or another 3xx) UserLoop doesn’t follow redirects. Use the final URL.
The test fails with The endpoint didn’t answer within 10 seconds. Answer before doing the slow work.
Every delivery fails at your end with a signature error See Verify a webhook’s signature.

Type to search…

↑↓ navigate↵ selectEsc close