GET /accounts/{id}/posts

The account's most recent posts as they exist on the platform (published through Postgale or not), with postgalePostId when Postgale published them. Where supported (else 400 not_supported)

GET
/accounts/{id}/posts

Authorization

BearerAuth
headerAuthorizationBearer <token>

API key sk_...

Path Parameters

id*string

Account id

Query Parameters

limit?integer

Maximum items (default 25, max 100)

Range1 <= value <= 100
Default25

Response Body

{accountId, platform, posts}

application/json
  1. response
accountId?string
platform?string
posts?array<>
Example Request
curl -X GET 'https://example.com/api/v1/accounts/string/posts'
Example Response
{  "accountId": "string",  "platform": "string",  "posts": [    {      "platformPostId": "string",      "text": "string",      "url": "string",      "mediaType": "string",      "mediaUrl": "string",      "thumbnailUrl": "string",      "publishedAt": "string",      "metrics": {},      "postgalePostId": "string"    }  ]}

POST /accounts/{id}/webhook-subscription POST

Subscribe the account to Meta webhooks (Instagram: INSTAGRAM_WEBHOOK_FIELDS, default comments and the messaging fields; Facebook Page: FACEBOOK_WEBHOOK_FIELDS, default feed and the Messenger fields) so comment.received and message.* can be delivered. Messaging fields are left out when the account has not granted the messaging permission

GET /connect/{platform} GET

OAuth authorization URL for the account owner (valid 10 minutes, single use). Facebook: the owner picks Pages; the result may be a pending connection. WhatsApp: a Postgale page that runs Meta's Embedded Signup (several numbers → pending connection). Telegram has no OAuth: the answer is a one-time code (15 minutes) and instructions: a chat admin adds Postgale's bot as an admin with the right to post and sends /connect <code> in the channel or group (or forwards that channel post to the bot); the chat then appears in GET /accounts and account.connected is emitted. Discord: a server admin installs Postgale's bot (scope bot) and picks channels, one account per channel (platformAccountId = channel id); POST /connect/discord binds more channels of that server (without DISCORD_BOT_TOKEN the link creates a channel webhook instead, platformAccountId = webhook id). Mastodon needs instance (the server's domain; public DNS names only): Postgale registers itself on that server if needed and the link opens its authorization page (platformAccountId = <id>@<server>). Bluesky has no OAuth: POST {handle, appPassword} (a Bluesky app password, never the account password) connects the account right away and answers {platform, account}; a refused handle or password is a 400. Platforms that are not live on this instance answer 400