Webhook.site API¶
The Webhook.site API is public, free to use, doesn't require authentication and is relatively easy to use.
General Usage¶
Base URL: https://webhook.site
.
You must set the Accept
and Content-Type
headers to application/json
.
Things to Note¶
- In all examples in this API documentation, URL parameters are prefixed with
:
(colon) to show which parameters must be changed by the user. You should not include this character in the URL. - A
token ID
refers to the ID of the Webhook.site URL For example, if the Webhook.site URL ishttps://webhook.site/00000000-0000-0000-0000-000000000000
, the token ID is00000000-0000-0000-0000-000000000000
. - Fair use guidelines and other limitations apply as described by the Terms of Service.
Authentication¶
While most functions in the Webhook.site API work without any authentication whatsoever, some endpoints do require authentication, or will return a 401 Unauthorized
status code.
API Key¶
An API Key can be generated in the Control Panel, and provides access to Tokens that are either a) password protected or b) require login.
To specify an API Key in a request, use the Api-Key
HTTP header: Api-Key: [your API Key]
Password¶
If you have set a password on a Webhook.site URL/token, to access the API resources for that token, you can use either of the following methods:
- Specify the password using the
password
query string:?password=[your password]
- Set the password using HTTP Basic Auth, using the Authorization header. More info
Common Usages¶
Get data sent to URL¶
To retrieve the data that's sent to a Webhook.site URL or Email, you'll want to use the Get Requests endpoint.
Create new URL/email address¶
To create a new token programmatically, you can use the API like this:
This will return information about the token in JSON format, including its UUID. Your URL will be available at the endpoint https://webhook.site/[token uuid]
.
If you are a Webhook.site Pro or Enterprise customer, you should provide an API key in order to associate the created token with your account automatically: