Developers

REST API reference

23 endpoints under https://api.ravenpo.st/v1. Every one delegates to the same service the dashboard calls, so there is exactly one implementation of “create a post” and no second set of rules. Authentication is a bearer token; no route takes a workspace id, because the token carries one.

Conventions

  • Send Authorization: Bearer rvp_… on every request, and Content-Type: application/json on anything with a body.
  • Ids are opaque strings. Timestamps are ISO 8601 in UTC; queue slots and send-time recommendations are in the workspace timezone, with weekday 0 = Sunday.
  • Rate limit: 120 requests/minute per IP unless an endpoint says otherwise.
  • * marks a required field.
curl https://api.ravenpo.st/v1/me -H "Authorization: Bearer rvp_…"

Workspace

GET/v1/me

The token’s workspace, its plan limits, current usage and account counts.

The cheapest call to verify a token works. No endpoint takes a workspace id — the token carries exactly one, so a token can never reach another tenant’s data whatever the caller sends. The month in `usage` starts on the day the plan renews (the 1st on Free); `renewsAt` is when it starts over. X is counted in credits — a post without a link is 1, one with a link about 13.3, each picture or video 1 more — and `xCreditsExtra` are credits bought on the website, spent once the month’s run out. `monthlyXPosts` and `xPostsThisMonth`, the names from before credits, still carry the same two numbers; read the credit names in new code.

Response
{
  "workspaceId": "wsp_...",
  "plan": { "id": "growth", "name": "Growth",
            "limits": { "socialAccounts": 15, "seats": 3, "monthlyPosts": -1,
                        "monthlyXCredits": 350, "aiCredits": 1000 } },
  "usage": { "accounts": 6, "postsThisMonth": 84, "xCreditsThisMonth": 57.33,
             "xCreditsCarried": 0, "xCreditsExtra": 200,
             "aiCreditsThisMonth": 212.4, "periodStart": "2026-11-13T09:21:00.000Z",
             "renewsAt": "2026-12-13T09:21:00.000Z" },
  "stats": { "accounts": 6, "scheduled": 12 }
}

Accounts

GET/v1/accounts

Connected social accounts — id, platform, username, status.

Access tokens are never returned by any endpoint.

Response
[
  { "id": "acc_...", "platform": "INSTAGRAM", "username": "ravenpost",
    "status": "ACTIVE", "connection": "FACEBOOK_LOGIN" }
]
GET/v1/accounts/:id/boards

The boards on a connected Pinterest account.

The only per-platform route here, and Pinterest earns it: every pin has to name a board, there is no default, and a board id appears nowhere else a caller can read it — not even in the board’s own URL, which uses a slug. Pass the ids to `pinterestBoards` on a post.

FieldInTypeDescription
id*pathstringA Pinterest account id from GET /v1/accounts.
Response
{
  "boards": [
    { "id": "1234567890", "name": "Product shots", "privacy": "PUBLIC" }
  ]
}

Posts

GET/v1/posts

List posts, newest first.

Without `page` this returns a plain array, matching the dashboard’s contract; with `page` it returns a paginated envelope. Automations should always pass `page` — a workspace with thousands of posts otherwise returns all of them in one response.

FieldInTypeDescription
statusqueryDRAFT | SCHEDULED | PUBLISHING | PUBLISHED | FAILEDFilter by status.
platformquerystringOnly posts targeting this platform.
typequerystringFilter by post format.
qquerystringCaption search.
sortquerystringSort order.
pagequerynumberPage number — switches the response to an envelope.
limitquerynumberPage size.
POST/v1/posts

Create a post and publish, schedule, queue or save it as a draft.

One post, many destinations: each account in `accountIds` becomes a target with its own status, permalink and error. Caption length is validated against the tightest selected platform.

