Skip to main content

Social distribution

Sellable product

This capability is granted by an API key scoped to the `` product (product face). See the product reference below.

11-network social syndication engine (X · LinkedIn · Facebook · Mastodon · Bluesky · Threads · Reddit · Instagram · Telegram · Pinterest · WhatsApp) with a per-org ENCRYPTED OAuth/credential store (AES-256-GCM at rest — the DB never holds a plaintext secret) and an idempotent, multi-worker-safe outbound queue with a dead-letter queue. Products bind over this contract so each doesn't re-roll the adapters, token store, and durable queue. Platform secrets + the vault key are resolved server-side (Infisical), never in body/DB/logs.

  • Group: Comms & workflow
  • Contract: contracts/social-distribution/v1/openapi.yaml
  • Public base: https://api.vagarylabs.com (the consolidated API gateway — one host, per-brand sibling api.<zone>)
  • Auth: a product API key (vgk_…) issued from the console — Authorization: Bearer vgk_…
  • Product face (customer-keyed):
    • https://api.vagarylabs.com/product/v1/social/posts

Endpoints

MethodPathSummary
POST/v1/connectionsStore an encrypted per-(platform, account) credential for the caller's org
GET/v1/connectionsList connection metadata (NEVER the secret) for the caller's org
DELETE/v1/connections/&#123;platform&#125;/&#123;account_id&#125;Delete a stored connection
POST/v1/postsIdempotently enqueue an outbound post (optionally scheduled for a future time)
GET/v1/postsList the caller's queued/scheduled/retrying posts (the read side of the scheduling surface)
DELETE/v1/posts/&#123;entry_id&#125;Cancel a queued/scheduled post before it fires
POST/v1/posts/runWorker tick — claim a batch and publish (first-party/ops trigger)
GET/v1/posts/statsPer-org queue / history / dead-letter counts
GET/v1/platformsThe registered network set + per-platform dark/circuit state
GET/healthliveness
GET/metricsPrometheus

Schemas

ConnectRequest

FieldTypeDescription
organization_idstringproduct-tier end-customer tenant (I6); anti-spoof-verified against the token
platformstring
account_idstringallow multiple accounts per platform per org
credentialsobjectPer-network secret fields (bearer/access token, app secret, bot token, …) encrypted at rest with AES-256-GCM. MAY instead be an Infisical reference {"$ref":"infisical://<path>"} (a pointer, not a secret). The plaintext form is NEVER stored and NEVER returned.

ConnectResult

FieldTypeDescription
successboolean
platformstring
account_idstring

PostRequest

FieldTypeDescription
organization_idstringproduct-tier end-customer tenant (I6)
platformstring
article_idstringsource id — the (org
account_idstring
headlinestring
urlstring
bodystring
vertical_slugstring
image_urlstring
hashtagsarray
recipientstringWhatsApp/Telegram targeted-send override
scheduled_atstring
extraobjectper-network options (subreddit

PostAccepted

FieldTypeDescription
entry_idstring
statusstringqueued (immediate) or scheduled (a future scheduled_at)
platformstring
scheduled_at['string', 'null']the honoured schedule (null for immediate)

PostListItem

One queue row as honest current queue-state (never a credential/payload).

FieldTypeDescription
idstringentry_id — pass to DELETE /v1/posts/{entry_id} to cancel
article_idstring
platformstring
account_idstring
statusstring
retry_countinteger
scheduled_at['string', 'null']next-eligible time (may be an internal lease/retry marker — see the path description)
claimed_at['string', 'null']
last_error['string', 'null']
created_atstring

PostList

FieldTypeDescription
postsarray

CancelResult

FieldTypeDescription
successboolean
cancelledboolean
entry_idstring

Error

FieldTypeDescription
errorstring

Generated by scripts/gen-capability-docs.py from contracts/social-distribution/v1/openapi.yaml — the contract IS the source of truth; edit the contract, not this page.