Skip to content

API Endpoints: Requests

The Requests API is used to retrieve, manipulate and delete data sent to a given Webhook.site token (URL, E-mail Address or DNSHook.)

Capture request

  • https://webhook.site/tokenId
  • https://webhook.site/tokenId/statusCode
  • https://tokenId.webhook.site
  • tokenId@emailhook.site (Email)
  • tokenId.dnshook.site (DNSHook)

Any HTTP method (GET, POST, PUT, etc.) can be used.

Any sub-path, e.g. https://webhook.site/tokenId/api/v1/example, will also be captured.

For DNSHooks, all sub-domains, e.g. example.tokenId.dnshook.site, are captured.

If statusCode is valid (e.g. 404), this HTTP status will be used in the response (instead of the default) to test e.g. retry logic.

Instead of tokenId, the alias of the token can also be supplied.

The token ID or alias can also be used as a subdomain, e.g.
http(s)://tokenId.webhook.site.

If the Token has a timeout value, there is a dynamic rate limit of 100 ÷ timeout requests per minute, e.g. a timeout of 30 allows for 3 requests per minute, and 1 second allows for 100 requests per minute.

Response

The default response (or a response set with e.g. the Modify Response Custom Action) of the Token will be returned.

Get requests

GET https://webhook.site/token/tokenId/requests

Lists all requests, emails and DNSHooks sent to a token.

Query string parameters

  • sorting (string) - either newest or oldest (default)
  • per_page (int) - amount of requests returned, defaults to 50 (max 100)
  • page (int) - page number to retrieve (default 1)
  • date_from, date_to (date string) - filter requests by date, format yyyy-MM-dd HH:mm:ss
  • query (string) - filter requests by a query string search (see below for examples)

List of search query fields

The following fields can be used to filter via the query parameter:

  • uuid
  • token_id
  • team_id
  • type
  • hostname
  • size
  • content
  • time
  • created_at
  • updated_at
  • sorting
  • custom_action_output
  • custom_action_errors
  • note
  • files.[id]
  • headers.[header]
  • method - type web only
  • user_agent - type web only
  • url - type web only
  • ip - type web, dns only
  • country, country_code, region, city
  • query.[field] - type web only
  • request.[field] - type webonly (form fields)
  • sender - type email only
  • text_content - type email only
  • message_id - type email only
  • checks.[type] - type email only
  • destinations] - type email only

Search query examples

  • foobar - if no field is specified, content is searched (equivalent to content:foobar)
  • content:foobar - returns requests or emails with body contents containing the word foobar
  • content:"de673d0a-6d7b-4c88-ae00-bf0c241e810e" - if query contains word breaker characters like - or other special characters, surround with quotes to search for the exact string
  • method:GET - returns all requests with method GET
  • headers.user-agent:"Paw/3.3.5 (Macintosh; OS X/11.6.2) GCDHTTPRequest" - search value of user-agent header
  • query.action:create - returns requests that have the query string action set to create.
  • _exists_:query.action - returns requests where the action query parameter exists
  • _exists_:custom_action_errors - returns requests with at least 1 Custom Actions error
  • type:web / type:email - returns either Web requests or emails
  • type:web AND method:POST - AND query
  • method:PUT OR method:POST - OR query
  • (method:PUT) AND (content:example OR content:test) AND NOT (content:foobar)
  • created_at:["2022-01-01 00:00:00" TO "2022-12-31 00:00:00"] - date range query
  • created_at:["2022-01-01 00:00:00" TO *] - date range query (from date until now)
  • created_at:[* TO now-14d] - date range query (in this example, all requests older than 14 days; reference for date expressions)

Full URL Example

If you're in doubt about where these parameters go in an API request, take a look below. This URL combines a search query via the query parameter (searching requests containing the word foobar), as well as the sorting and per_page parameters.

https://webhook.site/token/00000000-0000-0000-0000-000000000000/requests?query=content:foobar&sorting=newest&per_page=10

Response