FieldInTypeDescription
type*body'IMAGE' | 'CAROUSEL' | 'REEL' | 'STORY'Post format. Instagram's model, reused as the shared one — a platform that doesn't honour the format falls back to its own default rather than failing.
accountIds*bodystring[]Destination accounts, from GET /v1/accounts. One post fans out to all of them — at most one X account, since X forbids the same post on several accounts.
mediaIds*bodystring[]Media assets to attach. Pass [] for a text-only post where the platform allows it.
action*body'draft' | 'now' | 'schedule' | 'queue'What to do with it. 'schedule' needs scheduledAt; 'queue' resolves the next free slot in the workspace posting schedule and fails if none is configured.
captionbodystringBase caption, used by every platform without an override. The text X publishes may carry one $cashtag; a second is rejected, as X would.
captionOverridesbodyRecord<Platform, string>Per-platform caption. A platform with no entry publishes the base caption. Keys are platform ids from GET /v1/platforms.
scheduledAtbodystring (ISO 8601)When to publish, for action: 'schedule'.
threadPartsbodystring[]Follow-up posts published in order after the head, on platforms that declare a thread model (X, Bluesky, Mastodon, Threads, Telegram, Discord). Over the platform limit is rejected, never truncated.
firstCommentbodystringPosted as a comment under the Instagram post right after it publishes, typically for hashtags. Instagram only, and never on a story. A comment Instagram refuses does not fail the post. On update, null clears it.
replyToTweetIdbodystringPublish the head post as a reply under this tweet. Accepts an id or a tweet URL. X only — and X only takes a reply from an app to the account's own post, or to a post that @mentions it or quotes one of its posts.
quoteTweetIdbodystringEmbed this tweet as a quote card. Id or URL. X only, independent of replyToTweetId — and X only takes a quote of the account's own post, or of one that @mentions it.
tiktokOptionsbodyRecord<accountId, object>TikTok privacy level, interaction switches and commercial disclosure, keyed by account id. Omitted, a TikTok target publishes SELF_ONLY — TikTok requires the creator to choose, so we never pick a wider audience for them.
audiobodyobjectReel audio ({ audioId, audioVolume, videoVolume }). Instagram reels only, and only on an account connected through Facebook.
reelCoverbodyobjectAn Instagram reel's cover: { mediaId } — a JPEG of up to 8 MB from the media library — or { offsetMs }, a frame of the video in milliseconds, before it ends. One or the other. Instagram reels only, on either connection; dropped for any other format. On update, null goes back to Instagram's default, the first frame.
trialReelbody'MANUAL' | 'SS_PERFORMANCE'Publish an Instagram reel as a trial: shown to non-followers first, and to followers once it graduates — by hand in the Instagram app (MANUAL) or by Instagram when it performs well (SS_PERFORMANCE). Instagram decides which accounts may post one; a refused trial fails rather than going out as a normal reel. On update, "" or null makes it a normal reel.
pinterestBoardsbodyRecord<accountId, string>Which board each Pinterest account pins to, keyed by account id (see GET /v1/accounts/:id/boards). Required to publish: a pin belongs to a board and Pinterest has no default, so a Pinterest target without one fails at publish time. A draft saves fine without it.
pinterestOptionsbodyobjectPinterest pin title ({ title }), max 100 characters. Separate from the caption, which becomes the 800-character description; unset, the caption’s first line is used.
linkUrlbodystring (http/https)The URL this post points at. Facebook publishes it as a link preview card; Pinterest makes it the pin’s destination. Every other platform ignores it.
recurrencebodyobjectMakes this an evergreen post: each occurrence is created after the previous one publishes. Not with an X account, whose rules forbid repeating a post.
Request
{
  "type": "IMAGE",
  "caption": "Shipping today.",
  "captionOverrides": { "TWITTER": "Shipping today 🚀" },
  "mediaIds": ["med_..."],
  "accountIds": ["acc_...", "acc_..."],
  "action": "schedule",
  "scheduledAt": "2026-08-04T09:00:00.000Z"
}
POST/v1/posts/bulk10/min

Create many posts from a CSV.

Returns a per-line report so a caller can retry only the rows that failed, rather than guessing which half of the batch landed.

FieldInTypeDescription
csv*bodystringThe CSV document itself, as a string.
GET/v1/posts/:id

One post with every target’s status, permalink and error.

FieldInTypeDescription
id*pathstringPost id.
PATCH/v1/posts/:id

Edit a draft or scheduled post.

Editing resets the post to draft — pass `action` in the same call to re-schedule or publish it. A published post cannot be edited.

