Public API v1

Quegly API Documentation

Build integrations, automate your social media workflow, or connect AI agents to schedule and publish content across Instagram, Facebook, YouTube, TikTok, X, Threads, LinkedIn, Bluesky, Pinterest, and Telegram.

Base URL

All API requests should be made to the following base URL:

Base URL
https://api.quegly.com/v1

Using Claude, Cursor or another AI tool? Connect it to the MCP server at https://api.quegly.com/mcp instead of writing HTTP calls: the same API, as tools.

Authentication

All API requests require an API key passed via the Authorization header. Generate an API key from Dashboard → Settings → API. Both bare and Bearer-prefixed forms are accepted.

Example request
curl https://api.quegly.com/v1/accounts \
  -H "Authorization: qgl_your_api_key"

# Bearer prefix is also accepted:
curl https://api.quegly.com/v1/accounts \
  -H "Authorization: Bearer qgl_your_api_key"

Keep your API key secret

Do not share your API key in publicly accessible code or repositories. Keys are SHA-256 hashed at rest, so a leaked key cannot be recovered. If you suspect a key has been exposed, revoke it from Settings → API and generate a fresh one.

API Key Scopes

Each API key has a scope that controls which workspaces it can act on. You choose the scope when generating the key.

ScopeBehavior
workspaceTied to one workspace at creation time. Every request acts on that workspace automatically. No extra header needed.
allAuthorizes any workspace you own. Each request must specify which workspace via the X-Workspace-Id header (or ?workspace_id= query param).
all-scope key targeting a specific workspace
curl https://api.quegly.com/v1/accounts \
  -H "Authorization: qgl_your_all_scope_key" \
  -H "X-Workspace-Id: workspace-uuid"

Don't know your workspace IDs? Call GET /v1/workspaces to list them, then use the id you want as X-Workspace-Id.

You can generate up to 10 keys per account, with multiple keys per scope. Useful for rotating keys without downtime, or scoping integrations (one key for Zapier, one for n8n, etc.).

Rate Limits

The API uses a token-bucket limiter. Each key has its own budget. Keys on the same account don't share counters. Limits scale with your plan:

PlanRequests / minute
Standard60
Team120
Pro120
Ultimate300

The older Creator and Agency plans keep their limits: 60 and 300 a minute.

You can target multiple platforms in a single Create Post request to stay well under the limit. Posting has no daily cap, except on X: each X account takes up to 5 posts a day, as the X API is metered. Posts can be scheduled up to 90 days in advance.

HeaderDescription
X-RateLimit-LimitMaximum requests per minute for your tier
X-RateLimit-RemainingTokens left in your bucket after this request
X-RateLimit-ResetSeconds until the bucket is fully refilled
Retry-AfterOnly on 429 responses. Seconds to wait before retrying.

Supported Platforms

Quegly supports posting to 10 social media platforms. Each platform has specific media requirements and optional settings. See the Platform Settings section for per-platform details.

Terminology

TermDescription
WorkspaceAn organizational unit that contains social accounts, posts, and media. The scope of an API key is either one workspace (workspace) or any of your workspaces (all).
AccountA connected social media account, which the dashboard calls a channel: one Instagram account, one Facebook Page, one YouTube channel, one Telegram chat. A workspace can hold several accounts of one platform, so posts name their accounts by id.
PostA scheduled or published piece of content. A single post can target multiple accounts/platforms simultaneously.
PlatformOne of the 10 supported social networks: instagram, facebook, youtube, tiktok, x, threads, linkedin, bluesky, pinterest, telegram.
MediaAn uploaded image or video file. Must be uploaded before being attached to a post.

Quick Start

Here's a complete example that uploads an image and schedules a post to Instagram and TikTok:

Step 1: Upload your media

Upload an image
curl -X POST https://api.quegly.com/v1/upload \
  -H "Authorization: qgl_your_api_key" \
  -F "file=@/path/to/image.jpg"

Step 2: Create a scheduled post

Schedule a post
curl -X POST https://api.quegly.com/v1/posts \
  -H "Authorization: qgl_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "schedule",
    "scheduled_at": "2026-06-01T14:00:00.000Z",
    "caption": "Check out this amazing room transformation!",
    "media_ids": ["media-id-from-step-1"],
    "account_ids": ["instagram-account-id", "tiktok-account-id"],
    "platform_settings": {
      "tiktok": {
        "privacy_level": "PUBLIC_TO_EVERYONE",
        "allow_comment": true,
        "allow_duet": true,
        "allow_stitch": true
      }
    }
  }'

Error Handling

The API uses standard HTTP status codes and returns errors as JSON. The code is stable and safe to pattern-match on; the message is human-readable and may evolve.

Error response
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "TikTok requires a privacy_level setting",
    "field": "platform_settings.tiktok.privacy_level"
  }
}
StatusCodeDescription
200n/aSuccess
201n/aCreated
400VALIDATION_ERRORBad request. Invalid parameters or missing required fields
400CHANNEL_PAUSEDAn account in account_ids is paused: its owner has more channels than their plan includes
401UNAUTHORIZEDInvalid or missing API key
403FORBIDDENSubscription inactive, or key lacks the requested scope
404NOT_FOUNDResource doesn't exist (or your key can't see it)
409VALIDATION_ERRORConflict. E.g. Idempotency-Key reused with a different workspace
429RATE_LIMIT_EXCEEDEDToo many requests. See Retry-After
500INTERNAL_ERRORBug on our side; safe to retry idempotent operations

Paused accounts. Each plan includes a number of channels (connected accounts). When an owner has more than their plan includes, after moving to a smaller plan for example, their newest accounts past that number are paused: creating or updating a post that goes to one returns 400 CHANNEL_PAUSED naming the account, and its scheduled posts fail when they come due. Disconnecting an account on the Manage page, or moving to a bigger plan, unpauses them at once.

Endpoints Overview

Workspaces
  • GET/v1/workspaces
Posts
  • POST/v1/posts
  • GET/v1/posts
  • GET/v1/posts/{id}
  • PUT/v1/posts/{id}
  • DELETE/v1/posts/{id}
  • POST/v1/posts/{id}/publish-now
Uploads
  • POST/v1/upload
  • POST/v1/upload-from-url
  • POST/v1/media/{id}/thumbnail
  • DELETE/v1/media/{id}/thumbnail
Accounts
  • GET/v1/accounts
Pinterest
  • GET/v1/pinterest/boards
  • POST/v1/pinterest/boards
Analytics
  • GET/v1/analytics
  • GET/v1/analytics/post/{id}
  • POST/v1/analytics/refresh