On this page

On this page

Webhook Endpoint

Every bin exposes a webhook endpoint that captures any HTTP request sent to it.

URL Format

https://spidylabs.com/hook/{slug}
https://spidylabs.com/hook/{slug}/any/additional/path

The {slug} is the unique identifier for your bin. Any path segments after the slug are captured as part of the request.

Supported Methods

All standard HTTP methods are supported:

MethodCaptured
GETYes
POSTYes
PUTYes
DELETEYes
PATCHYes
HEADYes
OPTIONSYes

Request Limits

PlanRequests/DayHistory
Free20024 hours
Pro10,0007 days

When the daily limit is reached, subsequent requests receive a 429 Too Many Requests response.

What Gets Captured

Every request stores:

  • Method — The HTTP method used (GET, POST, etc.)
  • Path — The full path after the slug
  • Headers — All request headers
  • Body — The raw request body (up to 1MB)
  • Query Parameters — URL query string parsed into key-value pairs
  • Source IP — The client's IP address
  • Timestamp — When the request was received (UTC)
  • Content Type — The Content-Type header value
  • Size — Body size in bytes

Response Behavior

By default, the endpoint returns:

HTTP/1.1 200 OK
Content-Type: text/plain

OK

You can customize this response — see Response Configuration.

Examples

cURL

curl -X POST https://spidylabs.com/hook/my-bin \
  -H "Content-Type: application/json" \
  -d '{"event": "order.created", "data": {"id": 123}}'

JavaScript (fetch)

await fetch('https://spidylabs.com/hook/my-bin', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ event: 'order.created', data: { id: 123 } }),
})

Python (requests)

import requests

requests.post('https://spidylabs.com/hook/my-bin', json={
    'event': 'order.created',
    'data': {'id': 123},
})

PHP (cURL)

$ch = curl_init('https://spidylabs.com/hook/my-bin');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    'event' => 'order.created',
    'data' => ['id' => 123],
]));
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_exec($ch);

Ruby (Net::HTTP)

require 'net/http'
require 'json'

uri = URI('https://spidylabs.com/hook/my-bin')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Post.new(uri.path, { 'Content-Type' => 'application/json' })
request.body = { event: 'order.created', data: { id: 123 } }.to_json

http.request(request)