Publishing · Posts
Creates a post.
https://api.pozy.ai/v1/postsGuides: Create a post, Scheduling and timezones, Drafts and approvals
Request
Send your API key as Authorization: Bearer pz_live_.... Read-only keys cannot call it. Keys with the publishing resource group disabled get 403 resource_group_disabled. Authentication
Headers
| Name | Type | Notes |
|---|---|---|
Idempotency-Key | string | Up to 255 charactersRetries with the same key return the original result. See Idempotency |
x-request-id | string (uuid) | Your own id for this request, echoed back in X-Request-Id |
Request body
application/json, required
titlestringcontentstringmediaItemsarray of object13 child fields
typestringOne of
image,video,gif,document.urlstring (URL)fileIdstringaccountIdstringtitlestringaltTextstringfilenamestringsizeintegermimeTypestringthumbnailstring (URL)instagramThumbnailstring (URL)subtitlesarray of objectUp to 20 items.
2 child fields
urlstring (URL)requiredlanguagestringrequired
tiktokProcessedboolean
platformsarray of objectplatformstringrequiredaccountIdstringrequiredcustomContentstringcustomMediaarray of object13 child fields
typestringOne of
image,video,gif,document.urlstring (URL)fileIdstringaccountIdstringtitlestringaltTextstringfilenamestringsizeintegermimeTypestringthumbnailstring (URL)instagramThumbnailstring (URL)subtitlesarray of objectUp to 20 items.
2 child fields
urlstring (URL)requiredlanguagestringrequired
tiktokProcessedboolean
scheduledForstring (date-time)platformSpecificDataobjectOne of:
X settings (12 fields)
articleobject4 child fields
titlestringrequiredcontent_stateobjectrequired2 child fields
blocksarray of objectrequiredAt least 1 item.
6 child fields
typestringrequiredOne of
unstyled,header-one,header-two,header-three,unordered-list-item,ordered-list-item,blockquote,atomic.textstringrequiredkeystringdataobject4 child fields
cashtagsarray of objecthashtagsarray of objectmentionsarray of objecturlsarray of object
inline_style_rangesarray of object3 child fields
offsetintegerrequiredAt least 0.
lengthintegerrequiredAt least 0.
stylestringrequiredOne of
bold,italic,strikethrough.
entity_rangesarray of object3 child fields
keyintegerrequiredAt least 0.
offsetintegerrequiredAt least 0.
lengthintegerrequiredAt least 0.
entitiesarray of objectrequiredOne of:
Option 1 (2 fields)
keystringrequiredvalueobjectrequired3 child fields
typestringrequiredAlways
post.mutabilitystringrequiredOne of
immutable,mutable,segmented.dataobjectrequired
Option 2 (2 fields)
keystringrequiredvalueobjectrequired3 child fields
typestringrequiredAlways
link.mutabilitystringrequiredOne of
immutable,mutable,segmented.dataobjectrequired
Option 3 (2 fields)
keystringrequiredvalueobjectrequired3 child fields
typestringrequiredAlways
image.mutabilitystringrequiredOne of
immutable,mutable,segmented.dataobjectrequired
Option 4 (2 fields)
keystringrequiredvalueobjectrequired3 child fields
typestringrequiredAlways
emoji.mutabilitystringrequiredOne of
immutable,mutable,segmented.dataobjectrequired
Option 5 (2 fields)
keystringrequiredvalueobjectrequired3 child fields
typestringrequiredAlways
markdown.mutabilitystringrequiredOne of
immutable,mutable,segmented.dataobjectrequired
Option 6 (2 fields)
keystringrequiredvalueobjectrequired3 child fields
typestringrequiredOne of
divider,latex.mutabilitystringrequiredOne of
immutable,mutable,segmented.dataobjectrequired
modestringOne of
publish,draft. Defaultpublish.coverobject2 child fields
urlstring (URL)requiredMatches
^https?://.+\.(?:[jJ][pP][eE]?[gG]|[pP][nN][gG]|[wW][eE][bB][pP])(?:[?#].*)?$.altTextstringUp to 1000 characters.
replyToTweetIdstringquoteTweetIdstringreplySettingsstringOne of
following,mentionedUsers,subscribers,verified.threadItemsarray of object2 child fields
contentstringmediaItemsarray of object13 child fields
typestringOne of
image,video,gif,document.urlstring (URL)fileIdstringaccountIdstringtitlestringaltTextstringfilenamestringsizeintegermimeTypestringthumbnailstring (URL)instagramThumbnailstring (URL)subtitlesarray of objectUp to 20 items.
2 child fields
urlstring (URL)requiredlanguagestringrequired
tiktokProcessedboolean
pollobject2 child fields
optionsarray of stringrequiredAt least 2 items. Up to 4 items. Each item: 1 to 25 characters.
duration_minutesintegerrequired5 to 10080.
longVideobooleanDefault
false.geoRestrictionobject1 child field
countriesarray of stringrequiredAt least 1 item. Up to 25 items. Each item: matches
^[A-Z]{2}$.
paidPartnershipbooleanDefault
false.madeWithAibooleanDefault
false.sensitiveMediaobject3 child fields
adultContentbooleangraphicViolencebooleanotherboolean
mediaTaggedUsersarray of stringUp to 10 items. Each item: matches
^@?\w{1,15}$.
Threads settings (3 fields)
topic_tagstring1 to 50 characters.
firstCommentstringUp to 500 characters.
threadItemsarray of object2 child fields
contentstringmediaItemsarray of object13 child fields
typestringOne of
image,video,gif,document.urlstring (URL)fileIdstringaccountIdstringtitlestringaltTextstringfilenamestringsizeintegermimeTypestringthumbnailstring (URL)instagramThumbnailstring (URL)subtitlesarray of objectUp to 20 items.
2 child fields
urlstring (URL)requiredlanguagestringrequired
tiktokProcessedboolean
Facebook settings (6 fields)
contentTypestringOne of
story,reel.titlestringfirstCommentstringpageIdstringgeoRestrictionobject1 child field
countriesarray of stringrequiredAt least 1 item. Up to 25 items. Each item: matches
^[A-Z]{2}$.
facebookSettingsobject4 child fields
draftbooleanDefault
false.carouselCardsarray of objectAt least 2 items. Up to 10 items.
3 child fields
linkstring (URL)requirednamestringUp to 255 characters.
descriptionstringUp to 255 characters.
carouselLinkstring (URL)textFormatPresetIdstringMatches
^\d+$.
Instagram settings (17 fields)
contentTypestringOne of
story.shareToFeedbooleanDefault
true.collaboratorsarray of stringfirstCommentstringtrialParamsobject1 child field
graduationStrategystringOne of
MANUAL,SS_PERFORMANCE.
userTagsarray of object4 child fields
usernamestringrequiredxnumber0 to 1.
ynumber0 to 1.
mediaIndexintegerAt least 0.
audioNamestringaudioConfigurationobject3 child fields
audioIdstringrequiredaudioVolumeinteger0 to 100.
videoVolumeinteger0 to 100.
muteAudiobooleanDefault
false.thumbOffsetintegerAt least 0.
instagramThumbnailstring (URL)reelCoverstring (URL)isAiGeneratedbooleanDefault
false.isPaidPartnershipbooleanDefault
false.brandedContentSponsorsarray of stringUp to 2 items.
commentsEnabledbooleanDefault
true.locationIdstringMatches
^[0-9]+$.
Linked In settings (8 fields)
documentTitlestringorganizationUrnstringfirstCommentstringdisableLinkPreviewbooleanaudienceobject10 child fields
countriesarray of stringUp to 25 items.
geoLocationsarray of stringinterfaceLocalesarray of object2 child fields
languagestringrequiredcountrystringrequired
industriesarray of stringjobFunctionsarray of stringsenioritiesarray of stringstaffCountRangesarray of stringEach item: one of
SIZE_1,SIZE_2_TO_10,SIZE_11_TO_50,SIZE_51_TO_200,SIZE_201_TO_500,SIZE_501_TO_1000,SIZE_1001_TO_5000,SIZE_5001_TO_10000,SIZE_10001_OR_MORE.degreesarray of stringfieldsOfStudyarray of stringorganizationsarray of string
reshareUrlstringgeoRestrictionobject1 child field
countriesarray of stringrequiredAt least 1 item. Up to 25 items. Each item: matches
^[A-Z]{2}$.
pollobject3 child fields
questionstringrequired1 to 140 characters.
optionsarray of stringrequiredAt least 2 items. Up to 4 items. Each item: 1 to 30 characters.
durationstringOne of
ONE_DAY,THREE_DAYS,SEVEN_DAYS,FOURTEEN_DAYS. DefaultSEVEN_DAYS.
Pinterest settings (7 fields)
titlestringUp to 100 characters.
boardIdstringboardSectionIdstringlinkstring (URL)coverImageUrlstring (URL)coverImageKeyFrameTimeintegerisAiGeneratedbooleanDefault
false.
You Tube settings (8 fields)
titlestringUp to 100 characters.
visibilitystringOne of
public,private,unlisted. Defaultpublic.madeForKidsbooleanDefault
false.firstCommentstringUp to 10000 characters.
containsSyntheticMediabooleanDefault
false.notifySubscribersbooleanDefault
true.categoryIdstringDefault
22.playlistIdstring
Google Business settings (6 fields)
locationIdstringlanguageCodestringtopicTypestringOne of
STANDARD,EVENT,OFFER. DefaultSTANDARD.callToActionobject2 child fields
typestringrequiredOne of
LEARN_MORE,BOOK,ORDER,SHOP,SIGN_UP,CALL.urlstring (URL)required
eventobject2 child fields
titlestringrequiredscheduleobjectrequired4 child fields
startDateobjectrequired3 child fields
yearintegerrequiredmonthintegerrequired1 to 12.
dayintegerrequired1 to 31.
startTimeobject2 child fields
hoursinteger0 to 23.
minutesinteger0 to 59.
endDateobjectrequired3 child fields
yearintegerrequiredmonthintegerrequired1 to 12.
dayintegerrequired1 to 31.
endTimeobject2 child fields
hoursinteger0 to 23.
minutesinteger0 to 59.
offerobject3 child fields
redeemOnlineUrlstring (URL)termsConditionsstringcouponCodestring
Tik Tok settings (22 fields)
draftbooleanprivacyLevelstringallowCommentbooleanallowDuetbooleanallowStitchbooleancommercialContentTypestringOne of
none,brand_organic,brand_content.brandPartnerPromotebooleanisBrandOrganicPostbooleancontentPreviewConfirmedbooleanexpressConsentGivenbooleanmediaTypestringOne of
video,photo.videoCoverTimestampMsintegerAt least 0.
videoCoverImageUrlstring (URL)photoCoverIndexintegerAt least 0.
autoAddMusicbooleanmusicSoundInfoobject4 child fields
musicSoundIdstringrequiredmusicSoundVolumeintegerDefault
50. 0 to 100.musicSoundStartintegerAt least 0.
musicSoundEndintegerAt least 0.
videoOriginalSoundVolumeinteger0 to 100.
videoMadeWithAibooleanlocationIdstringlocationNamestringisAdsOnlybooleandescriptionstringUp to 4000 characters.
Telegram settings (4 fields)
parseModestringOne of
HTML,Markdown,MarkdownV2.disableWebPagePreviewbooleandisableNotificationbooleanprotectContentboolean
Snapchat settings (1 fields)
contentTypestringOne of
story,saved_story,spotlight. Defaultstory.
Reddit settings (12 fields)
subredditstringtitlestringUp to 300 characters.
urlstring (URL)forceSelfbooleanflairIdstringflairTextstringnsfwbooleanDefault
false.spoilerbooleanDefault
false.sendrepliesbooleanDefault
true.nativeVideobooleanDefault
true.videogifbooleanvideoPosterUrlstring (URL)
Bluesky settings (2 fields)
langsarray of stringAt least 1 item. Up to 3 items.
threadItemsarray of object2 child fields
contentstringmediaItemsarray of object13 child fields
typestringOne of
image,video,gif,document.urlstring (URL)fileIdstringaccountIdstringtitlestringaltTextstringfilenamestringsizeintegermimeTypestringthumbnailstring (URL)instagramThumbnailstring (URL)subtitlesarray of objectUp to 20 items.
2 child fields
urlstring (URL)requiredlanguagestringrequired
tiktokProcessedboolean
Discord settings (10 fields)
channelIdstringrequiredembedsarray of objectUp to 10 items.
9 child fields
titlestringdescriptionstringurlstringcolorintegerimageobject1 child field
urlstring
thumbnailobject1 child field
urlstring
footerobject2 child fields
textstringicon_urlstring
authorobject3 child fields
namestringurlstringicon_urlstring
fieldsarray of objectUp to 25 items.
3 child fields
namestringrequiredvaluestringrequiredinlineboolean
pollobject4 child fields
questionobject1 child field
textstringrequired
answersarray of objectUp to 10 items.
1 child field
poll_mediaobject1 child field
textstring
durationinteger1 to 768.
allow_multiselectboolean
crosspostbooleanforumThreadNamestringforumAppliedTagsarray of stringUp to 5 items.
threadFromMessageobject3 child fields
namestringautoArchiveDurationintegerOne of
60,1440,4320,10080.rateLimitPerUserinteger0 to 21600.
ttsbooleanwebhookUsernamestringwebhookAvatarUrlstring
Slack settings (5 fields)
threadTsstringunfurlLinksbooleanunfurlMediabooleanusernamestringiconUrlstring
scheduledForstring (date-time)publishNowbooleanDefault
false.isDraftbooleanDefault
false.requiresApprovalbooleanDefault
false.dryRunbooleanDefault
false.timezonestringtagsarray of stringhashtagsarray of stringmentionsarray of stringcrosspostingEnabledbooleanDefault
true.metadataobjecttiktokSettingsobject22 child fields
draftbooleanprivacyLevelstringallowCommentbooleanallowDuetbooleanallowStitchbooleancommercialContentTypestringOne of
none,brand_organic,brand_content.brandPartnerPromotebooleanisBrandOrganicPostbooleancontentPreviewConfirmedbooleanexpressConsentGivenbooleanmediaTypestringOne of
video,photo.videoCoverTimestampMsintegerAt least 0.
videoCoverImageUrlstring (URL)photoCoverIndexintegerAt least 0.
autoAddMusicbooleanmusicSoundInfoobject4 child fields
musicSoundIdstringrequiredmusicSoundVolumeintegerDefault
50. 0 to 100.musicSoundStartintegerAt least 0.
musicSoundEndintegerAt least 0.
videoOriginalSoundVolumeinteger0 to 100.
videoMadeWithAibooleanlocationIdstringlocationNamestringisAdsOnlybooleandescriptionstringUp to 4000 characters.
facebookSettingsobjectdraftbooleanDefault
false.carouselCardsarray of objectAt least 2 items. Up to 10 items.
3 child fields
linkstring (URL)requirednamestringUp to 255 characters.
descriptionstringUp to 255 characters.
carouselLinkstring (URL)textFormatPresetIdstringMatches
^\d+$.
recyclingobject7 child fields
enabledbooleanDefault
true.gapintegerAt least 1.
gapFreqstringOne of
week,month. Defaultmonth.startDatestring (date-time)expireCountintegerAt least 1. Can be null.
expireDatestring (date-time)Can be null.
contentVariationsarray of stringUp to 20 items.
queuedFromProfilestringqueueIdstring
Example
curl -X POST "https://api.pozy.ai/v1/posts" \
-H "Authorization: Bearer $POZY_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"title": "Launch day",
"content": "Hello from Pozy",
"mediaItems": [
{
"type": "image",
"url": "https://pozy.ai/media/example-1.jpg",
"fileId": "6035bf6bd3aac3067c336c50"
}
],
"platforms": [
{
"platform": "instagram",
"accountId": "696e0b682d0a31188e7a2ba9"
}
]
}'import { randomUUID } from "node:crypto";
const res = await fetch("https://api.pozy.ai/v1/posts", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POZY_API_KEY}`,
"Idempotency-Key": randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
title: "Launch day",
content: "Hello from Pozy",
mediaItems: [
{
type: "image",
url: "https://pozy.ai/media/example-1.jpg",
fileId: "6035bf6bd3aac3067c336c50"
}
],
platforms: [
{
platform: "instagram",
accountId: "696e0b682d0a31188e7a2ba9"
}
]
}),
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);import os
import requests
resp = requests.post(
"https://api.pozy.ai/v1/posts",
headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
json={
"title": "Launch day",
"content": "Hello from Pozy",
"mediaItems": [
{
"type": "image",
"url": "https://pozy.ai/media/example-1.jpg",
"fileId": "6035bf6bd3aac3067c336c50",
},
],
"platforms": [
{
"platform": "instagram",
"accountId": "696e0b682d0a31188e7a2ba9",
},
],
},
timeout=30,
)
resp.raise_for_status()
print(resp.json())Response
200 on success
{
"dryRun": true,
"canPublish": true,
"tiktok": [
{
"accountId": "696e0b682d0a31188e7a2ba9",
"canPublish": true,
"alreadyPostedToday": true,
"reason": "string"
}
]
}Errors
Errors use one shape: { error, type, code, param?, details? }. The ones you are most likely to see here:
| 400 | invalid_request_error | A parameter or body field is missing or invalid. param names it. |
| 401 | authentication_error | The API key is missing, revoked or expired. |
| 403 | permission_error | The key is read-only, scoped to other profiles, or has this resource group disabled. |
| 429 | rate_limit_error | Too many requests this minute. Wait for Retry-After seconds. |
Every code is listed in Errors.