Create a webhook subscription
curl --request POST \
--url https://api.juicer.io/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"subscribed_events": []
}
'import requests
url = "https://api.juicer.io/v1/webhooks"
payload = {
"url": "<string>",
"subscribed_events": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', subscribed_events: []})
};
fetch('https://api.juicer.io/v1/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.juicer.io/v1/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'subscribed_events' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.juicer.io/v1/webhooks"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"subscribed_events\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.juicer.io/v1/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"subscribed_events\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.juicer.io/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"subscribed_events\": []\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"url": "<string>",
"subscribed_events": [
"<string>"
],
"consecutive_failures": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"secret": "<string>"
}
}{
"error": {
"code": "feed_limit_reached",
"message": "Your Free plan allows 1 feed(s). Upgrade to create more.",
"details": {
"name": [
"can't be blank"
]
},
"action": {
"type": "upgrade_plan",
"current_plan": "small",
"current_plan_display_name": "Free",
"required_plan": "large",
"required_plan_display_name": "Pro",
"upgrade_url": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
}
}Webhooks
Create a webhook subscription
The secret is returned only in the creation response. Store it securely —
it’s used to verify webhook payloads via HMAC-SHA256 signature in the
X-Juicer-Signature header.
See the WebhookDeliveryBody schema for the shape your endpoint will
receive, how to verify the signature, and how to dedup retries.
POST
/
webhooks
Create a webhook subscription
curl --request POST \
--url https://api.juicer.io/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"subscribed_events": []
}
'import requests
url = "https://api.juicer.io/v1/webhooks"
payload = {
"url": "<string>",
"subscribed_events": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', subscribed_events: []})
};
fetch('https://api.juicer.io/v1/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.juicer.io/v1/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'subscribed_events' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.juicer.io/v1/webhooks"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"subscribed_events\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.juicer.io/v1/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"subscribed_events\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.juicer.io/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"subscribed_events\": []\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"url": "<string>",
"subscribed_events": [
"<string>"
],
"consecutive_failures": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"secret": "<string>"
}
}{
"error": {
"code": "feed_limit_reached",
"message": "Your Free plan allows 1 feed(s). Upgrade to create more.",
"details": {
"name": [
"can't be blank"
]
},
"action": {
"type": "upgrade_plan",
"current_plan": "small",
"current_plan_display_name": "Free",
"required_plan": "large",
"required_plan_display_name": "Pro",
"upgrade_url": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
}
}Authorizations
API key prefixed with jcr_. To obtain a key programmatically
(no dashboard required), see POST /v1/authorize.
Body
application/json
Response
Webhook created (includes secret)
Show child attributes
Show child attributes
⌘I