FieldInTypeDescription
id*pathstringPost id.
typebody'IMAGE' | 'CAROUSEL' | 'REEL' | 'STORY'Post format. Instagram's model, reused as the shared one — a platform that doesn't honour the format falls back to its own default rather than failing.
accountIdsbodystring[]Destination accounts, from GET /v1/accounts. One post fans out to all of them — at most one X account, since X forbids the same post on several accounts.
mediaIdsbodystring[]Media assets to attach. Pass [] for a text-only post where the platform allows it.
actionbody'draft' | 'now' | 'schedule' | 'queue'What to do with it. 'schedule' needs scheduledAt; 'queue' resolves the next free slot in the workspace posting schedule and fails if none is configured.
captionbodystringBase caption, used by every platform without an override. The text X publishes may carry one $cashtag; a second is rejected, as X would.
captionOverridesbodyRecord<Platform, string>Per-platform caption. A platform with no entry publishes the base caption. Keys are platform ids from GET /v1/platforms.
scheduledAtbodystring (ISO 8601)When to publish, for action: 'schedule'.
threadPartsbodystring[]Follow-up posts published in order after the head, on platforms that declare a thread model (X, Bluesky, Mastodon, Threads, Telegram, Discord). Over the platform limit is rejected, never truncated.
firstCommentbodystringPosted as a comment under the Instagram post right after it publishes, typically for hashtags. Instagram only, and never on a story. A comment Instagram refuses does not fail the post. On update, null clears it.
replyToTweetIdbodystringPublish the head post as a reply under this tweet. Accepts an id or a tweet URL. X only — and X only takes a reply from an app to the account's own post, or to a post that @mentions it or quotes one of its posts.
quoteTweetIdbodystringEmbed this tweet as a quote card. Id or URL. X only, independent of replyToTweetId — and X only takes a quote of the account's own post, or of one that @mentions it.
tiktokOptionsbodyRecord<accountId, object>TikTok privacy level, interaction switches and commercial disclosure, keyed by account id. Omitted, a TikTok target publishes SELF_ONLY — TikTok requires the creator to choose, so we never pick a wider audience for them.
audiobodyobjectReel audio ({ audioId, audioVolume, videoVolume }). Instagram reels only, and only on an account connected through Facebook.
reelCoverbodyobjectAn Instagram reel's cover: { mediaId } — a JPEG of up to 8 MB from the media library — or { offsetMs }, a frame of the video in milliseconds, before it ends. One or the other. Instagram reels only, on either connection; dropped for any other format. On update, null goes back to Instagram's default, the first frame.
trialReelbody'MANUAL' | 'SS_PERFORMANCE'Publish an Instagram reel as a trial: shown to non-followers first, and to followers once it graduates — by hand in the Instagram app (MANUAL) or by Instagram when it performs well (SS_PERFORMANCE). Instagram decides which accounts may post one; a refused trial fails rather than going out as a normal reel. On update, "" or null makes it a normal reel.
pinterestBoardsbodyRecord<accountId, string>Which board each Pinterest account pins to, keyed by account id (see GET /v1/accounts/:id/boards). Required to publish: a pin belongs to a board and Pinterest has no default, so a Pinterest target without one fails at publish time. A draft saves fine without it.
pinterestOptionsbodyobjectPinterest pin title ({ title }), max 100 characters. Separate from the caption, which becomes the 800-character description; unset, the caption’s first line is used.
linkUrlbodystring (http/https)The URL this post points at. Facebook publishes it as a link preview card; Pinterest makes it the pin’s destination. Every other platform ignores it.
recurrencebodyobjectMakes this an evergreen post: each occurrence is created after the previous one publishes. Not with an X account, whose rules forbid repeating a post.
DELETE/v1/posts/:id

Delete the Ravenpost copy and cancel any pending publish.

This does not take down anything already published. Removing the post on the platform is a separate, opt-in action in the dashboard, and it is not available on Instagram, Threads and TikTok, which expose no delete endpoint, or on YouTube, whose delete endpoint needs a broader permission than Ravenpost holds.

FieldInTypeDescription
id*pathstringPost id.
POST/v1/posts/:id/schedule

