API Basics

Data Formats

Id prefixes, timestamp format, open enums and null fields across the Onepostly API.

These rules hold for every endpoint and every webhook. Build your client on them, and it keeps working as the API grows.

Id Prefixes

Every id starts with a prefix that names its kind.

PrefixPoints toExample
acc_Accountacc_1699f4157fb643f49d2ac447491f32a8
pst_Postpst_3c8a2d6e91b44f7a8e250d6b4c1f9a73
grp_Posts of one create requestgrp_7d2e5b1a9c4f4a68b3e07f1c2d9a6e45
med_Mediamed_7f3a9c2e1b4d4e8f9a6b5c4d3e2f1a0b
whk_Webhook endpointwhk_e5c7a3f18b2d4e69a04c3f9d1b7e2c58
dlv_Webhook deliverydlv_9f3e6b2a4c1d4a8eb7f51d2c8e0a6b49
aut_Automationaut_4b8e2f6a1c9d4e37a5b02c8f6d1e9a33
cmt_CommentVaries in length
cnv_ConversationVaries in length
evt_Webhook eventevt_7c41e09a5b3d4f2e8a6c1b9d0e3f5a72
req_API requestreq_8f2a64c1d3b94e0f9a7c5e2b1d0f3a6c

An id with the wrong prefix fails fast.

Where you send itResponse
In the path404 NOT_FOUND, or ACCOUNT_NOT_FOUND on account paths
In the body or query400 VALIDATION_ERROR with the field in param

Opaque Ids

Treat ids as opaque strings. Do not parse them, build them or rely on their length. A 512-character string column fits every kind.

cmt_ and cnv_ ids belong to your workspace. They stay the same there, so you can store them. Another workspace gets other ids, and yours return 404 NOT_FOUND there. Get them from List Comments and the Inbox.

An evt_ id names one webhook event. Every retry of that event carries the same id, so use it to skip handled events. See Webhooks.

Platform Ids

Fields named platform..., such as platformPostId, hold the platform's own id. The platform sets its format, such as a number on X or an at:// URI on Bluesky. Some fields take both kinds. quotePostId takes a pst_ id or a platform post id. See Post References.

The platform field holds one of these.

platformPlatform
xX (Twitter)
instagramInstagram
facebookFacebook
threadsThreads
linkedinLinkedIn
youtubeYouTube
tiktokTikTok
pinterestPinterest
blueskyBluesky

Timestamps

Response timestamps are ISO 8601 in UTC with milliseconds, such as 2027-03-15T13:00:00.000Z. These fields differ.

FieldFormatExample
scheduledForLocal time in timezone, no zone. See Scheduling2027-03-15T09:00:00
timezoneIANA time zoneAmerica/New_York
Timeline dayUTC date2026-08-01
X-RateLimit-ResetUnix seconds1789473600
Retry-AfterSeconds to wait12

In requests, since and until need Z or an offset. See Time Filters.

Open Enums

Response fields can gain new values. Handle a value you do not know.

FieldKnown values
Post statusPost Status
platformPlatform Ids
mediaKindMedia Kinds
Error codeError Codes
Account statusAccount Status
Media statusMedia
Analytics statusAnalytics Status
Delivery statusDelivery Log
  • An unknown post status is not final. Read the post again later.
  • An unknown account status may need attention, like any status but active.
  • Handle an unknown error code by its HTTP status.
  • The SDKs accept any string here, so they read values added later.

Responses can gain fields, so ignore ones you do not know. Requests are strict, and an unknown field or value returns 400 VALIDATION_ERROR.

Null Fields

A field without a value is null, not left out. A few platform-only fields, such as xSubscriptionType, are left out on other platforms.

Fieldnull means
platformPostId, url, publishedAtNot published yet
scheduledFor, timezoneNot scheduled
errorDid not fail
metricsNo metrics yet
One metric, such as metrics.savesNot reported for this post
groupId, textMade outside Onepostly
nextCursorLast page

Lists are never null. No media is media: [], and no options is options: {}. These are left out instead of null.

  • Error envelope fields that do not apply, such as param.
  • Include extras you did not ask for, such as total.