Create a new feed
curl --request POST \
--url https://api.juicer.io/v1/feeds \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My Brand Feed"
}
'import requests
url = "https://api.juicer.io/v1/feeds"
payload = { "name": "My Brand Feed" }
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({name: 'My Brand Feed'})
};
fetch('https://api.juicer.io/v1/feeds', 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/feeds",
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([
'name' => 'My Brand Feed'
]),
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/feeds"
payload := strings.NewReader("{\n \"name\": \"My Brand Feed\"\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/feeds")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Brand Feed\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.juicer.io/v1/feeds")
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 \"name\": \"My Brand Feed\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"name": "<string>",
"slug": "<string>",
"sources_count": 123,
"moderation": {
"enabled": true,
"allowed": "<string>",
"disallowed": "<string>",
"profanity_filter": true,
"prevent_duplicates": true,
"ai_moderation_available": true,
"ai_moderation": true,
"ai_harmful_content_filter": true,
"ai_moderation_rules": "<string>",
"ai_sentiment_filter": []
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"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"
}
}
}Feeds
Create a new feed
Creates a new feed. Returns 422 with error.code = "feed_limit_reached"
and an upgrade action if your plan’s feed limit is exceeded.
POST
/
feeds
Create a new feed
curl --request POST \
--url https://api.juicer.io/v1/feeds \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My Brand Feed"
}
'import requests
url = "https://api.juicer.io/v1/feeds"
payload = { "name": "My Brand Feed" }
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({name: 'My Brand Feed'})
};
fetch('https://api.juicer.io/v1/feeds', 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/feeds",
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([
'name' => 'My Brand Feed'
]),
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/feeds"
payload := strings.NewReader("{\n \"name\": \"My Brand Feed\"\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/feeds")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Brand Feed\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.juicer.io/v1/feeds")
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 \"name\": \"My Brand Feed\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"name": "<string>",
"slug": "<string>",
"sources_count": 123,
"moderation": {
"enabled": true,
"allowed": "<string>",
"disallowed": "<string>",
"profanity_filter": true,
"prevent_duplicates": true,
"ai_moderation_available": true,
"ai_moderation": true,
"ai_harmful_content_filter": true,
"ai_moderation_rules": "<string>",
"ai_sentiment_filter": []
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"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"
}
}
}⌘I