Move a post to a new time.

FieldInTypeDescription
id*pathstringPost id.
scheduledAt*bodystring (ISO 8601)New publish time.
POST/v1/posts/:id/publish

Publish a post immediately, whatever it was scheduled for.

FieldInTypeDescription
id*pathstringPost id.
POST/v1/posts/:id/retry

Re-enqueue only the failed targets.

Targets that already published are left alone, so a retry can’t double-post.

FieldInTypeDescription
id*pathstringPost id.

Media

GET/v1/media

The workspace media library.

FieldInTypeDescription
folderIdquerystringLimit to one folder.
POST/v1/media/uploads60/min

Step 1 of an upload: get a presigned PUT URL.

The client sends the bytes straight to object storage, so a large video never travels through the API — and never has to be base64-encoded into a request.

FieldInTypeDescription
filename*bodystringOriginal filename, used for a readable storage key.
contentType*bodystringMIME type of the bytes you are about to PUT: an image (JPEG, PNG, WebP, GIF, HEIC, AVIF) or a video (MP4, MOV, WebM). Anything else is refused.
Response
{ "uploadUrl": "https://...", "storageKey": "...", "url": "https://cdn..." }
POST/v1/media

Step 2 of an upload: register the uploaded object as an asset.

Returns the asset `id` to put in `mediaIds`.

FieldInTypeDescription
type*body'IMAGE' | 'VIDEO'Asset kind.
storageKey*bodystringFrom the presign response.
url*bodystringPublic URL, from the presign response.
mimeTypebodystringRecorded for the per-platform compatibility check.
widthbodynumberPixels.
heightbodynumberPixels.
durationSecbodynumberVideo length.
sizeBytesbodynumberFile size, checked against each platform’s cap.
POST/v1/media/:id/variants30/min

Reshape one image into several platform canvases in a single call.

Cropping is saliency-based by default — an off-centre subject survives a 4:5 → 9:16 cut, where a centre crop would keep the wall behind them. Pass `crop: "centre"` for posters, screenshots and flat graphics composed around their middle. Two formats with the same dimensions produce one file, not two, and each variant inherits the source’s alt text and folder. Images only.

FieldInTypeDescription
id*pathstringSource image asset id.
formats*body('feed_portrait' | 'feed_square' | 'landscape' | 'story')[]Canvases to produce: 1080×1350 (4:5), 1080×1080 (1:1), 1080×566 (1.91:1), 1080×1920 (9:16 — also reels and TikTok photos).
fitbody'cover' | 'contain''cover' crops to fill (default); 'contain' pads so nothing is cut off.
cropbody'smart' | 'centre''smart' is saliency-based and the default; 'centre' is the predictable middle crop.
Request
{
  "formats": ["feed_portrait", "story", "landscape"],
  "crop": "smart"
}
Response
{
  "sourceId": "med_b2",
  "variants": [
    { "id": "med_c1", "url": "https://cdn...", "format": "feed_portrait", "width": 1080, "height": 1350 },
    { "id": "med_c2", "url": "https://cdn...", "format": "story", "width": 1080, "height": 1920 }
  ]
}

Analytics

GET/v1/analytics

Followers per account, a 30-day daily series, and engagement on recent posts.

A `followers` of `null` means we hold none for the platform — LinkedIn, Threads and Discord expose no insights, TikTok’s need a scope that is not approved yet, and X’s are not read because X charges for every API read. Null means unknown, never zero; an absent post metric was not collected rather than being 0.

GET/v1/best-times

Recommended posting hours, measured from this workspace’s own posts.

Overall and per platform, in the workspace timezone. `score` is a multiple of a typical post for that account, so 1.8 means “roughly 80% better than normal”. When `insufficient` is true `slots` is empty — that is “unknown”, not “no good time”. `reason` says which wall it hit: `few_posts` / `few_samples` (more publishing fixes it — `observations` vs `minObservations` says how far off), `low_engagement` (posts earn too few interactions for any hour to stand out), `not_collected` (the platform reports no per-post engagement at all).