{
  "data": [
    {
      "uuid": "a2a6a4ae-4130-4063-953a-84fa29d81d43",
      "token_id": "a94a7294-c4aa-4074-ab77-c4cf86fd53b1",
      "sender": "user@example.com",
      "message_id": "ooakjfgfp172vq3j7n5rinmgda5ij9a7q9nftg01",
      "destinations": [
          "a2a6a4ae-4130-4063-953a-84fa29d81d43@emailhook.site"
      ],
      "checks": {
          "spam": true,
          "virus": true,
          "spf": true,
          "dkim": true,
          "dmarc": true
      },
      "ip": "127.0.0.1",
      "country": "Denmark",
      "country_code": "DK",
      "region": "Hovedstaden",
      "city": "Copenhagen",
      "hostname": "webhook.site",
      "method": "POST",
      "user_agent": "Paw\/3.1.8 (Macintosh; OS X\/10.14.6) GCDHTTPRequest",
      "content": "{\"first_name\":\"Arch\",\"last_name\":\"Weber\"}",
      "query": {
        "action": "create"
      },
      "request": {
        "status": "example"
      },
      "files": {
        "file": {
           "id": "98bf4c25-58ab-4c5d-ba91-fb6f709ea78d",
           "filename": "example.png",
           "size": 420915,
           "content_type": "image/png"
        }
      },
      "headers": {
        "content-length": [
          "271"
        ],
        "user-agent": [
          "Paw\/3.1.8 (Macintosh; OS X\/10.14.6) GCDHTTPRequest"
        ],
        "request-id": [
          "37856131"
        ]
      },
      "url": "https:\/\/webhook.site\/a94a7294-c4aa-4074-ab77-c4cf86fd53b1\/201?",
      "size": 420925,
      "custom_action_output": {
          "2998fec5-ffb6-4a47-8ef4-425516f44201": [
              "Hello World"
          ]
      },
      "custom_action_errors": [
        "2998fec5-ffb6-4a47-8ef4-425516f44201"
      ],
      "time": 0.0015230178833007812,
      "created_at": "2019-10-03 19:06:35",
      "updated_at": "2019-10-03 19:06:35",
      "sorting": 1778164375611988
    }
  ],
  "total": 1,
  "per_page": 50,
  "current_page": 1,
  "is_last_page": true,
  "from": 1,
  "to": 1
}

Export requests to CSV

GET https://webhook.site/token/tokenId/requests/export

Returns a CSV file with all requests (maximum 10000.) The amount of columns of the CSV vary depending on the request data headers, query strings, form fields, files, etc.

Query string parameters

  • sorting (string) - either newest or oldest (default)
  • per_page (int) - amount of requests returned, defaults to request_limit of Token (max 100000)
  • date_from, date_to (date string) - filter requests by date, format yyyy-MM-dd HH:mm:ss
  • query (string) - filter requests by a query string search (see here for examples)

Response

200 OK

Get single/latest request

GET https://webhook.site/token/tokenId/request/requestId

GET https://webhook.site/token/tokenId/request/latest - retrieves the latest request sent to the URL

