API Documentation

Overview

This document provides a comprehensive guide to using the Scheduling API to create, manage, and retrieve information about scheduled posts for social media platforms.

Base URL:
https://api.scheduling-api.com/

Authentication

All API requests require authentication using an API key. You can include the API key as a query parameter named api_key.

Query Parameter Authentication

Append ?api_key=YOUR_API_KEY to the endpoint URL, replacing YOUR_API_KEY with your actual API key obtained from the API Key Dashboard.

Endpoints

2. Create post

This endpoint creates a new post for scheduling.

  • Endpoint: /posts/create

  • Method: POST

Description:

Creates a new post for scheduling.

Headers:

  • Content-Type: multipart/form-data

Parameters (Body - Form Data):

ParameterTypeRequiredDescription
filefileYesThe media file (image or video) to upload for the post. Ensure the file format is supported by the target social media platform. Refer to the API Key Dashboard for specific limitations on file size and supported formats.
scheduling_timedatetime (ISO 8601 UTC)YesThe scheduled publishing time in UTC format. Use ISO 8601 format (e.g., 2025-01-05T10:00).
titlestringNoTitle for the post (optional). If omitted, the caption will be used as the title where applicable (e.g., for YouTube).
captionstringYesThe caption text for the post.
selected_accountsarray of integerYesAn array of social account IDs (integers) to which the post should be published. Example: [34, 64, 54]. You can retrieve the valid account IDs from the API Key Dashboard or the List Social Accounts endpoint (/accounts). Sending an empty array [] will result in an error.

Responses:

  • Success (200 OK):

    {
    	"post_id": 12345
    }
  • Error (400 Bad Request):

    {
    	"error": "error message"
    }

Additional Notes:

  • Ensure the uploaded file format is supported by the target social media platform.
  • Refer to the API Key Dashboard for specific limitations on file size and supported formats.
  • If the time is before than current time, then post will be posted instantly.

2. List posts

This endpoint retrieves details of posts. You can optionally provide a specific post ID to retrieve information for that particular post.

  • Endpoint: /posts?id=<post id>

  • Method: Get

Description:

Lists posts and their information. If an ID is provided, details for that specific post will be returned.

Response:

  • Success (200 OK):

    [
      {
        "id": 12345,
        "title": "Sample Post Title",
        "caption": "Caption goes here",
        "type": "single or multiple", // Single image/video or multi-image/video carousel
        "status": "posted, failed, or scheduled",
        "created_at": "2025-01-04T12:00:00Z"
      },
      ...
    ]
  • Error (400 Bad Request):

    {
    	"error": "error message"
    }

3. Remove Post

This endpoint allows you to delete a post from the database.

  • Endpoint:
    GET /posts/remove?id=<post_id>

  • Method:
    POST

  • Description:
    Deletes a specific post from the database using the provided post_id.

  • Parameters:

    • id (integer, required): The unique identifier of the post to delete. Pass this as a query parameter.
  • Responses:

  • Success (200 OK):

  • Error (400 Bad Request):

    {
    	"error": "error message"
    }

4. List social accounts

This endpoint retrieves details of connected social accounts.

Endpoint: /accounts

Method: Get

Description:

Lists connected social media accounts and their information.

Response:

  • Success (200 OK):

    [
      {
        "id": 12345,
        "profile_picture": "url to social account profile picture",
        "account_name": "Example account",
        "platform": "tiktok, youtube or instagram"
      },
      ...
    ]
  • Error (400 Bad Request):

    {
    	"error": "error message"
    }