Create post (publish immediately)
curl --request POST \
--url https://api.smartlyq.com/v1/social/posts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"platforms": [],
"account_ids": [
123
],
"media_urls": [
"<string>"
],
"link": "<string>",
"allow_duplicates": true,
"platform_options": {
"tiktok": {
"privacy_level": "PUBLIC_TO_EVERYONE"
},
"instagram": {
"content": "IG-flavored caption ✨"
}
}
}
'import requests
url = "https://api.smartlyq.com/v1/social/posts"
payload = {
"content": "<string>",
"platforms": [],
"account_ids": [123],
"media_urls": ["<string>"],
"link": "<string>",
"allow_duplicates": True,
"platform_options": {
"tiktok": { "privacy_level": "PUBLIC_TO_EVERYONE" },
"instagram": { "content": "IG-flavored caption ✨" }
}
}
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({
content: '<string>',
platforms: [],
account_ids: [123],
media_urls: ['<string>'],
link: '<string>',
allow_duplicates: true,
platform_options: {
tiktok: {privacy_level: 'PUBLIC_TO_EVERYONE'},
instagram: {content: 'IG-flavored caption ✨'}
}
})
};
fetch('https://api.smartlyq.com/v1/social/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.smartlyq.com/v1/social/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([
'content' => '<string>',
'platforms' => [
],
'account_ids' => [
123
],
'media_urls' => [
'<string>'
],
'link' => '<string>',
'allow_duplicates' => true,
'platform_options' => [
'tiktok' => [
'privacy_level' => 'PUBLIC_TO_EVERYONE'
],
'instagram' => [
'content' => 'IG-flavored caption ✨'
]
]
]),
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.smartlyq.com/v1/social/posts"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"platforms\": [],\n \"account_ids\": [\n 123\n ],\n \"media_urls\": [\n \"<string>\"\n ],\n \"link\": \"<string>\",\n \"allow_duplicates\": true,\n \"platform_options\": {\n \"tiktok\": {\n \"privacy_level\": \"PUBLIC_TO_EVERYONE\"\n },\n \"instagram\": {\n \"content\": \"IG-flavored caption ✨\"\n }\n }\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.smartlyq.com/v1/social/posts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"platforms\": [],\n \"account_ids\": [\n 123\n ],\n \"media_urls\": [\n \"<string>\"\n ],\n \"link\": \"<string>\",\n \"allow_duplicates\": true,\n \"platform_options\": {\n \"tiktok\": {\n \"privacy_level\": \"PUBLIC_TO_EVERYONE\"\n },\n \"instagram\": {\n \"content\": \"IG-flavored caption ✨\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smartlyq.com/v1/social/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 \"content\": \"<string>\",\n \"platforms\": [],\n \"account_ids\": [\n 123\n ],\n \"media_urls\": [\n \"<string>\"\n ],\n \"link\": \"<string>\",\n \"allow_duplicates\": true,\n \"platform_options\": {\n \"tiktok\": {\n \"privacy_level\": \"PUBLIC_TO_EVERYONE\"\n },\n \"instagram\": {\n \"content\": \"IG-flavored caption ✨\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": 128,
"content": "Big news - our summer collection is live! ☀️",
"platforms": [
"twitter"
],
"status": "published",
"scheduled_time": "2026-07-26T09:41:22Z",
"published_at": "2026-07-26T09:41:22Z",
"created_at": "2026-07-26T09:41:22Z"
},
"usage": {
"units": 1,
"cost": "0.0150",
"balance_remaining": "99.9850"
},
"meta": {
"request_id": "req_9f3a2b1c-7d4e-4a08-b2c6-5e1f8a9d0c34",
"timestamp": "2026-07-26T09:41:22Z"
}
}{
"success": false,
"error": {
"code": "BAD_REQUEST",
"message": "The request body is not valid JSON.",
"details": {}
},
"meta": {
"request_id": "req_9f3a2b1c-7d4e-4a08-b2c6-5e1f8a9d0c34",
"timestamp": "2026-07-26T09:41:22Z"
}
}{
"success": false,
"error": {
"code": "INVALID_API_KEY",
"message": "Missing or malformed Authorization header",
"details": {}
},
"meta": {
"request_id": "req_9f3a2b1c-7d4e-4a08-b2c6-5e1f8a9d0c34",
"timestamp": "2026-07-26T09:41:22Z"
}
}{
"success": false,
"error": {
"code": "INSUFFICIENT_BALANCE",
"message": "Wallet balance is insufficient for this request",
"details": {
"required": "0.0250",
"balance": "0.0100"
}
},
"meta": {
"request_id": "req_9f3a2b1c-7d4e-4a08-b2c6-5e1f8a9d0c34",
"timestamp": "2026-07-26T09:41:22Z"
}
}{
"success": false,
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "API key lacks required scope: social:write",
"details": {
"required_scope": "social:write"
}
},
"meta": {
"request_id": "req_9f3a2b1c-7d4e-4a08-b2c6-5e1f8a9d0c34",
"timestamp": "2026-07-26T09:41:22Z"
}
}{
"success": false,
"error": {
"code": "DUPLICATE_CONTENT",
"message": "<string>",
"details": {
"existing_post_id": 123
}
},
"meta": {
"request_id": "req_9f3a2b1c-7d4e-4a08-b2c6-5e1f8a9d0c34",
"timestamp": "2026-07-26T09:41:22Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Missing required fields: content, platforms.",
"details": {
"fields": [
"content",
"platforms"
]
}
},
"meta": {
"request_id": "req_9f3a2b1c-7d4e-4a08-b2c6-5e1f8a9d0c34",
"timestamp": "2026-07-26T09:41:22Z"
}
}{
"success": false,
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded. Retry after 12 seconds.",
"details": {
"retry_after": 12
}
},
"meta": {
"request_id": "req_9f3a2b1c-7d4e-4a08-b2c6-5e1f8a9d0c34",
"timestamp": "2026-07-26T09:41:22Z"
}
}{
"success": false,
"error": {
"code": "SERVER_ERROR",
"message": "Something went wrong on our side. Retry with the same request_id - it is safe.",
"details": {}
},
"meta": {
"request_id": "req_9f3a2b1c-7d4e-4a08-b2c6-5e1f8a9d0c34",
"timestamp": "2026-07-26T09:41:22Z"
}
}Authorizations
API key from Developer dashboard (Bearer token).
Headers
Act inside a profile (sub-account) you own: data reads and writes target the profile workspace while billing, rate limits and usage stay on your own account. Requires the profiles:manage scope. Returns 404 for profiles you do not own and 409 for paused profiles.
Client idempotency key (X-Request-Id accepted as an alias). Send a fresh key per logical post and REUSE it when retrying that exact call after a timeout / 5xx / connection reset: the retry returns the original post with HTTP 200 and idempotent_replay: true instead of creating a duplicate. A key permanently identifies its post in the workspace (deleting the post frees the key). See the Idempotency guide.
64^[A-Za-z0-9._:-]{1,64}$Body
Post text content
Target platforms. Use twitter for X and gmb for Google Business. telegram posts via the workspace's connected bot (created with @BotFather); discord posts via the connected server webhook. Both are connected in the dashboard's Social Accounts page.
facebook, instagram, twitter, linkedin, youtube, tiktok, gmb, threads, bluesky, tumblr, telegram, discord IDs of connected social accounts to post to
Media URLs to attach to the post
URL to include with the post
Skip the 24h duplicate-content guard. Without it, content identical to a post created in this workspace in the last 24 hours is rejected with 409 DUPLICATE_CONTENT (and the charge is refunded).
Per-platform composer options - the same payload the web composer stores; publish handlers read it as-is (unknown keys are ignored, max 20KB). Keyed by platform, e.g. {"tiktok": {"privacy_level": "SELF_ONLY"}, "instagram": {"content": "IG-specific caption"}, "_thumbnail": {"timestamp_ms": 3000}}. Common keys: per-platform content override; tiktok privacy/duet/stitch options; _thumbnail custom video cover. See the Platform options guide for every key each platform accepts (privacy, flair, first comments, formatting, AI-disclosure flags, thumbnails and more).
{ "tiktok": { "privacy_level": "PUBLIC_TO_EVERYONE" }, "instagram": { "content": "IG-flavored caption ✨" } }
curl --request POST \
--url https://api.smartlyq.com/v1/social/posts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"platforms": [],
"account_ids": [
123
],
"media_urls": [
"<string>"
],
"link": "<string>",
"allow_duplicates": true,
"platform_options": {
"tiktok": {
"privacy_level": "PUBLIC_TO_EVERYONE"
},
"instagram": {
"content": "IG-flavored caption ✨"
}
}
}
'import requests
url = "https://api.smartlyq.com/v1/social/posts"
payload = {
"content": "<string>",
"platforms": [],
"account_ids": [123],
"media_urls": ["<string>"],
"link": "<string>",
"allow_duplicates": True,
"platform_options": {
"tiktok": { "privacy_level": "PUBLIC_TO_EVERYONE" },
"instagram": { "content": "IG-flavored caption ✨" }
}
}
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({
content: '<string>',
platforms: [],
account_ids: [123],
media_urls: ['<string>'],
link: '<string>',
allow_duplicates: true,
platform_options: {
tiktok: {privacy_level: 'PUBLIC_TO_EVERYONE'},
instagram: {content: 'IG-flavored caption ✨'}
}
})
};
fetch('https://api.smartlyq.com/v1/social/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.smartlyq.com/v1/social/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([
'content' => '<string>',
'platforms' => [
],
'account_ids' => [
123
],
'media_urls' => [
'<string>'
],
'link' => '<string>',
'allow_duplicates' => true,
'platform_options' => [
'tiktok' => [
'privacy_level' => 'PUBLIC_TO_EVERYONE'
],
'instagram' => [
'content' => 'IG-flavored caption ✨'
]
]
]),
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.smartlyq.com/v1/social/posts"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"platforms\": [],\n \"account_ids\": [\n 123\n ],\n \"media_urls\": [\n \"<string>\"\n ],\n \"link\": \"<string>\",\n \"allow_duplicates\": true,\n \"platform_options\": {\n \"tiktok\": {\n \"privacy_level\": \"PUBLIC_TO_EVERYONE\"\n },\n \"instagram\": {\n \"content\": \"IG-flavored caption ✨\"\n }\n }\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.smartlyq.com/v1/social/posts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"platforms\": [],\n \"account_ids\": [\n 123\n ],\n \"media_urls\": [\n \"<string>\"\n ],\n \"link\": \"<string>\",\n \"allow_duplicates\": true,\n \"platform_options\": {\n \"tiktok\": {\n \"privacy_level\": \"PUBLIC_TO_EVERYONE\"\n },\n \"instagram\": {\n \"content\": \"IG-flavored caption ✨\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smartlyq.com/v1/social/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 \"content\": \"<string>\",\n \"platforms\": [],\n \"account_ids\": [\n 123\n ],\n \"media_urls\": [\n \"<string>\"\n ],\n \"link\": \"<string>\",\n \"allow_duplicates\": true,\n \"platform_options\": {\n \"tiktok\": {\n \"privacy_level\": \"PUBLIC_TO_EVERYONE\"\n },\n \"instagram\": {\n \"content\": \"IG-flavored caption ✨\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": 128,
"content": "Big news - our summer collection is live! ☀️",
"platforms": [
"twitter"
],
"status": "published",
"scheduled_time": "2026-07-26T09:41:22Z",
"published_at": "2026-07-26T09:41:22Z",
"created_at": "2026-07-26T09:41:22Z"
},
"usage": {
"units": 1,
"cost": "0.0150",
"balance_remaining": "99.9850"
},
"meta": {
"request_id": "req_9f3a2b1c-7d4e-4a08-b2c6-5e1f8a9d0c34",
"timestamp": "2026-07-26T09:41:22Z"
}
}{
"success": false,
"error": {
"code": "BAD_REQUEST",
"message": "The request body is not valid JSON.",
"details": {}
},
"meta": {
"request_id": "req_9f3a2b1c-7d4e-4a08-b2c6-5e1f8a9d0c34",
"timestamp": "2026-07-26T09:41:22Z"
}
}{
"success": false,
"error": {
"code": "INVALID_API_KEY",
"message": "Missing or malformed Authorization header",
"details": {}
},
"meta": {
"request_id": "req_9f3a2b1c-7d4e-4a08-b2c6-5e1f8a9d0c34",
"timestamp": "2026-07-26T09:41:22Z"
}
}{
"success": false,
"error": {
"code": "INSUFFICIENT_BALANCE",
"message": "Wallet balance is insufficient for this request",
"details": {
"required": "0.0250",
"balance": "0.0100"
}
},
"meta": {
"request_id": "req_9f3a2b1c-7d4e-4a08-b2c6-5e1f8a9d0c34",
"timestamp": "2026-07-26T09:41:22Z"
}
}{
"success": false,
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "API key lacks required scope: social:write",
"details": {
"required_scope": "social:write"
}
},
"meta": {
"request_id": "req_9f3a2b1c-7d4e-4a08-b2c6-5e1f8a9d0c34",
"timestamp": "2026-07-26T09:41:22Z"
}
}{
"success": false,
"error": {
"code": "DUPLICATE_CONTENT",
"message": "<string>",
"details": {
"existing_post_id": 123
}
},
"meta": {
"request_id": "req_9f3a2b1c-7d4e-4a08-b2c6-5e1f8a9d0c34",
"timestamp": "2026-07-26T09:41:22Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Missing required fields: content, platforms.",
"details": {
"fields": [
"content",
"platforms"
]
}
},
"meta": {
"request_id": "req_9f3a2b1c-7d4e-4a08-b2c6-5e1f8a9d0c34",
"timestamp": "2026-07-26T09:41:22Z"
}
}{
"success": false,
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded. Retry after 12 seconds.",
"details": {
"retry_after": 12
}
},
"meta": {
"request_id": "req_9f3a2b1c-7d4e-4a08-b2c6-5e1f8a9d0c34",
"timestamp": "2026-07-26T09:41:22Z"
}
}{
"success": false,
"error": {
"code": "SERVER_ERROR",
"message": "Something went wrong on our side. Retry with the same request_id - it is safe.",
"details": {}
},
"meta": {
"request_id": "req_9f3a2b1c-7d4e-4a08-b2c6-5e1f8a9d0c34",
"timestamp": "2026-07-26T09:41:22Z"
}
}
