---
title: "Long-poll for the next matching event"
method: GET
path: "/v1/endpoints/{id}/events/wait"
---

# Long-poll for the next matching event

`GET /v1/endpoints/{id}/events/wait`

## Request

- Base URL: `https://webhook-studio.com`
- URL: `https://webhook-studio.com/v1/endpoints/{id}/events/wait`
- Auth: HTTP bearer

Blocks until a matching event arrives or the timeout elapses. Non-matching events do not consume the wait. Use this instead of sleeping while a human triggers a test webhook.

## Response `200`

An event arrived

- object
  - `event` object
    - `id` string
    - `method` string
    - `headers` object
    - `body` string, nullable
    - `content_type` string, nullable
    - `source_ip` string, nullable
    - `provider` string, nullable: null means unattributed, not an error.
    - `event_type` string, nullable
    - `signature_valid` boolean, nullable
    - `signature_failure_reason` 'missing_header' | 'malformed_header' | 'malformed_timestamp' | 'timestamp_out_of_tolerance' | 'signature_mismatch', nullable: Why verification failed. timestamp_out_of_tolerance means a delayed or replayed delivery, NOT a wrong secret.
    - `ip_allowed` boolean, nullable
    - `received_at` string, date-time
    - `labels` object[]
      - `key` string
      - `value` string
      - `color` string

## Other responses

- `204`: Timed out; call again
- `400`: Error
- `401`: Error
- `404`: Error

---

[API](https://skmtc.dev/webhook-studio/apis/webhook-studio-api.md) · [All operations](https://skmtc.dev/webhook-studio/apis/webhook-studio-api/llms.txt) · [OpenAPI document](https://skmtc.dev/webhook-studio/apis/webhook-studio-api/revisions/99d81099e6d6?raw)
