Create Post(s)
curl --request POST \
--url https://api.publishbuddy.com/v1/workspaces/{workspace}/posts \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"posts": [
{
"content": "<string>",
"profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"media_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"link": "<string>",
"status": "<string>",
"publish_type": "<string>",
"scheduled_for": "2023-11-07T05:31:56Z",
"timezone": "<string>",
"platform_content": [
"<string>"
],
"labels": [
"<string>"
],
"preview": {
"title": "<string>",
"description": "<string>",
"url": "<string>",
"images": [
"<string>"
]
},
"comments": [
{
"text": "<string>",
"delay_n": 50,
"media_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
]
}
]
}
'import requests
url = "https://api.publishbuddy.com/v1/workspaces/{workspace}/posts"
payload = { "posts": [
{
"content": "<string>",
"profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"media_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"link": "<string>",
"status": "<string>",
"publish_type": "<string>",
"scheduled_for": "2023-11-07T05:31:56Z",
"timezone": "<string>",
"platform_content": ["<string>"],
"labels": ["<string>"],
"preview": {
"title": "<string>",
"description": "<string>",
"url": "<string>",
"images": ["<string>"]
},
"comments": [
{
"text": "<string>",
"delay_n": 50,
"media_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
]
}
] }
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
posts: [
{
content: '<string>',
profile_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
media_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
link: '<string>',
status: '<string>',
publish_type: '<string>',
scheduled_for: '2023-11-07T05:31:56Z',
timezone: '<string>',
platform_content: ['<string>'],
labels: ['<string>'],
preview: {
title: '<string>',
description: '<string>',
url: '<string>',
images: ['<string>']
},
comments: [
{
text: '<string>',
delay_n: 50,
media_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
}
]
}
]
})
};
fetch('https://api.publishbuddy.com/v1/workspaces/{workspace}/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.publishbuddy.com/v1/workspaces/{workspace}/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([
'posts' => [
[
'content' => '<string>',
'profile_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'account_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'media_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'link' => '<string>',
'status' => '<string>',
'publish_type' => '<string>',
'scheduled_for' => '2023-11-07T05:31:56Z',
'timezone' => '<string>',
'platform_content' => [
'<string>'
],
'labels' => [
'<string>'
],
'preview' => [
'title' => '<string>',
'description' => '<string>',
'url' => '<string>',
'images' => [
'<string>'
]
],
'comments' => [
[
'text' => '<string>',
'delay_n' => 50,
'media_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.publishbuddy.com/v1/workspaces/{workspace}/posts"
payload := strings.NewReader("{\n \"posts\": [\n {\n \"content\": \"<string>\",\n \"profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"media_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"link\": \"<string>\",\n \"status\": \"<string>\",\n \"publish_type\": \"<string>\",\n \"scheduled_for\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\",\n \"platform_content\": [\n \"<string>\"\n ],\n \"labels\": [\n \"<string>\"\n ],\n \"preview\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"url\": \"<string>\",\n \"images\": [\n \"<string>\"\n ]\n },\n \"comments\": [\n {\n \"text\": \"<string>\",\n \"delay_n\": 50,\n \"media_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.publishbuddy.com/v1/workspaces/{workspace}/posts")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"posts\": [\n {\n \"content\": \"<string>\",\n \"profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"media_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"link\": \"<string>\",\n \"status\": \"<string>\",\n \"publish_type\": \"<string>\",\n \"scheduled_for\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\",\n \"platform_content\": [\n \"<string>\"\n ],\n \"labels\": [\n \"<string>\"\n ],\n \"preview\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"url\": \"<string>\",\n \"images\": [\n \"<string>\"\n ]\n },\n \"comments\": [\n {\n \"text\": \"<string>\",\n \"delay_n\": 50,\n \"media_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.publishbuddy.com/v1/workspaces/{workspace}/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"posts\": [\n {\n \"content\": \"<string>\",\n \"profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"media_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"link\": \"<string>\",\n \"status\": \"<string>\",\n \"publish_type\": \"<string>\",\n \"scheduled_for\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\",\n \"platform_content\": [\n \"<string>\"\n ],\n \"labels\": [\n \"<string>\"\n ],\n \"preview\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"url\": \"<string>\",\n \"images\": [\n \"<string>\"\n ]\n },\n \"comments\": [\n {\n \"text\": \"<string>\",\n \"delay_n\": 50,\n \"media_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"post_id": "<string>",
"id": "<string>",
"group_id": "<string>",
"content": "<string>",
"profile_id": "<string>",
"account_id": "<string>",
"scheduled_for": "<string>",
"timezone": "UTC",
"media_ids": [
"<string>"
],
"media": {
"media_id": "<string>",
"type": "<string>",
"width": 123,
"height": 123,
"duration": 123
},
"platform_content": [
"<unknown>"
],
"publish_type": "<string>",
"status": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"link": "<string>",
"labels": "<string>",
"comments": [
{
"id": "<string>",
"text": "<string>",
"delay_n": 123,
"delay_type": "<string>",
"media_ids": [
"<string>"
],
"media": {
"media_id": "<string>",
"type": "<string>",
"width": 123,
"height": 123,
"duration": 123
}
}
],
"published_at": "<string>",
"error_message": "<string>"
}
],
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Posts
Create Post(s)
POST
/
workspaces
/
{workspace}
/
posts
Create Post(s)
curl --request POST \
--url https://api.publishbuddy.com/v1/workspaces/{workspace}/posts \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"posts": [
{
"content": "<string>",
"profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"media_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"link": "<string>",
"status": "<string>",
"publish_type": "<string>",
"scheduled_for": "2023-11-07T05:31:56Z",
"timezone": "<string>",
"platform_content": [
"<string>"
],
"labels": [
"<string>"
],
"preview": {
"title": "<string>",
"description": "<string>",
"url": "<string>",
"images": [
"<string>"
]
},
"comments": [
{
"text": "<string>",
"delay_n": 50,
"media_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
]
}
]
}
'import requests
url = "https://api.publishbuddy.com/v1/workspaces/{workspace}/posts"
payload = { "posts": [
{
"content": "<string>",
"profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"media_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"link": "<string>",
"status": "<string>",
"publish_type": "<string>",
"scheduled_for": "2023-11-07T05:31:56Z",
"timezone": "<string>",
"platform_content": ["<string>"],
"labels": ["<string>"],
"preview": {
"title": "<string>",
"description": "<string>",
"url": "<string>",
"images": ["<string>"]
},
"comments": [
{
"text": "<string>",
"delay_n": 50,
"media_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
]
}
] }
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
posts: [
{
content: '<string>',
profile_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
media_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
link: '<string>',
status: '<string>',
publish_type: '<string>',
scheduled_for: '2023-11-07T05:31:56Z',
timezone: '<string>',
platform_content: ['<string>'],
labels: ['<string>'],
preview: {
title: '<string>',
description: '<string>',
url: '<string>',
images: ['<string>']
},
comments: [
{
text: '<string>',
delay_n: 50,
media_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
}
]
}
]
})
};
fetch('https://api.publishbuddy.com/v1/workspaces/{workspace}/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.publishbuddy.com/v1/workspaces/{workspace}/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([
'posts' => [
[
'content' => '<string>',
'profile_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'account_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'media_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'link' => '<string>',
'status' => '<string>',
'publish_type' => '<string>',
'scheduled_for' => '2023-11-07T05:31:56Z',
'timezone' => '<string>',
'platform_content' => [
'<string>'
],
'labels' => [
'<string>'
],
'preview' => [
'title' => '<string>',
'description' => '<string>',
'url' => '<string>',
'images' => [
'<string>'
]
],
'comments' => [
[
'text' => '<string>',
'delay_n' => 50,
'media_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.publishbuddy.com/v1/workspaces/{workspace}/posts"
payload := strings.NewReader("{\n \"posts\": [\n {\n \"content\": \"<string>\",\n \"profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"media_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"link\": \"<string>\",\n \"status\": \"<string>\",\n \"publish_type\": \"<string>\",\n \"scheduled_for\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\",\n \"platform_content\": [\n \"<string>\"\n ],\n \"labels\": [\n \"<string>\"\n ],\n \"preview\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"url\": \"<string>\",\n \"images\": [\n \"<string>\"\n ]\n },\n \"comments\": [\n {\n \"text\": \"<string>\",\n \"delay_n\": 50,\n \"media_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.publishbuddy.com/v1/workspaces/{workspace}/posts")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"posts\": [\n {\n \"content\": \"<string>\",\n \"profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"media_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"link\": \"<string>\",\n \"status\": \"<string>\",\n \"publish_type\": \"<string>\",\n \"scheduled_for\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\",\n \"platform_content\": [\n \"<string>\"\n ],\n \"labels\": [\n \"<string>\"\n ],\n \"preview\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"url\": \"<string>\",\n \"images\": [\n \"<string>\"\n ]\n },\n \"comments\": [\n {\n \"text\": \"<string>\",\n \"delay_n\": 50,\n \"media_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.publishbuddy.com/v1/workspaces/{workspace}/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"posts\": [\n {\n \"content\": \"<string>\",\n \"profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"media_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"link\": \"<string>\",\n \"status\": \"<string>\",\n \"publish_type\": \"<string>\",\n \"scheduled_for\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\",\n \"platform_content\": [\n \"<string>\"\n ],\n \"labels\": [\n \"<string>\"\n ],\n \"preview\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"url\": \"<string>\",\n \"images\": [\n \"<string>\"\n ]\n },\n \"comments\": [\n {\n \"text\": \"<string>\",\n \"delay_n\": 50,\n \"media_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"post_id": "<string>",
"id": "<string>",
"group_id": "<string>",
"content": "<string>",
"profile_id": "<string>",
"account_id": "<string>",
"scheduled_for": "<string>",
"timezone": "UTC",
"media_ids": [
"<string>"
],
"media": {
"media_id": "<string>",
"type": "<string>",
"width": 123,
"height": 123,
"duration": 123
},
"platform_content": [
"<unknown>"
],
"publish_type": "<string>",
"status": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"link": "<string>",
"labels": "<string>",
"comments": [
{
"id": "<string>",
"text": "<string>",
"delay_n": 123,
"delay_type": "<string>",
"media_ids": [
"<string>"
],
"media": {
"media_id": "<string>",
"type": "<string>",
"width": 123,
"height": 123,
"duration": 123
}
}
],
"published_at": "<string>",
"error_message": "<string>"
}
],
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Headers
JWT token.
Path Parameters
The workspace UUID
Body
application/json
Required array length:
1 - 10 elementsShow child attributes
Show child attributes