Table of contents
This document provides a reference for using the Robopost Public API directly via HTTP, rather than through the Python client library. Here, you’ll find endpoint details, request and response structures, authentication parameters, and usage examples in a REST context.
Base URL: https://public-api.robopost.app/v1
If you want to use the API through our Python Wrapper, click here.
Authentication
All requests to the Robopost Public API must include your API key as a query parameter:
?apikey=YOUR_API_KEY
For example:
POST /v1/scheduled_posts?apikey=YOUR_API_KEY
If the apikey
is missing or invalid, the server will respond with an appropriate 4xx
error status.
All endpoints discussed here require an API key, passed as a query parameter named apikey
. You can generate API Keys under "Team" > "Manage API Keys".
Upload Media
Use this endpoint to upload images or videos that you want to attach to your scheduled posts. Each upload returns a media object containing the ID and a storage_object_id
, which you’ll reference later when creating a scheduled post.
POST /medias/upload
- Authentication:
apikey
query parameter - Request:
multipart/form-data
with a single field namedfile
(the binary file to upload). - Response: A JSON object describing the uploaded media.
Example Request (cURL)
curl -X POST \
"https://public-api.robopost.app/v1/medias/upload?apikey=YOUR_API_KEY" \
-F "file=@path/to/image.jpg"
Example Successful Response (JSON)
{
"id": "64f20e2c915d2f1970ec8c09",
"name": "image.jpg",
"extension": "jpg",
"storage_object_id": "9f73ad62-xxxxx-xxxxx-xxxxx-9556dcb903f4"
}
Field | Description |
---|---|
id | Internal Robopost ID for this media |
name | Original file name |
extension | File extension (e.g., png , jpg , mp4 ) |
storage_object_id | Unique identifier for referencing this file in scheduled posts (important!) |
Create Scheduled Posts
Use this endpoint to schedule new posts (including drafts and recurring posts) across one or multiple social channels. You will need:
- The
channel_id
(or multiple IDs) for each social account. - (Optionally) the
storage_object_id
for media uploads (if you plan to attach images or video).
POST /scheduled_posts/
- Authentication:
apikey
query parameter - Request Body: JSON object matching the
PublicAPIScheduledPostCreateHTTPPayload
schema (see below). - Response: Array of objects matching the
PublicAPIScheduledPostRead
schema, each representing a newly created scheduled post.
Note: The endpoint always returns an array (even if you only schedule one post).
URL
POST /v1/scheduled_posts/?apikey=YOUR_API_KEY
Example Request (cURL)
Below is an example showing how to schedule one post (with text, channel IDs, and an attached image).
curl -X POST \
"https://public-api.robopost.app/v1/scheduled_posts/?apikey=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Hello from the REST API!",
"channel_ids": ["my_facebook_channel_id"],
"image_object_ids": ["9f73ad62-xxxxx-xxxxx-xxxxx-9556dcb903f4"],
"schedule_at": "2025-03-01T10:00:00Z",
"is_draft": false
}'
Example Successful Response
[
{
"id": "64f20e2c915d2f1970ec8c09",
"text": "Hello from the REST API!",
"channel_ids": ["my_facebook_channel_id"],
"image_object_ids": ["9f73ad62-xxxxx-xxxxx-xxxxx-9556dcb903f4"],
"video_object_id": null,
"gif_object_id": null,
"facebook_settings": {
"postType": "POST"
},
"instagram_settings": {
"postType": "POST"
},
"pinterest_settings": {
"pinTitle": "",
"destinationLink": ""
},
"wordpress_settings": {
"postTitle": "",
"postText": "",
"postSlug": "",
"postType": "POST",
"postCategories": [],
"postTags": [],
"postFeaturedImage": null,
"postParentPage": 0
},
"youtube_settings": {
"videoTitle": "",
"videoType": "video",
"videoDescription": "",
"videoPrivacyStatus": "public",
"videoThumbnailImageObject": null,
"videoThumbnailGroupUuid": null
},
"tiktok_settings": {
"title": "",
"privacyLevel": "PUBLIC_TO_EVERYONE",
"disableDuet": false,
"disableComment": false,
"disableStitch": false,
"videoCoverTimestampMs": 0,
"videoThumbnailGroupUuid": null,
"autoAddMusic": true
},
"gmb_settings": {
"postTopicType": "STANDARD",
"offerTitle": "",
"offerCouponCode": "",
"offerRedeemOnlineUrl": "",
"offerTermsConditions": "",
"offerStartDt": null,
"offerEndDt": null,
"eventTitle": "",
"eventStartDt": null,
"eventEndDt": null,
"ctaButtonActionType": "ACTION_TYPE_UNSPECIFIED",
"ctaUrl": ""
},
"is_draft": false,
"post_collection_id": null,
"schedule_at": "2025-03-01T10:00:00Z",
"is_recur": false,
"recur_interval": "DAILY",
"recur_generate_new_ai_image": false,
"recur_generate_new_ai_image_model": "DALLE",
"recur_until_dt": null,
"recur_until_dt_enabled": false,
"recur_rephrase_text_with_ai": false,
"recur_rephrase_text_with_ai_tone": "FRIENDLY",
"recur_interval_time_slots": []
}
]
Request and Response Models
Below are the essential models for scheduling a post via the Robopost Public API.
These closely match the Python Pydantic models, but here we’ll describe them in a pure REST context.
PublicAPIScheduledPostCreateHTTPPayload
Field | Type | Description | Required/Default |
---|---|---|---|
_id(alias: id ) |
string (UUID) |
Unique ID for the scheduled post. Normally auto-generated by the backend if not provided. | Defaults to uuid4() |
text | string |
The main text/caption for the post. | Default: "" (empty) |
channel_ids | string[] |
An array of channel IDs where this post should be published. If is_draft=false , at least one channel ID is required. |
Default: [] |
image_object_ids | string[] |
Array of storage_object_id s for images uploaded via /medias/upload . |
Default: [] |
video_object_id | string |
storage_object_id for a video file (if any). |
Optional; Default: null |
gif_object_id | string |
storage_object_id for a GIF file (if any). |
Optional; Default: null |
facebook_settings | FacebookSettings |
Additional settings for Facebook posts. | Default: see FacebookSettings |
instagram_settings | InstagramSettings |
Additional settings for Instagram posts. | Default: see InstagramSettings |
pinterest_settings | PinterestSettings |
Additional settings for Pinterest pins. | Default: see PinterestSettings |
wordpress_settings | WordpressSettings |
Additional settings for WordPress posts. | Default: see WordpressSettings |
youtube_settings | YoutubeSettings |
Additional settings for YouTube posts. | Default: see YoutubeSettings |
tiktok_settings | TikTokSettings |
Additional settings for TikTok posts. | Default: see TikTokSettings |
gmb_settings | GMBSettings |
Additional settings for Google My Business (GMB) posts. | Default: see GMBSettings |
is_draft | boolean |
Set to true if creating a draft; otherwise false for a scheduled post. |
Default: false |
post_collection_id | string |
If you want to group this post into a “post collection” (i.e., a folder or batch), specify the collection ID here. | Optional; Default: null |
schedule_at | string (DateTime, UTC) |
The date/time to schedule the post (in UTC). If omitted, defaults to datetime.now() (UTC) on the server. |
Default: current UTC time |
is_recur | boolean |
Whether this post should recur. | Default: false |
recur_interval | AutomationRecurInterval |
The interval or rule for recurrence. Only relevant if is_recur=true . |
Default: DAILY |
recur_generate_new_ai_image | boolean |
Whether to generate a new AI image each time this post recurs. | Default: false |
recur_generate_new_ai_image_model | AIImageModel |
If recur_generate_new_ai_image=true , specify which AI model to use (e.g., DALLE ). |
Default: DALLE |
recur_until_dt | string (DateTime, UTC) |
The optional end date for recurrence. | Optional; Default: null |
recur_until_dt_enabled | boolean |
Set to true if you want to limit recurrence to recur_until_dt ; otherwise false . |
Default: false |
recur_rephrase_text_with_ai | boolean |
If true , the text caption will be automatically rephrased for each recurrence using AI. |
Default: false |
recur_rephrase_text_with_ai_tone | PostAIGenerateVoiceTone |
If recur_rephrase_text_with_ai=true , this specifies the voice/tone of the rephrased text (e.g., FUNNY , FRIENDLY ). |
Default: FRIENDLY |
recur_interval_time_slots | string[] (ISO 8601 UTC) |
For intervals like DAILY_SPECIFIC_TIME_SLOTS or WEEKLY_SPECIFIC_TIME_SLOTS , specify the times (or date-times) in UTC. |
Default: [] |
PublicAPIScheduledPostRead
Represents the newly created scheduled post (or draft) returned by the API. Most fields mirror those in the PublicAPIScheduledPostCreateHTTPPayload
. Notable difference: the id
is always set and additional fields reflect the final stored state.
Field | Type | Description |
---|---|---|
id | string |
Unique identifier of the scheduled post |
text | string |
Main text of the post |
channel_ids | string[] |
Channels targeted by this post |
image_object_ids | string[] |
IDs for attached images |
video_object_id | string |
ID for the attached video (if any) |
gif_object_id | string |
ID for the attached GIF (if any) |
facebook_settings | FacebookSettings |
Readback of platform-specific fields for Facebook |
instagram_settings | InstagramSettings |
Readback of platform-specific fields for Instagram |
pinterest_settings | PinterestSettings |
Readback of platform-specific fields for Pinterest |
wordpress_settings | WordpressSettings |
Readback of platform-specific fields for WordPress |
youtube_settings | YoutubeSettings |
Readback of platform-specific fields for YouTube |
tiktok_settings | TikTokSettings |
Readback of platform-specific fields for TikTok |
gmb_settings | GMBSettings |
Readback of platform-specific fields for Google My Business (GMB) |
is_draft | boolean |
true if saved as a draft, otherwise false |
post_collection_id | string |
ID of the post collection if grouped |
schedule_at | string (DateTime, UTC) |
The scheduled date/time in UTC |
is_recur | boolean |
Whether the post is recurring |
recur_interval | AutomationRecurInterval |
Interval for recurrence |
recur_generate_new_ai_image | boolean |
If true , each recurrence generates a new AI image |
recur_generate_new_ai_image_model | AIImageModel |
AI model used for generating images (if above is true ) |
recur_until_dt | string (DateTime, UTC) |
End date/time for recurrence (if enabled) |
recur_until_dt_enabled | boolean |
true if recurrence is capped at recur_until_dt |
recur_rephrase_text_with_ai | boolean |
true if text is rephrased by AI each time |
recur_rephrase_text_with_ai_tone | PostAIGenerateVoiceTone |
AI rephrase tone (if above is true ) |
recur_interval_time_slots | string[] (ISO 8601 UTC) |
Time slots for certain recurrence rules (daily/weekly-specific) |
FacebookSettings
Field | Type | Description | Default |
---|---|---|---|
postType | FacebookPostType |
POST or REELS |
POST |
InstagramSettings
Field | Type | Description | Default |
---|---|---|---|
postType | InstagramPostType |
POST , REELS , or STORIES |
POST |
PinterestSettings
Field | Type | Description | Default |
---|---|---|---|
pinTitle | string | The title of your pin | "" |
destinationLink | string | The link/URL that your pin redirects to | "" |
WordpressSettings
Field | Type | Description | Default |
---|---|---|---|
postTitle | string | Title of the WordPress post | "" |
postText | string | Full HTML or text for the post body | "" |
postSlug | string | Slug (if desired) | "" |
postType | WordpressPostType |
POST , PAGE (etc., if supported by your WP instance) |
POST |
postCategories | string[] | One or more category names or IDs | [] |
postTags | string[] | One or more tag names or IDs | [] |
postFeaturedImage | string | (Optional) Featured image URL or ID | null |
postParentPage | number | (Optional) Parent page ID for hierarchical WP setups | 0 |
YoutubeSettings
Field | Type | Description | Default |
---|---|---|---|
videoTitle | string | Title of the video/short | "" |
videoType | YoutubeVideoType |
video or short |
video |
videoDescription | string | Description/body text | "" |
videoPrivacyStatus | YoutubePrivacyStatus |
public , private , or unlisted |
public |
videoThumbnailImageObject | string | (Optional) An image ID for the thumbnail (if customizing) | null |
videoThumbnailGroupUuid | string | (Optional) Another ID for advanced thumbnail grouping (internal usage) | null |
Note: The actual uploaded video is tied tovideo_object_id
in the main payload. ThevideoType
andvideoPrivacyStatus
further configure how YouTube handles it.
TikTokSettings
Field | Type | Description | Default |
---|---|---|---|
title | string | Caption/title for the TikTok | "" |
privacyLevel | TikTokPrivacyLevel |
PUBLIC_TO_EVERYONE |
PUBLIC_TO_EVERYONE |
disableDuet | boolean | Whether to disable duets | false |
disableComment | boolean | Whether to disable comments | false |
disableStitch | boolean | Whether to disable stitching | false |
videoCoverTimestampMs | number | Milliseconds timestamp for the cover thumbnail | 0 |
videoThumbnailGroupUuid | string | (Optional) ID for advanced thumbnail grouping | null |
autoAddMusic | boolean | Whether TikTok should automatically add music | true |
Note: The actual uploaded TikTok video is tied to video_object_id
in the main payload.
GMBSettings
Field | Type | Description | Default |
---|---|---|---|
postTopicType | GMBPostTopicType |
STANDARD , OFFER , or EVENT |
STANDARD |
offerTitle | string | Offer title (if OFFER type) |
"" |
offerCouponCode | string | Coupon code (if OFFER type) |
"" |
offerRedeemOnlineUrl | string | URL where users can redeem the offer | "" |
offerTermsConditions | string | Terms and conditions | "" |
offerStartDt | string (DateTime, UTC) | Start date/time for an offer | null |
offerEndDt | string (DateTime, UTC) | End date/time for an offer | null |
eventTitle | string | Event title (if EVENT type) |
"" |
eventStartDt | string (DateTime, UTC) | Start date/time for the event | null |
eventEndDt | string (DateTime, UTC) | End date/time for the event | null |
ctaButtonActionType | GMBCTAButtonActionType |
CTA button action: e.g. BOOK , ORDER , SHOP , LEARN_MORE , SIGN_UP , CALL |
ACTION_TYPE_UNSPECIFIED |
ctaUrl | string | URL/phone number for the CTA button | "" |
Enums
AIImageModel
DALLE
,FLUX_SCHNELL
,FLUX_DEV
,FLUX_PRO
PostAIGenerateVoiceTone
- Examples:
POLITE
,WITTY
,INFORMATIONAL
,FUNNY
,FRIENDLY
, etc.
- Examples:
AutomationRecurInterval
DAILY_SPECIFIC_TIME_SLOTS
,WEEKLY_SPECIFIC_TIME_SLOTS
,EVERY_3_HOURS
,EVERY_6_HOURS
,BI_DAILY
,DAILY
,WEEKLY
,MONTHLY
,YEARLY
FacebookPostType
POST
,REELS
InstagramPostType
POST
,REELS
,STORIES
WordpressPostType
POST
,PAGE
(other types may be supported by your WP environment)
YoutubeVideoType
video
,short
YoutubePrivacyStatus
public
,private
,unlisted
TikTokPrivacyLevel
PUBLIC_TO_EVERYONE
GMBPostTopicType
STANDARD
,OFFER
,EVENT
GMBCTAButtonActionType
ACTION_TYPE_UNSPECIFIED
,BOOK
,ORDER
,SHOP
,LEARN_MORE
,SIGN_UP
,CALL
Error Handling
The Robopost Public API responds with standard HTTP status codes to indicate success or failure:
Status Code | Reason | Example Response |
---|---|---|
200 OK | Request succeeded; check the response body for details | (For successful operations) |
201 Created | Resource created (not typically used by these endpoints) | |
400 Bad Request | Missing or invalid fields in the request body | {"msg": "channel_ids is required ... unless the post is a draft."} |
401 Unauthorized or 403 Forbidden | Invalid or missing apikey |
{"detail": "Not authenticated"} |
409 Conflict | Account usage is frozen or plan limit exceeded | {"msg": "ACCOUNT_USAGE_FROZEN", "reason": "Your subscription has expired."} |
Typical error responses include a JSON body describing the cause. For instance, if you try to schedule a post with no channel_ids
(and is_draft=false
), you’ll receive a 400 error.
Example Workflow
- Upload Media (Optional)
POST /medias/upload?apikey=YOUR_API_KEY
withmultipart/form-data
to getstorage_object_id
.
- Create Scheduled Post
POST /scheduled_posts/?apikey=YOUR_API_KEY
with a JSON body that includes:channel_ids
(unless you’re making a draft)image_object_ids
orvideo_object_id
referencing any uploaded mediaschedule_at
in UTC- Any optional platform-specific settings (
FacebookSettings
,YouTubeSettings
, etc.)
- Receive Confirmation
- The API returns an array of newly created post objects in JSON format.
Notes
- Dates/Times: Provide all datetimes in ISO 8601 format in UTC (e.g.,
"2025-03-02T15:30:00Z"
). - Recurring Posts: If
is_recur=true
, you must specifyrecur_interval
and any relevant fields for daily or weekly specific time slots (recur_interval_time_slots
). - Draft vs. Scheduled: Use
is_draft=true
for a draft (no immediate scheduling) oris_draft=false
for an actual scheduled post. - Post Collections: Provide
post_collection_id
if you want to group your posts; otherwise leave it asnull
or omit it.
For additional usage examples, please refer to the Python Client documentation or contact support.
Robopost – all-in-one AI-driven social media management!
For more information, visit: robopost.app