Developers
Post from
your own code.
A REST API for scheduling and tracking videos on your own connected accounts. The same queue and rules as the Schedule page.
Start
Make a key in Settings > API, connect your accounts on the Accounts page, then list them. The API needs the PaidPost access subscription, as cross-posting does; without it every call answers 402.
export PAIDPOST_KEY=sk_live_...
curl https://paidpost.ai/api/v1/accounts -H "Authorization: Bearer $PAIDPOST_KEY"{
"object": "list",
"data": [
{ "id": "pac_...", "object": "account", "platform": "instagram", "handle": "hannovae",
"status": "connected", "timezone": "Europe/London", "slots": ["09:00", "13:00", "17:00", "21:00"],
"next_slot_at": "2026-12-05T09:00:00.000Z", "scheduled_count": 4, "posts_last_24h": 6, "daily_limit": 50 }
],
"has_more": false,
"next_cursor": null
}Keys and scopes
Send the key as Authorization: Bearer sk_live_.... A key belongs to one brand, is shown once, and only a hash of it is kept. Revoke it in Settings and calls with it stop at once.
read lists accounts, posts, results and webhooks. publish schedules, changes and cancels posts and manages webhooks. A key can have one or both.
Errors, limits and retries
Every error has one shape. The code stays the same; the message is plain words you can show.
HTTP/1.1 409 Conflict
{ "error": { "code": "gap",
"message": "hannovae already has a post at 2026-12-05 18:00 UTC. Posts on one account must be 30 minutes apart.",
"problems": [{ "code": "gap", "account_id": "pac_...", "message": "..." }] } }| Status | Code | When |
|---|---|---|
| 400 | invalid_request | A field is missing or wrong |
| 401 | unauthorized, invalid_key, key_revoked | No key, an unknown key, a revoked key |
| 402 | payment_required | No access subscription |
| 403 | insufficient_scope | The key lacks read or publish |
| 404 | not_found | Not yours, or not there |
| 409 | gap, repost, conflict | A rule said no, or the post is already going out |
| 422 | idempotency_key_reused, media_fetch_failed | A reused key with a new body; a video link that failed |
| 429 | rate_limited | Over 600 requests a minute for this key; wait Retry-After seconds |
Rate limit. 600 requests a minute per key. Every answer carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset.
Safe retries. Send Idempotency-Key on any POST. A repeat with the same key and body gets the first answer back, with Idempotent-Replayed: true, for 24 hours. The same key with a different body is refused.
Pages. Lists return has_more and next_cursor. Pass it back as ?cursor=; limit is 1 to 100.
Endpoints
All under https://paidpost.ai/api/v1. JSON in and out. The full description is at /api/v1/openapi.json.
| Method | Path | Scope | What it does |
|---|---|---|---|
| GET | /accounts | read | Your connected accounts |
| GET | /accounts/{id} | read | One account |
| PATCH | /accounts/{id} | publish | Change its posting slots or time zone |
| GET | /queue/slots | read | Each account's slots and next free times |
| POST | /media | publish | Add a video by link or upload |
| GET | /media/{id} | read | One video |
| POST | /posts | publish | Schedule a video on one or more accounts |
| GET | /posts | read | List posts, newest first |
| GET | /posts/{id} | read | One post: status, platform id, link, error |
| PATCH | /posts/{id} | publish | Reschedule or edit before it goes out |
| DELETE | /posts/{id} | publish | Cancel if not sent |
| POST | /posts/{id}/retry | publish | Put a failed post back in the queue |
| GET | /posts/{id}/metrics | read | Views and what the platform reports |
| GET | /webhooks | read | Your webhook endpoints |
| POST | /webhooks | publish | Register an endpoint (the secret is shown once) |
| PATCH | /webhooks/{id} | publish | Change the address, events or turn it off |
| DELETE | /webhooks/{id} | publish | Delete an endpoint |
| POST | /webhooks/{id}/rotate-secret | publish | A new signing secret |
| POST | /webhooks/{id}/test | publish | Send one signed test event now |
| GET | /webhooks/{id}/deliveries | read | The delivery log |
Posting
One post is made for each account. The caption is sent exactly as written. Send one of schedule_at, queue or now; with none, the post takes the account's next free slot.
curl https://paidpost.ai/api/v1/media -H "Authorization: Bearer $PAIDPOST_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://files.example.com/rouge-zip.mp4"}'
# or upload it
curl https://paidpost.ai/api/v1/media -H "Authorization: Bearer $PAIDPOST_KEY" -F file=@rouge-zip.mp4curl https://paidpost.ai/api/v1/posts -H "Authorization: Bearer $PAIDPOST_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"account_ids": ["pac_..."],
"media_id": "pmd_...",
"caption": "Drops 21 November, 10 PM UK.",
"schedule_at": "2026-12-05T18:00:00Z",
"instagram": { "trial": true, "trial_graduation": "SS_PERFORMANCE", "cover_offset_ms": 1500 },
"first_comment": "Sizes in the link in bio"
}'-d '{ "account_ids": ["pac_tiktok"], "media_id": "pmd_...", "queue": true,
"tiktok": { "privacy": "PUBLIC_TO_EVERYONE", "allow_comment": true } }'
-d '{ "account_ids": ["pac_youtube"], "media_id": "pmd_...", "now": true,
"youtube": { "title": "The Rouge jacket", "privacy": "public" } }'curl "https://paidpost.ai/api/v1/posts?status=published&from=2026-12-01T00:00:00Z&limit=50" -H "Authorization: Bearer $PAIDPOST_KEY"
curl -X PATCH https://paidpost.ai/api/v1/posts/ppo_... -H "Authorization: Bearer $PAIDPOST_KEY" \
-H "Content-Type: application/json" -d '{"schedule_at": "2026-12-06T09:00:00Z"}'
curl -X DELETE https://paidpost.ai/api/v1/posts/ppo_... -H "Authorization: Bearer $PAIDPOST_KEY"The rules hold here too. Never two posts on one account within 30 minutes (gap). The same file on two accounts within 24 hours is refused (repost) unless you send "allow_repost": true; platforms flag reposts. Each platform's daily limit is kept: a post over it waits, and waiting_reason says why.
Statuses. scheduled, publishing, published, failed, cancelled. A failed post carries error.code and error.message; POST /posts/{id}/retry puts it back.
Results. GET /posts/{id}/metrics reads the platform with the account's own sign-in and keeps the answer for 15 minutes. When the platform does not answer, available is false with the reason. Nothing is estimated.
Webhooks
Register an https address. We POST post.sent, post.failed and account.disconnected within about 5 minutes of the change. Any 2xx answer counts. Otherwise we try again after 1, 5 and 30 minutes, then 2, 6, 12 and 24 hours: 8 tries. Every try is in GET /webhooks/{id}/deliveries.
curl https://paidpost.ai/api/v1/webhooks -H "Authorization: Bearer $PAIDPOST_KEY" -H "Content-Type: application/json" \
-d '{"url": "https://example.com/paidpost-events", "events": ["post.sent", "post.failed"]}'
# the answer has "secret": "whsec_..." oncePOST /paidpost-events
PaidPost-Event: post.sent
PaidPost-Delivery: dlv_...
PaidPost-Signature: t=1764957600,v1=5f2b...
{ "id": "evt_...", "object": "event", "type": "post.sent", "created_at": "...",
"data": { "id": "ppo_...", "object": "post", "status": "published", "url": "https://www.instagram.com/reel/...", ... } }Check the signature before you trust the body: an HMAC-SHA256 of <t>.<raw body> with your secret, and a time within 5 minutes. An event can arrive twice; use its id to skip repeats.
import { createHmac, timingSafeEqual } from "node:crypto";
function verify(secret, header, rawBody) {
const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
if (Math.abs(Date.now() / 1000 - Number(parts.t)) > 300) return false;
const want = createHmac("sha256", secret).update(`${parts.t}.${rawBody}`).digest("hex");
return want.length === parts.v1.length && timingSafeEqual(Buffer.from(want), Buffer.from(parts.v1));
}Moving from Buffer
Each Buffer GraphQL call has one call here. Connect the same accounts on the Accounts page, swap the key, and keep your own post ids if you need them: ours start with ppo_.
| Buffer | Here | Notes |
|---|---|---|
query channels | GET /accounts | id, platform, handle, time zone, posting slots, status (needs_reconnect is Buffer's isDisconnected). |
query channel | GET /accounts/{id} | One account. |
channel.postingSchedule | GET /queue/slots | The slots and the next free times. Change them with PATCH /accounts/{id}. |
mutation createPost, mode addToQueue | POST /posts | "queue": true (or no time at all). channelId becomes account_ids, text becomes caption. |
mutation createPost, mode customScheduled + dueAt | POST /posts | "schedule_at": "2026-12-05T18:00:00Z" |
shareNow / publishPostNow | POST /posts | "now": true. For a post already queued: PATCH /posts/{id} with "now": true. It goes out on the next publisher run, within 5 minutes. |
assets.videos[].url | POST /posts | video_url, or POST /media first and send media_id (better when one file goes to several posts). |
video thumbnail offset | POST /posts | instagram.cover_offset_ms, in milliseconds. |
metadata.instagram.type reel / trial reel | POST /posts | Every Instagram post is a reel. "instagram": {"trial": true, "trial_graduation": "MANUAL"} for a trial reel (trialReelGraduationStrategy). |
metadata.instagram.shouldShareToFeed | Always on | Reels are shared to the feed. |
metadata.instagram.firstComment | POST /posts | first_comment, Instagram only. Its outcome is on the post: first_comment.status. |
query posts, filter status + channelIds | GET /posts | ?status=scheduled or ?status=sent (Buffer's words work; ours is published), &account_id=..., &from=&to=. first / after become limit / cursor. |
query post | GET /posts/{id} | status, published_at (Buffer's sentAt), url (externalLink), error.message. |
mutation editPost, movePostInQueue | PATCH /posts/{id} | caption, schedule_at, the per-platform blocks. Only before the post starts going out. |
mutation deletePost | DELETE /posts/{id} | Cancels a post that has not gone out. A sent post stays on the platform. |
post.metrics | GET /posts/{id}/metrics | Views, likes, comments, shares, saves, reach and watch time where the platform gives them. |
Polling for sent posts | Webhooks | post.sent, post.failed and account.disconnected come to you. |
Differences to know. Posting slots are per account, in the account's time zone. Posts are videos only (reels, TikTok and YouTube videos, Facebook Page reels). A post goes out on the publisher's 5 minute run, not the second you ask.