Getting started
Authentication
Send your key as a bearer token on every request to /v1/watchers, /v1/events and /v1/usage:
curl https://api.watcher.manwhas.shop/v1/watchers -H "Authorization: Bearer sw_..."A missing, unknown or revoked key gets 401 unauthorized. Each key belongs to one account and only sees that account's watchers.
Make and revoke keys in the dashboard. We only keep a hash, so you see a key once, when you make it.
Test keys
Make a test key on the API keys page. It starts with sw_test_ and works like a live key, except:
- Its watchers don't count toward your 100, and you can have 10 at a time.
- Each one ends within a day, whatever
untilsays, and the response says so inwarnings. - Every event from them has
"test": truein the envelope.
Previews work the same with either key.
Local webhooks
We send webhooks from our servers, so the URL has to be public https, and localhost would point at our machine. If your server runs on your laptop, open a tunnel like cloudflared tunnel --url http://localhost:3000 or ngrok http 3000 and use the https address it prints.
Idempotency
If you send an Idempotency-Key header with POST /v1/watchers, you can retry without making a second watcher. For 24 hours, the same key with the same body gets the first response back, and the same key with a different body gets 409 idempotency_conflict.
Rate limits
Each key gets 120 requests a minute. Past that you get 429 rate_limited, with a Retry-After header in seconds. The other limits are on Limits.