Skip to main content

Social distribution

  • Sells as: the social-distribution product (a product-scoped API key). This capability has no separate product-face contract — its public product route reuses the capability contract below; see the Edge route table's Product face row.

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
  • Console: Manage the social-distribution product in the console →
  • Runbook: operational checklist for social-distributioninternal (Vagary Labs ops; not part of this public site): docs/runbooks/capability-operations.md#social-distribution
  • 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

Edge route table

The routes this capability actually serves on the public edge — live-synced from GET https://api.vagarylabs.com/product/v1/_meta/catalog (snapshot v1). The metric is the request-granularity billing counter; the scope is the key permission required.

Product face (customer-keyed)

MethodPathMetricScope
POST/product/v1/social/postssocial_postswrite

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. The Edge route table section is synced from the live edge catalog snapshot (v1) — re-sync with python3 scripts/sync-edge-catalog.py.