Post to Bin
Posting a bin - The bin accepts both POST and PUT methods. For content type, it accepts json/multipart/form-data/query. If the data can not be parsed to json, it will return an error. When posting, it is recommended to use properly formatted json to avoid potential formatting errors.
Any headers that are passed will be returned when the bin is read. Note: The Binauth header is always stripped to not show the private key.
POST to Bin:
curl -X POST \
https://webhookbin.net/v1/bin/456ce34d-19f6-4561-8bcf-f819001f9d50\
?data=here
curl -X POST \
-H "Content-Type: application/json" \
-H "Customheader: Something" \
-d '{"data": "here"}' \
https://webhookbin.net/v1/bin/456ce34d-19f6-4561-8bcf-f819001f9d50
curl -X POST ^
https://webhookbin.net/v1/bin/456ce34d-19f6-4561-8bcf-f819001f9d50^
?data=here
curl -X POST ^
-H "Content-Type: application/json" ^
-H "Customheader: Something" ^
-d "{\"data\": \"here\"}" ^
https://webhookbin.net/v1/bin/456ce34d-19f6-4561-8bcf-f819001f9d50
import requests
header = {"Customheader": "Something"}
data = {"data": "here"}
res = requests.post(
"https://webhookbin.net/v1/bin/456ce34d-19f6-4561-8bcf-f819001f9d50",
headers=header,json=data)
print(res.text)
POST to Private Bin:
curl -X POST \
https://webhookbin.net/v1/bin/456ce34d-19f6-4561-8bcf-f819001f9d50\
'?Binauth=DBwIfrB_9BDycs0a4rm0YVRrgsPPpmS2_Vl11ElKpIM&data=here'
curl -X POST \
-H "Content-Type: application/json" \
-H "Customheader: Something" \
-H "Binauth: DBwIfrB_9BDycs0a4rm0YVRrgsPPpmS2_Vl11ElKpIM" \
-d '{"data": "here"}' \
https://webhookbin.net/v1/bin/456ce34d-19f6-4561-8bcf-f819001f9d50
curl -X POST ^
https://webhookbin.net/v1/bin/456ce34d-19f6-4561-8bcf-f819001f9d50"?Binauth=DBwIfrB_9BDycs0a4rm0YVRrgsPPpmS2_Vl11ElKpIM&data=here"
curl -X POST ^
-H "Content-Type: application/json" ^
-H "Customheader: Something" ^
-H "Binauth: DBwIfrB_9BDycs0a4rm0YVRrgsPPpmS2_Vl11ElKpIM" ^
-d "{\"data\": \"here\"}" ^
https://webhookbin.net/v1/bin/456ce34d-19f6-4561-8bcf-f819001f9d50
import requests
header = {
"Customheader": "Something",
"Binauth": "DBwIfrB_9BDycs0a4rm0YVRrgsPPpmS2_Vl11ElKpIM"}
data = {"data": "here"}
res = requests.post(
"https://webhookbin.net/v1/bin/456ce34d-19f6-4561-8bcf-f819001f9d50",
headers=header,json=data)
print(res.text)
Response:
Responses come back in json format with a 200 status code. messid is a unique uuid4 for the message that can be used as confirmation on the GET side.
{
"success": true,
"messid": "185cfb06-67df-4783-a15f-6bf6ca14f79a"
}