Response
{
  "overall": {
    "timezone": "Europe/Istanbul",
    "observations": 46,
    "insufficient": false,
    "minObservations": 12,
    "reason": "ok",
    "slots": [
      { "weekday": 2, "minutes": 1140, "score": 1.84, "samples": 5 }
    ],
    "grid": [[null, null, 0.9, "..."]]
  },
  "byPlatform": [{ "platform": "INSTAGRAM", "report": { "...": "..." } }]
}

Email

POST/v1/emails600/min

Send one transactional email — a template turned on in Email → Transactional, to one address, filled with your values.

Queued, not sent in the request: the answer (202) is the email with `status: "QUEUED"`, and `GET /v1/emails/:id` says what became of it. A template turned off in Email → Transactional is answered 409 `template_disabled` and nothing is sent — the request is kept as a skipped email, so keep calling: once it is turned on again, the same request sends. Every tag the template writes without a fallback has to be in `data`, or the request is refused (400, `missing_data`) — a hole in a sentence is never sent. An `info` template carries an unsubscribe link and is not sent to anybody who unsubscribed from the workspace’s emails; a `transactional` one (receipts, resets) has none and is; neither goes to an address that bounced or marked the workspace’s mail as spam. Pass an `idempotencyKey` and a retried request gets the first one’s email back (`duplicate: true`) instead of a second email. Needs Email with transactional emails on the workspace’s plan; through Ravenpost’s own sending it counts against the month’s emails (429 `email_month_spent` when they are used up).

FieldInTypeDescription
template*bodystringThe template’s key, e.g. `welcome`.
to*bodystringOne email address.
databodyobjectThe values its tags take: text, numbers or true/false, up to 50 keys. `email`, `sender_name` and `unsubscribe_url` are filled by Ravenpost.
idempotencyKeybodystringUp to 200 characters. A second request with the same key in this workspace sends nothing and answers the first email.
Request
{
  "template": "welcome",
  "to": "ada@example.com",
  "data": { "first_name": "Ada" },
  "idempotencyKey": "welcome-user-123"
}
Response
{
  "id": "em_k3",
  "templateId": "tpl_w1",
  "template": "welcome",
  "kind": "info",
  "to": "ada@example.com",
  "status": "QUEUED",
  "source": "api",
  "error": null,
  "createdAt": "2026-11-02T12:00:00.000Z",
  "duplicate": false
}
GET/v1/emails/:id

What became of one transactional email: queued, sent, delivered, opened, clicked, bounced — or why it did not go.

`status` is QUEUED, SENDING, SENT, DELIVERED, BOUNCED, COMPLAINED, FAILED or SKIPPED; `error` says why one failed or was skipped (the address unsubscribed, bounced before, a domain that takes no mail). Opens and clicks are timestamps beside the status. Kept for 90 days.

FieldInTypeDescription
id*pathstringThe id `POST /v1/emails` answered.
Response
{
  "id": "em_k3",
  "template": "welcome",
  "to": "ada@example.com",
  "status": "DELIVERED",
  "sentAt": "2026-11-02T12:00:02.000Z",
  "deliveredAt": "2026-11-02T12:00:04.000Z",
  "openedAt": null,
  "error": null
}
GET/v1/email-templates

The transactional templates that are turned on, each with the values it takes and the ones it cannot go out without.

`requiredData` lists the keys `data` must carry; every other tag has a fallback written in the template.

Response
{
  "templates": [
    {
      "key": "trial-started",
      "name": "Trial started",
      "kind": "transactional",
      "tags": [{ "key": "plan_name", "fallback": null, "required": true }],
      "requiredData": ["plan_name", "trial_end"]
    }
  ]
}

Reference

GET/v1/queue-slots

The weekly posting schedule that `action: "queue"` publishes into.

Workspace-wide and shared by every connected account, in the workspace timezone. weekday 0 = Sunday.

GET/v1/platforms

Per-platform caption budgets, media rules, formats, thread caps and recommended specs.

Read this instead of hardcoding limits: they change when a platform changes, and this endpoint is generated from the same registry the publisher enforces.

OpenAPI

The same surface as a machine-readable document, generated from the source this page renders: /docs/openapi.json. Request bodies are documented by example rather than a strict schema — the examples are real, and a schema we hadn’t verified field by field would be a more confident kind of wrong.