Publora provides a powerful REST API that enables seamless integration with your existing tools and workflows.
Whether you're building a custom application, automating your social media management, or integrating with no-code platforms, our API lets you schedule and manage content across multiple social networks programmatically.
https://api.publora.comAll API requests must include your API key in the request headers:
x-publora-key: your_api_key_hereYou can generate your API key in the Settings page of your dashboard.
To create a post, you'll need to follow these two steps:
First, retrieve the list of connected social media accounts. You'll need the platformId from each connection to create posts.
/api/v1/platform-connections{
"success": true,
"connections": [
{
"platformId": "twitter-123456", // Use this ID for creating posts
"username": "example",
"displayName": "Example User", // Only available for X, Bluesky, Mastodon
"profileImageUrl": "https://..."
}
]
} Use the platformId values from step 1 to specify which accounts should post your content. Include multiple platform IDs to create the same post across different platforms simultaneously.
/api/v1/create-post{
"content": "Your post content",
"scheduledTime": "2025-04-07T10:00:00Z", // ISO 8601 UTC format
"platforms": ["twitter-123456", "instagram-789012"] // platformIds from step 1
}
{
"success": true,
"postGroupId": "6507e563a1b2c3d4e5f6g789" // Use this ID to upload media or delete post
}
Use the postGroupId received from the create-post response to retrieve details about a post group including its status and platform-specific post information. This is useful for tracking the status of your posts and getting the platform-specific post IDs after publication.
/api/v1/get-post/:postGroupId{
"success": true,
"postGroupId": "6868a10bdafc11893c9cab32",
"posts": [
{
"_id": "6868a10bdafc11893c9cab35",
"content": "Your post content",
"platform": "linkedin",
"platformId": "pwdsv7ZwyL",
"status": "published",
"postedId": "urn:li:share:7347109644793757697" // Post ID from the target platform
}
// Additional platform posts will appear here
]
}
Note: postedId is only available for LinkedIn posts at the moment.
To upload media files (images or videos), you'll need to follow these two steps:
Request a pre-signed upload URL for your media file using the postGroupId from step 1. You can upload up to 4 images or 1 video per post. The pre-signed URL expires after 15 minutes.
/api/v1/get-upload-url{
"fileName": file.name, // Original file name
"contentType": file.type, // MIME type of the file
"type": "image", // Either "image" or "video"
"postGroupId": "post_group_id" // ID received from create-post response
}{
"success": true,
"uploadUrl": "https://...", // Presigned S3 URL for uploading (expires in 15 minutes)
"fileUrl": "https://...", // Final URL where file will be accessible
"mediaId": "67f6659c3df3ebdee" // Store this ID to reference the media in your posts
} Use the presigned URL to upload your file with a PUT request. Make sure to set the Content-Type header to match the MIME type from step 1, and set withCredentials to False when uploading to S3. You can also track upload progress using the onUploadProgress event.
const response = await fetch(uploadUrl, {
method: 'PUT',
body: fileContent,
headers: {
'Content-Type': contentType
},
withCredentials: false,
onUploadProgress: (progressEvent) => {
if (progressEvent.total) {
const progress = (progressEvent.loaded / progressEvent.total) * 100;
console.log(`Upload progress: ${progress}%`);
}
}
});
// The file will be available at the fileUrl from step 1
Use this endpoint to update a post's status or scheduled time. Use the postGroupId that was returned when you created the post. You can change a post's status between draft and scheduled, update its scheduled time, or both. At least one of these fields must be provided in the request.
/api/v1/update-post/:postGroupId{
"status": "draft",
"scheduledTime": "2025-04-07T10:00:00Z"
}{
"success": true,
"message": "Post updated successfully",
"postGroup": {
"_id": "6507e563a1b2c3d4e5f6g789",
"status": "scheduled",
"scheduledTime": "2025-04-07T10:00:00Z"
}
} To delete a scheduled post and all its associated platform-specific posts, use the postGroupId that was returned when you created the post.
/api/v1/delete-post/:postGroupId{
"success": true
}Retrieve analytics data for a LinkedIn post. This endpoint allows you to get various metrics such as impressions, reach, reactions, comments, and reshares for a specific LinkedIn post.
urn:li:share:7387028262125965312postedId field of a published LinkedIn postIMPRESSION: Number of times the post was shownMEMBERS_REACHED: Number of unique members who saw the postRESHARE: Number of times the post was resharedREACTION: Number of reactions (likes, etc.) on the postCOMMENT: Number of comments on the postlinkedin-Tz9W5i6ZYG or just Tz9W5i6ZYG/api/v1/linkedin-post-statistics{
"postedId": "urn:li:share:7387028262125965312",
"queryType": "COMMENT",
"platformId": "linkedin-Tz9W5i6ZYG"
}{
"success": true,
"count": 42
}postedId is only available after a post has been successfully publishedNeed help? Join our Discord community or email us at [email protected].