Base URL: /api/publish
Schedule a post to be published on one or multiple social media platforms.
{
"Id": "string",
"PipelineId": 123,
"DateTime": "2023-10-01T12:00:00Z",
"Posts": [
{
"Accounts": [
{
"Platform": "Twitter",
"AccountId": "account-123"
}
],
"Messages": ["Your post content here"],
"MediaId": ["media-id-1", "media-id-2"]
}
]
}
Id
Type: string
Used for editing existing posts. Do not provide when creating new posts.
PipelineId
Type: integer (optional)
The ID of a pre-configured publishing pipeline to use for this post. When not provided, the post can be either published immediately or published at specific date.
DateTime
Type: string (optional)
The scheduled date and time when the post should be published. Must be in ISO 8601 format with timezone information. If not provided, the post will be published immediately or according to the pipeline's schedule.
Posts *
Type: array of Post objects
Array of post configurations. Each post can target different accounts and contain different content. If the same post goes to multiple accounts, use only one post object but if you wish to customize the post for different platforms, use the different post objects one per platform
Accounts *
Type: array of Account objects
List of social media accounts where this post will be published.
Platform *
Type: string
Platform name (e.g., "Twitter", "LinkedIn", "Instagram"). Must match one of the supported platforms returned in the /accounts endpoint.
AccountId *
Type: string
UserName for the specific account on the platform, same as the one returned in /accounts.
Messages *
Type: array of strings
Array of message content strings. Multiple messages can be provided for platforms that support threads.
MediaId
Type: array of strings (default: empty array)
Array of media file IDs obtained from the media upload endpoints. Attach images, videos, or other media to your post.
{
"Success": true,
"Error": null,
"Id": "12345"
}
Success: Boolean indicating if the operation was successful
Error: Error message if operation failed, null otherwise
Id: Content ID of the scheduled post
Retrieve a list of available publishing pipelines.
No request body required.
{
"Success": true,
"Error": null,
"Pipelines": [
{
"Id": "pipeline-1",
"Name": "Marketing Pipeline"
}
]
}
Pipelines: Array of pipeline objects with Id and Name properties
Retrieve a list of connected social media accounts.
No request body required.
{
"Success": true,
"Error": null,
"Accounts": [
{
"Platform": "Twitter",
"AccountId": "account-123"
}
]
}
Accounts: Array of connected account objects with Platform and AccountId properties
Initialize a media upload session. Call this endpoint before uploading media chunks.
No request body required.
{
"Success": true,
"Error": null,
"Id": "file-abc123"
}
Id: File ID to use for subsequent upload and finalize operations
Upload a chunk of media data. For large files, split the file into chunks and call this endpoint multiple times.
Content-Type: multipart/form-data
chunkIndex: 0
fileId: file_abc123xyz
file: [binary data]
{
"chunkIndex": 0,
"fileId": "file-abc123",
"file": "base64-encoded-data"
}
chunkIndex *
Type: integer
Zero-based index of the current chunk. Start with 0 for the first chunk and increment for each subsequent chunk.
fileId *
Type: string
File ID obtained from the /media/init endpoint. This associates the chunk with the upload session.
file *
Type: string
Base64-encoded binary data of the file chunk.
{
"Success": true,
"Error": null
}
Complete the media upload process and provide metadata about the uploaded file.
{
"fileId": "file-abc123",
"metadata": {
"altText": "Description for accessibility",
"mimeType": "image/jpeg",
"fileName": "photo.jpg",
"size": 1048576,
"width": 1920,
"height": 1080,
"aspectRatio": 1.777,
"duration": 30.5,
"frameRate": 30.0,
"bitRate": 5000000.0
}
}
fileId *
Type: string
File ID from the initialization step.
metadata *
Type: MediaMetaData object
Comprehensive metadata about the uploaded media file.
altText *
Type: string
Alternative text description for accessibility. Describes the content of images or videos for screen readers.
mimeType *
Type: string
MIME type of the file (e.g., "image/jpeg", "video/mp4", "image/png").
fileName *
Type: string
Original filename of the uploaded media.
size *
Type: long (integer)
File size in bytes.
width
Type: integer (optional)
Width in pixels (for images and videos).
height
Type: integer (optional)
Height in pixels (for images and videos).
aspectRatio
Type: double (optional)
Aspect ratio calculated as width/height (e.g., 1.777 for 16:9).
duration
Type: double (optional)
Duration in seconds (for video and audio files).
frameRate
Type: double (optional)
Video frame rate in frames per second (e.g., 30.0, 60.0).
bitRate
Type: double (optional)
Bitrate in bits per second (for video and audio files).
{
"Success": true,
"Error": null
}
All endpoints return a consistent error response format:
{
"Success": false,
"Error": "Error message describing what went wrong"
}
Common HTTP Status Codes:
Initialize Upload
Call POST /media/init to get a file ID
Upload Chunks
Call POST /media/upload for each chunk of your file
Finalize Upload
Call POST /media/finalize with metadata
Schedule Post
Use the media ID from step 3 in POST /post to publish