import { OctosparkClient } from '@octospark/sdk'
const client = new OctosparkClient({
token: process.env.OCTOSPARK_TOKEN
})
const response = await client.social.createPost({
teamId: process.env.OCTOSPARK_TEAM_ID ?? "teamId",
body: {},
})import os
from octospark_sdk import OctosparkClient
client = OctosparkClient(token=os.environ["OCTOSPARK_TOKEN"])
response = client.social.create_post(
teamId=os.environ.get("OCTOSPARK_TEAM_ID", "teamId"),
body={}
)octospark posts create \
--request '{"path":{"teamId":"teamId"},"body":{}}'use reqwest::Client;
use std::env;
#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
let client = Client::new();
let base_url = env::var("OCTOSPARK_API_URL").unwrap_or_else(|_| "https://api.octospark.ai".to_string());
let team_id = env::var("OCTOSPARK_TEAM_ID").unwrap_or_else(|_| "teamId".to_string());
let url = format!("{}/v1/teams/{}/posts", base_url.trim_end_matches('/'), team_id);
let token = env::var("OCTOSPARK_TOKEN").expect("OCTOSPARK_TOKEN");
let mut request = client.post(url).bearer_auth(token);
request = request.json(&serde_json::json!({}));
let response = request.send().await?;
println!("{}", response.text().await?);
Ok(())
}import 'dart:convert';
import 'dart:io';
import 'package:http/http.dart' as http;
Future<void> main() async {
final baseUrl = Platform.environment['OCTOSPARK_API_URL'] ?? 'https://api.octospark.ai';
final token = Platform.environment['OCTOSPARK_TOKEN'];
final teamId = Platform.environment['OCTOSPARK_TEAM_ID'] ?? 'teamId';
final url = '${baseUrl.replaceFirst(RegExp(r'/$'), '')}/v1/teams/$teamId/posts';
final uri = Uri.parse(url);
final headers = {
'Authorization': 'Bearer $token',
'Content-Type': 'application/json',
};
final response = await http.post(
uri,
headers: headers,
body: jsonEncode({}),
);
print(response.body);
}curl --request POST \
--url https://api-staging.octospark.ai/v1/teams/{teamId}/posts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "Shipping day! Here is what is new in v1."
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-staging.octospark.ai/v1/teams/{teamId}/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([
'text' => 'Shipping day! Here is what is new in v1.'
]),
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-staging.octospark.ai/v1/teams/{teamId}/posts"
payload := strings.NewReader("{\n \"text\": \"Shipping day! Here is what is new in v1.\"\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-staging.octospark.ai/v1/teams/{teamId}/posts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"Shipping day! Here is what is new in v1.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.octospark.ai/v1/teams/{teamId}/posts")
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 \"text\": \"Shipping day! Here is what is new in v1.\"\n}"
response = http.request(request)
puts response.read_body$headers=@{}
$headers.Add("Authorization", "Bearer <token>")
$headers.Add("Content-Type", "application/json")
$response = Invoke-WebRequest -Uri 'https://api-staging.octospark.ai/v1/teams/{teamId}/posts' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"text": "Shipping day! Here is what is new in v1."
}'import Foundation
let parameters = ["text": "Shipping day! Here is what is new in v1."] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://api-staging.octospark.ai/v1/teams/{teamId}/posts")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))using RestSharp;
var options = new RestClientOptions("https://api-staging.octospark.ai/v1/teams/{teamId}/posts");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"text\": \"Shipping day! Here is what is new in v1.\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
using RestSharp;
var options = new RestClientOptions("https://api-staging.octospark.ai/v1/teams/{teamId}/posts");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"text\": \"Shipping day! Here is what is new in v1.\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api-staging.octospark.ai/v1/teams/{teamId}/posts");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer <token>");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"text\": \"Shipping day! Here is what is new in v1.\"\n}");
CURLcode ret = curl_easy_perform(hnd);CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api-staging.octospark.ai/v1/teams/{teamId}/posts");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer <token>");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"text\": \"Shipping day! Here is what is new in v1.\"\n}");
CURLcode ret = curl_easy_perform(hnd);val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"text\": \"Shipping day! Here is what is new in v1.\"\n}")
val request = Request.Builder()
.url("https://api-staging.octospark.ai/v1/teams/{teamId}/posts")
.post(body)
.addHeader("Authorization", "Bearer <token>")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute(){
"id": "3c9d8e7f-6a5b-4c3d-9e2f-1a0b9c8d7e6f",
"teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"postType": "text_post",
"artifactKind": "slideshow",
"title": "<string>",
"status": "draft",
"workflowStatusId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"text": "<string>",
"assetIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"media": [
{
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mimeType": "<string>",
"displayName": "<string>",
"thumbnailPath": "<string>"
}
],
"assetTags": [
"launch",
"product"
],
"userTags": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"colour": "<string>"
}
],
"assignees": [
{
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>"
}
],
"contentPayloadId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"latestScheduledPost": {
"id": "7f3a2b10-9c4d-4e5f-8a6b-1c2d3e4f5a6b",
"teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contentItemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"socialAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider": "x",
"status": "scheduled",
"scheduledAt": "2026-06-15T09:00:00.000Z",
"timezone": "Europe/London",
"platformPostId": "<string>",
"platformSettings": {},
"publishResults": {},
"providerPublishState": {
"provider": "x",
"status": "not_started",
"requiresPolling": true,
"publishId": "<string>",
"platformPostId": "<string>",
"providerStatus": "<string>",
"pollingReason": "<string>",
"uploadProgress": {
"nextByteStart": 123,
"uploadSize": 123
},
"failureCode": "<string>",
"failureCategory": "rate_limited"
},
"errorCode": "<string>",
"errorMessage": "<string>",
"errorCategory": "rate_limited",
"workflowId": "<string>",
"workflowRunId": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
},
"scheduledDestinationAccountIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"draftDestinationAccountIds": [
"0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"
],
"saveDestination": "queue",
"saveMessage": "Saved to Queue",
"createdAt": "<string>",
"updatedAt": "<string>",
"postInput": {
"kind": "atomic",
"text": "<string>",
"attachments": [
{
"kind": "media",
"asset": {
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mimeType": "<string>",
"byteSize": 123,
"width": 123,
"height": 123,
"durationSeconds": 123,
"thumbnailUrl": "<string>",
"altText": "<string>"
},
"mediaType": "image",
"altText": "<string>"
}
],
"videoVariant": "green_screen_meme"
},
"postPublishActions": {
"firstComment": {
"text": "<string>",
"mediaIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"engagementCommentTrigger": {
"likeThreshold": 2,
"windowHours": 360,
"comment": {
"text": "<string>",
"mediaIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
},
"repostAfter": {
"offsetDays": 15,
"mode": "retweet",
"text": "<string>"
},
"recurrenceIntervalDays": 183,
"recurrenceEndsAt": "<string>"
}
}{
"issues": [
{
"_tag": "Pointer",
"path": [
"<string>"
],
"message": "<string>"
}
],
"message": "<string>",
"_tag": "HttpApiDecodeError"
}{
"message": "<string>",
"_tag": "Unauthorized"
}{
"message": "<string>",
"_tag": "PaymentRequired"
}{
"message": "<string>",
"_tag": "Forbidden"
}{
"message": "<string>",
"_tag": "NotFound"
}{
"message": "<string>",
"_tag": "Conflict",
"code": "<string>",
"currentRevision": 123
}{
"message": "<string>",
"code": "<string>",
"_tag": "UnprocessableEntity"
}{
"message": "<string>",
"_tag": "TooManyRequests",
"code": "<string>",
"retryAfterSeconds": 123
}{
"message": "<string>",
"_tag": "InternalError"
}Create post
Create a draft post and atomically persist its content, workflow status, assignees, and user tags. Nothing is published by this call: the post stays in draft until you call schedulePost or postNow with target social accounts. Send an Idempotency-Key header so an ambiguous retry replays the original create; reusing the key with a different payload is rejected.
import { OctosparkClient } from '@octospark/sdk'
const client = new OctosparkClient({
token: process.env.OCTOSPARK_TOKEN
})
const response = await client.social.createPost({
teamId: process.env.OCTOSPARK_TEAM_ID ?? "teamId",
body: {},
})import os
from octospark_sdk import OctosparkClient
client = OctosparkClient(token=os.environ["OCTOSPARK_TOKEN"])
response = client.social.create_post(
teamId=os.environ.get("OCTOSPARK_TEAM_ID", "teamId"),
body={}
)octospark posts create \
--request '{"path":{"teamId":"teamId"},"body":{}}'use reqwest::Client;
use std::env;
#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
let client = Client::new();
let base_url = env::var("OCTOSPARK_API_URL").unwrap_or_else(|_| "https://api.octospark.ai".to_string());
let team_id = env::var("OCTOSPARK_TEAM_ID").unwrap_or_else(|_| "teamId".to_string());
let url = format!("{}/v1/teams/{}/posts", base_url.trim_end_matches('/'), team_id);
let token = env::var("OCTOSPARK_TOKEN").expect("OCTOSPARK_TOKEN");
let mut request = client.post(url).bearer_auth(token);
request = request.json(&serde_json::json!({}));
let response = request.send().await?;
println!("{}", response.text().await?);
Ok(())
}import 'dart:convert';
import 'dart:io';
import 'package:http/http.dart' as http;
Future<void> main() async {
final baseUrl = Platform.environment['OCTOSPARK_API_URL'] ?? 'https://api.octospark.ai';
final token = Platform.environment['OCTOSPARK_TOKEN'];
final teamId = Platform.environment['OCTOSPARK_TEAM_ID'] ?? 'teamId';
final url = '${baseUrl.replaceFirst(RegExp(r'/$'), '')}/v1/teams/$teamId/posts';
final uri = Uri.parse(url);
final headers = {
'Authorization': 'Bearer $token',
'Content-Type': 'application/json',
};
final response = await http.post(
uri,
headers: headers,
body: jsonEncode({}),
);
print(response.body);
}curl --request POST \
--url https://api-staging.octospark.ai/v1/teams/{teamId}/posts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "Shipping day! Here is what is new in v1."
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-staging.octospark.ai/v1/teams/{teamId}/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([
'text' => 'Shipping day! Here is what is new in v1.'
]),
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-staging.octospark.ai/v1/teams/{teamId}/posts"
payload := strings.NewReader("{\n \"text\": \"Shipping day! Here is what is new in v1.\"\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-staging.octospark.ai/v1/teams/{teamId}/posts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"Shipping day! Here is what is new in v1.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.octospark.ai/v1/teams/{teamId}/posts")
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 \"text\": \"Shipping day! Here is what is new in v1.\"\n}"
response = http.request(request)
puts response.read_body$headers=@{}
$headers.Add("Authorization", "Bearer <token>")
$headers.Add("Content-Type", "application/json")
$response = Invoke-WebRequest -Uri 'https://api-staging.octospark.ai/v1/teams/{teamId}/posts' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"text": "Shipping day! Here is what is new in v1."
}'import Foundation
let parameters = ["text": "Shipping day! Here is what is new in v1."] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://api-staging.octospark.ai/v1/teams/{teamId}/posts")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))using RestSharp;
var options = new RestClientOptions("https://api-staging.octospark.ai/v1/teams/{teamId}/posts");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"text\": \"Shipping day! Here is what is new in v1.\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
using RestSharp;
var options = new RestClientOptions("https://api-staging.octospark.ai/v1/teams/{teamId}/posts");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"text\": \"Shipping day! Here is what is new in v1.\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api-staging.octospark.ai/v1/teams/{teamId}/posts");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer <token>");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"text\": \"Shipping day! Here is what is new in v1.\"\n}");
CURLcode ret = curl_easy_perform(hnd);CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api-staging.octospark.ai/v1/teams/{teamId}/posts");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer <token>");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"text\": \"Shipping day! Here is what is new in v1.\"\n}");
CURLcode ret = curl_easy_perform(hnd);val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"text\": \"Shipping day! Here is what is new in v1.\"\n}")
val request = Request.Builder()
.url("https://api-staging.octospark.ai/v1/teams/{teamId}/posts")
.post(body)
.addHeader("Authorization", "Bearer <token>")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute(){
"id": "3c9d8e7f-6a5b-4c3d-9e2f-1a0b9c8d7e6f",
"teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"postType": "text_post",
"artifactKind": "slideshow",
"title": "<string>",
"status": "draft",
"workflowStatusId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"text": "<string>",
"assetIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"media": [
{
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mimeType": "<string>",
"displayName": "<string>",
"thumbnailPath": "<string>"
}
],
"assetTags": [
"launch",
"product"
],
"userTags": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"colour": "<string>"
}
],
"assignees": [
{
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>"
}
],
"contentPayloadId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"latestScheduledPost": {
"id": "7f3a2b10-9c4d-4e5f-8a6b-1c2d3e4f5a6b",
"teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contentItemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"socialAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider": "x",
"status": "scheduled",
"scheduledAt": "2026-06-15T09:00:00.000Z",
"timezone": "Europe/London",
"platformPostId": "<string>",
"platformSettings": {},
"publishResults": {},
"providerPublishState": {
"provider": "x",
"status": "not_started",
"requiresPolling": true,
"publishId": "<string>",
"platformPostId": "<string>",
"providerStatus": "<string>",
"pollingReason": "<string>",
"uploadProgress": {
"nextByteStart": 123,
"uploadSize": 123
},
"failureCode": "<string>",
"failureCategory": "rate_limited"
},
"errorCode": "<string>",
"errorMessage": "<string>",
"errorCategory": "rate_limited",
"workflowId": "<string>",
"workflowRunId": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
},
"scheduledDestinationAccountIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"draftDestinationAccountIds": [
"0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"
],
"saveDestination": "queue",
"saveMessage": "Saved to Queue",
"createdAt": "<string>",
"updatedAt": "<string>",
"postInput": {
"kind": "atomic",
"text": "<string>",
"attachments": [
{
"kind": "media",
"asset": {
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mimeType": "<string>",
"byteSize": 123,
"width": 123,
"height": 123,
"durationSeconds": 123,
"thumbnailUrl": "<string>",
"altText": "<string>"
},
"mediaType": "image",
"altText": "<string>"
}
],
"videoVariant": "green_screen_meme"
},
"postPublishActions": {
"firstComment": {
"text": "<string>",
"mediaIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"engagementCommentTrigger": {
"likeThreshold": 2,
"windowHours": 360,
"comment": {
"text": "<string>",
"mediaIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
},
"repostAfter": {
"offsetDays": 15,
"mode": "retweet",
"text": "<string>"
},
"recurrenceIntervalDays": 183,
"recurrenceEndsAt": "<string>"
}
}{
"issues": [
{
"_tag": "Pointer",
"path": [
"<string>"
],
"message": "<string>"
}
],
"message": "<string>",
"_tag": "HttpApiDecodeError"
}{
"message": "<string>",
"_tag": "Unauthorized"
}{
"message": "<string>",
"_tag": "PaymentRequired"
}{
"message": "<string>",
"_tag": "Forbidden"
}{
"message": "<string>",
"_tag": "NotFound"
}{
"message": "<string>",
"_tag": "Conflict",
"code": "<string>",
"currentRevision": 123
}{
"message": "<string>",
"code": "<string>",
"_tag": "UnprocessableEntity"
}{
"message": "<string>",
"_tag": "TooManyRequests",
"code": "<string>",
"retryAfterSeconds": 123
}{
"message": "<string>",
"_tag": "InternalError"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Team (workspace) id (UUID). Discover ids via the list teams endpoint or the agent context.
Body
Internal display title for the post; null clears it. Not published to the platform.
"June launch teaser"
Content format of the post; defaults to text_post.
text_post, text_image, text_video, carousel "text_post"
Body text of the post; for thread posts use postInput instead.
"Shipping day! Here is what is new in v1."
Structured content: an atomic post (text plus optional media/link attachments) or a thread of 2 or more atomic posts. Takes precedence over text.
- Option 1
- Option 2
Show child attributes
Show child attributes
UUIDs of previously uploaded media assets to attach to the post.
a Universally Unique Identifier
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$["0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"]
Saved after-publish automations (first comment, engagement-triggered comment, repost, recurrence) applied when the post is scheduled or published.
Show child attributes
Show child attributes
UUIDs of the social accounts selected for this draft. Empty clears the saved selection and duplicates are rejected.
a Universally Unique Identifier
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$["0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"]
Team-owned content workflow status to assign atomically with the post save.
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$Full replacement set of team-member user ids assigned to the post. Empty clears every assignee.
a Universally Unique Identifier
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$Full replacement set of existing or inline-created user tags. Empty clears every user-tag assignment.
- Option 1
- Option 2
Show child attributes
Show child attributes
Content source UUIDs this post was generated from. Records post-from-source provenance that drives each source's usedCount (deduplicated per post; every id must belong to the team or the create is rejected). When generating posts from sources, pass the ids of the sources actually used so least-used source rotation stays accurate.
a Universally Unique Identifier
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$["0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"]
Response
Success
UUID of the post.
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"3c9d8e7f-6a5b-4c3d-9e2f-1a0b9c8d7e6f"
a Universally Unique Identifier
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$Content format of a post: text_post (text only), text_image, text_video, or carousel (2+ photos).
text_post, text_image, text_video, carousel "text_post"
"text_image"
slideshow, image_meme, green_screen_meme Editorial status of a post: idea, proposed_render, draft, approved, rejected, archived, or deleted.
idea, proposed_render, draft, in_review, approved, rejected, archived, deleted "draft"
"approved"
Workspace-defined content workflow status currently assigned to the post.
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$a Universally Unique Identifier
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$Display metadata (mime type, name, thumbnail path) for the post's media, in the same order as assetIds. Empty for text-only posts.
Show child attributes
Show child attributes
Deduped, sorted union of the post's non-deleted assets' AI tags; empty for text-only posts.
["launch", "product"]
User/agent-assigned registry tags (id, name, colour) on the post; distinct from AI-derived assetTags. Empty when no tags are assigned.
Show child attributes
Show child attributes
Team members assigned to the post (userId plus display name/email), in assignment order. Empty when unassigned. Set via the setPostAssignees endpoint.
Show child attributes
Show child attributes
a Universally Unique Identifier
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$Show child attributes
Show child attributes
a Universally Unique Identifier
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$UUIDs of the social accounts selected for this draft. Empty clears the saved selection and duplicates are rejected.
a Universally Unique Identifier
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$["0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"]
queue, drafts Saved to Queue, Saved to Drafts - Option 1
- Option 2
Show child attributes
Show child attributes
Show child attributes
Show child attributes