Docs / Developer tools

Request bins API

A private address that records what is sent to it, for testing webhooks.

Make a bin, point a webhook at its address, read back every request (method, headers, query and body). The caller's address is never kept. The bin demo (secret demo) is public, for trying. Each caller may hold 5 bins and databases at a time; each lasts a day, in memory or a temporary file, and is gone after a restart.

Base URL https://api.dharun.devNo key needed for most600 units a minute, 3000 with a free keyThis page as Markdown

Make a request bin

POST/v1/hooks

Answers with the bin's address, the address to read it from and its secret (shown once). Needs a free API key once keys are required (see /keys).

Send: Nothing, or {} .

Model endpoint: it will need a free API key, sent as Authorization: Bearer <key> or X-API-Key. Until the date on API keys it answers without one and says so in the X-Key-Notice header. With a key: 500 model requests a day.

What you send here is never written to the log, and the answer is not cached.

ParameterDescription
statusqueryThe HTTP status the bin answers with. Default 200.

curl

curl -H "Content-Type: application/json" --data '{}' "https://api.dharun.dev/v1/hooks?utm_medium=docs"

JavaScript

const response = await fetch("https://api.dharun.dev/v1/hooks?utm_medium=docs", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({}),
});
const body = await response.json();
if (!response.ok) throw new Error(body.error.message);
console.log(body.data);

Python

import requests

response = requests.post("https://api.dharun.dev/v1/hooks?utm_medium=docs", data="{}", headers={"Content-Type": "application/json"}, timeout=60)
body = response.json()
if not response.ok:
    raise RuntimeError(body["error"]["message"])
print(body["data"])

invoice.json

{}
Try it here

Change the values and send the request from your browser. Needs JavaScript.

Send to a bin

GET/v1/hook/{id}POST

GET or POST anything: it is recorded.

Also takes POST: Anything, up to 64 KB kept. Send it as text/plain, or as JSON {"text": "..."} with the other options beside it, up to 256 KB.

What you send here is never written to the log, and the answer is not cached.

ParameterDescription
idpath, requiredThe bin.

curl

curl "https://api.dharun.dev/v1/hook/demo?order=42&utm_medium=docs"

JavaScript

const response = await fetch("https://api.dharun.dev/v1/hook/demo?order=42&utm_medium=docs");
const body = await response.json();
if (!response.ok) throw new Error(body.error.message);
console.log(body.data);

Python

import requests

response = requests.get("https://api.dharun.dev/v1/hook/demo?order=42&utm_medium=docs", timeout=10)
body = response.json()
if not response.ok:
    raise RuntimeError(body["error"]["message"])
print(body["data"])
Try it here

Change the values and send the request from your browser. Needs JavaScript.

Read a bin

GET/v1/hooks/{id}

Every request it caught, oldest first. Send the secret as an X-Secret header (or secret=).

What you send here is never written to the log, and the answer is not cached.

ParameterDescription
idpath, requiredThe bin.
secretqueryIts secret; better as X-Secret.

curl

curl "https://api.dharun.dev/v1/hooks/demo?secret=demo&utm_medium=docs"

JavaScript

const response = await fetch("https://api.dharun.dev/v1/hooks/demo?secret=demo&utm_medium=docs");
const body = await response.json();
if (!response.ok) throw new Error(body.error.message);
console.log(body.data);

Python

import requests

response = requests.get("https://api.dharun.dev/v1/hooks/demo?secret=demo&utm_medium=docs", timeout=10)
body = response.json()
if not response.ok:
    raise RuntimeError(body["error"]["message"])
print(body["data"])
Try it here

Change the values and send the request from your browser. Needs JavaScript.

Delete a bin

POST/v1/hooks/{id}/delete

Deletes the bin and everything it caught. Send the secret as an X-Secret header.

Send: Nothing, or {} .

What you send here is never written to the log, and the answer is not cached.

curl

curl -H "Content-Type: application/json" --data '{}' "https://api.dharun.dev/v1/hooks/demo/delete?secret=demo&utm_medium=docs"

JavaScript

const response = await fetch("https://api.dharun.dev/v1/hooks/demo/delete?secret=demo&utm_medium=docs", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({}),
});
const body = await response.json();
if (!response.ok) throw new Error(body.error.message);
console.log(body.data);

Python

import requests

response = requests.post("https://api.dharun.dev/v1/hooks/demo/delete?secret=demo&utm_medium=docs", data="{}", headers={"Content-Type": "application/json"}, timeout=60)
body = response.json()
if not response.ok:
    raise RuntimeError(body["error"]["message"])
print(body["data"])

invoice.json

{}
Try it here

Change the values and send the request from your browser. Needs JavaScript.

Response

{
  "data": {
    "deleted": false,
    "id": "demo"
  },
  "meta": {
    "note": "The demo bin is never deleted."
  }
}

Using an AI assistant? Connect the MCP server and it can call this API by itself. Want every endpoint on one bench? Open the playground.