curl --request POST \
--url https://api.juicer.io/v1/publishing/posts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"channels": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"network_options": {}
}
],
"text": "<string>",
"media": [
{
"url": "<string>"
}
],
"first_comment": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.juicer.io/v1/publishing/posts"
payload = {
"channels": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"network_options": {}
}
],
"text": "<string>",
"media": [{ "url": "<string>" }],
"first_comment": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
channels: [{id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', network_options: {}}],
text: '<string>',
media: [{url: '<string>'}],
first_comment: '<string>',
scheduled_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.juicer.io/v1/publishing/posts', 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/publishing/posts",
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([
'channels' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'network_options' => [
]
]
],
'text' => '<string>',
'media' => [
[
'url' => '<string>'
]
],
'first_comment' => '<string>',
'scheduled_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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/publishing/posts"
payload := strings.NewReader("{\n \"channels\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"network_options\": {}\n }\n ],\n \"text\": \"<string>\",\n \"media\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"first_comment\": \"<string>\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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/publishing/posts")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"channels\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"network_options\": {}\n }\n ],\n \"text\": \"<string>\",\n \"media\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"first_comment\": \"<string>\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.juicer.io/v1/publishing/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"channels\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"network_options\": {}\n }\n ],\n \"text\": \"<string>\",\n \"media\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"first_comment\": \"<string>\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "scheduled",
"created_at": "2023-11-07T05:31:56Z",
"targets": [
{
"channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"network": "instagram",
"status": "pending",
"post_url": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z",
"published_at": "2023-11-07T05:31:56Z",
"error": {
"code": "<string>",
"message": "<string>"
}
}
],
"text": "<string>",
"media": [
{
"url": "<string>",
"kind": "image"
}
],
"first_comment": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z",
"published_at": "2023-11-07T05:31:56Z",
"failed_at": "2023-11-07T05:31:56Z"
},
"meta": {
"replayed": true
}
}{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "scheduled",
"created_at": "2023-11-07T05:31:56Z",
"targets": [
{
"channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"network": "instagram",
"status": "pending",
"post_url": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z",
"published_at": "2023-11-07T05:31:56Z",
"error": {
"code": "<string>",
"message": "<string>"
}
}
],
"text": "<string>",
"media": [
{
"url": "<string>",
"kind": "image"
}
],
"first_comment": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z",
"published_at": "2023-11-07T05:31:56Z",
"failed_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"
}
}
}{
"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"
}
}
}{
"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"
}
}
}{
"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"
}
}
}Create a post
Sends text and media to one or more channels, now or at scheduled_at. The send is
asynchronous: the 201 shows every channel as pending; the outcome arrives through
the publishing.post.published / publishing.post.failed webhooks or by reading the
post back.
Idempotency. The Idempotency-Key header is required. A repeat with the same key
and the same body answers the stored post with 200 (and meta.replayed: true); the
same key with a different body is refused with idempotency_key_reused. Retry a
timed-out request with the same key and it cannot publish twice.
Media are public http(s) URLs the supplier fetches at publish time; they are not
copied, so they must stay reachable until the post is live. kind is image or
video, inferred from the URL’s extension when omitted; a URL whose kind cannot be
told is refused.
Up-front refusals (422, nothing written): a channel that needs reconnecting
(channel_needs_reconnecting, with a reconnect link under action when one could
be issued), no content, bad media, a schedule in the past or without a timezone
offset, a content format the network does not have (invalid_format, with
details.formats), an Idempotency-Key over 255 characters, more than 50 X posts in
any 24 hours (x_daily_cap_reached, with details.resets_at; a deleted post that already
went out on X still counts), or a network’s own
refusal from the supplier’s dry run (validation_failed, with details.channels[]
naming each refusing channel and its reasons). Publishing is paused with 402 while
the card for the channels was declined or the subscription is unpaid.
Limits: 10 creates a minute per key (429 with Retry-After).
curl --request POST \
--url https://api.juicer.io/v1/publishing/posts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"channels": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"network_options": {}
}
],
"text": "<string>",
"media": [
{
"url": "<string>"
}
],
"first_comment": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.juicer.io/v1/publishing/posts"
payload = {
"channels": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"network_options": {}
}
],
"text": "<string>",
"media": [{ "url": "<string>" }],
"first_comment": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
channels: [{id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', network_options: {}}],
text: '<string>',
media: [{url: '<string>'}],
first_comment: '<string>',
scheduled_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.juicer.io/v1/publishing/posts', 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/publishing/posts",
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([
'channels' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'network_options' => [
]
]
],
'text' => '<string>',
'media' => [
[
'url' => '<string>'
]
],
'first_comment' => '<string>',
'scheduled_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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/publishing/posts"
payload := strings.NewReader("{\n \"channels\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"network_options\": {}\n }\n ],\n \"text\": \"<string>\",\n \"media\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"first_comment\": \"<string>\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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/publishing/posts")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"channels\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"network_options\": {}\n }\n ],\n \"text\": \"<string>\",\n \"media\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"first_comment\": \"<string>\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.juicer.io/v1/publishing/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"channels\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"network_options\": {}\n }\n ],\n \"text\": \"<string>\",\n \"media\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"first_comment\": \"<string>\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "scheduled",
"created_at": "2023-11-07T05:31:56Z",
"targets": [
{
"channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"network": "instagram",
"status": "pending",
"post_url": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z",
"published_at": "2023-11-07T05:31:56Z",
"error": {
"code": "<string>",
"message": "<string>"
}
}
],
"text": "<string>",
"media": [
{
"url": "<string>",
"kind": "image"
}
],
"first_comment": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z",
"published_at": "2023-11-07T05:31:56Z",
"failed_at": "2023-11-07T05:31:56Z"
},
"meta": {
"replayed": true
}
}{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "scheduled",
"created_at": "2023-11-07T05:31:56Z",
"targets": [
{
"channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"network": "instagram",
"status": "pending",
"post_url": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z",
"published_at": "2023-11-07T05:31:56Z",
"error": {
"code": "<string>",
"message": "<string>"
}
}
],
"text": "<string>",
"media": [
{
"url": "<string>",
"kind": "image"
}
],
"first_comment": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z",
"published_at": "2023-11-07T05:31:56Z",
"failed_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"
}
}
}{
"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"
}
}
}{
"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"
}
}
}{
"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"
}
}
}