API Documentation

Quick Reference

Available Endpoints

Introduction

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.

Base URL

https://api.publora.com

Authentication

All API requests must include your API key in the request headers:

x-publora-key: your_api_key_here

You can generate your API key in the Settings page of your dashboard.

API Reference

Create a Post

To create a post, you'll need to follow these two steps:

Step 1: Get Connected Accounts

First, retrieve the list of connected social media accounts. You'll need the platformId from each connection to create posts.

GET/api/v1/platform-connections

Response

{
  "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://..."
    }
  ]
}

Step 2: Create the Post

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.

POST/api/v1/create-post

Request Body

{
  "content": "Your post content",
  "scheduledTime": "2025-04-07T10:00:00Z",  // ISO 8601 UTC format
  "platforms": ["twitter-123456", "instagram-789012"]  // platformIds from step 1
}

Response

{
  "success": true,
  "postGroupId": "6507e563a1b2c3d4e5f6g789"  // Use this ID to upload media or delete post
}

Upload Media

To upload media files (images or videos), you'll need to follow these two steps:

Step 1: Get Upload URL

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.

POST/api/v1/get-upload-url

Request Body

{
  "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
}

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
}

Step 2: Upload the File

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

Delete a Post

To delete a scheduled post and all its associated platform-specific posts, use the postGroupId that was returned when you created the post.

DELETE/api/v1/delete-post/:postId

Response

{
  "success": true
}

Support

Need help? Join our Discord community or email us at [email protected].