Response

  • type can be web, email, dns
  • country, country_code, region, city is the geo-lookup info for the IP address
  • content contains the request body (web) or raw EML data (email)
  • query is a key-value object of all query strings in the URL
  • request contains form data, like multipart or query-string-encoded
  • files is an object for each attached file (e.g. via multipart), where the key is the form field name
  • size is the total POST data size in bytes
  • custom_action_output is an object where the key is the action ID and the value is an array of output lines
  • custom_action_errors contains an array of action IDs marked as erroneous
  • time the total execution time (including Custom Actions) in seconds
  • sorting is the created_at date as a millisecond timestamp
  • text_content (email only) either plain text or HTML text data stripped of HTML and converted to markdown
  • html_content (email only) HTML text
  • sender (email only) envelope-from sender
  • message_id (email only) email message ID
  • checks (email only) an object containing email-related checks, including DKIM, SPF, virus-scanning results. true means the check passed successfully.
{
  "uuid": "a2a6a4ae-4130-4063-953a-84fa29d81d43",
  "type": "web",
  "token_id": "a94a7294-c4aa-4074-ab77-c4cf86fd53b1",
  "sender": "user@example.com",
  "message_id": "ooakjfgfp172vq3j7n5rinmgda5ij9a7q9nftg01",
  "destinations": [
      "a2a6a4ae-4130-4063-953a-84fa29d81d43@emailhook.site"
  ],
  "checks": {
      "spam": true,
      "virus": true,
      "spf": true,
      "dkim": true,
      "dmarc": true
  },
  "ip": "127.0.0.1",
  "country": "Denmark",
  "country_code": "DK",
  "region": "Hovedstaden",
  "city": "Copenhagen",
  "hostname": "webhook.site",
  "method": "POST",
  "user_agent": "Paw\/3.1.8 (Macintosh; OS X\/10.14.6) GCDHTTPRequest",
  "content": "{\"first_name\":\"Arch\",\"last_name\":\"Weber\"}",
  "query": {
    "action": "create"
  },
  "request": {
    "status": "example"
  },
  "files": {
    "file": {
       "id": "98bf4c25-58ab-4c5d-ba91-fb6f709ea78d",
       "filename": "example.png",
       "size": 420915,
       "content_type": "image/png"
    }
  },
  "headers": {
    "content-length": [
      "271"
    ],
    "user-agent": [
      "Paw\/3.1.8 (Macintosh; OS X\/10.14.6) GCDHTTPRequest"
    ],
    "request-id": [
      "37856131"
    ]
  },
  "url": "https:\/\/webhook.site\/a94a7294-c4aa-4074-ab77-c4cf86fd53b1\/201?",
  "size": 420925,
  "custom_action_output": {
      "2998fec5-ffb6-4a47-8ef4-425516f44201": [
          "Hello World"
      ]
  },
  "custom_action_errors": [
    "2998fec5-ffb6-4a47-8ef4-425516f44201"
  ],
  "note": null,
  "time": 0.0015230178833007812,
  "created_at": "2019-10-03 19:06:35",
  "updated_at": "2019-10-03 19:06:35",
  "sorting": 1778164375611988
}

Get raw request content

GET https://webhook.site/token/tokenId/request/requestId/raw

GET https://webhook.site/token/tokenId/request/latest/raw - retrieves the latest request sent to the URL

Returns the request as a response (body, content-type.)

Response

200 OK

Update request

PUT https://webhook.site/token/tokenId/requests/requestId

Currently only the note field can be updated (max 10.000 characeters).

Request

{
  "note": "Hello world"
}

Response

200 OK

Set Response

PUT https://webhook.site/token/tokenId/requests/requestId/response

Dynamically sets a response for a specific Webhook.site URL request when the Token has a listen property greater than 0. Used for Webhook.site CLI dynamic response forwarding.

The data of the content parameter must be base64-encoded.

Request

{
  "content": "SGVsbG8gd29ybGQK",
  "status": 200,
  "headers": {
     "Content-Type": "text/plain"
  }
}

Response

200 OK

{
   "status": true
}

Download request file

GET https://webhook.site/token/tokenId/request/requestId/download/file ID

Files that are included in a request or as email attachments are available to download using this endpoint.

Response

304 Redirect

Delete request

DELETE https://webhook.site/token/tokenId/request/requestId

Deletes a request.

Response

200 OK

Delete multiple requests

DELETE https://webhook.site/token/tokenId/request

Deletes all requests associated with the token, or if query, date_from and/or date_to is specified, only that subset of requests is deleted.

Query string parameters

Full URL Example

A request to the following URL will delete all requests on a Token older than 7 days, due to the date_to parameter being now-7d. You could use this in a Webhook.site Schedule to delete old requests from a URL periodically.

https://webhook.site/token/tokenId/request?date_to=now-7d

Response

200 OK


Last update: May 7, 2026 16:06:27