How it works

From platform API key to published network legs in five steps.

Authenticate with a platform API key, create a profile per customer, start hosted connect, publish with an Idempotency-Key, then poll or receive webhooks for per-network results on Facebook, Instagram, LinkedIn, Bluesky, and Mastodon.

In short

Authenticate with a platform API key, create a profile per customer, start hosted connect, publish with an Idempotency-Key, then poll or receive webhooks for per-network results on Facebook, Instagram, LinkedIn, Bluesky, and Mastodon.

  1. 01

    Authenticate as a platform

    Call the API with Authorization: Bearer <platform_api_key>. Keys belong on your servers only.

  2. 02

    Create a profile per customer

    POST a profile for each end customer or brand. Use X-Profile-Id on subsequent customer-scoped requests.

  3. 03

    Start hosted connect

    Create a connect session and redirect the user to connectUrl. They authorize networks and return to your success or cancel URL.

  4. 04

    Publish with idempotency

    POST /api/v1/posts with text, platforms, and Idempotency-Key. The API accepts the job and processes legs asynchronously.

  5. 05

    Observe results

    Poll the post resource or receive signed webhooks. Each network leg reports its own outcome so you can retry failures precisely.

Example sequence · https://api.socialrelay.dev/api/v1
POST /api/v1/profiles
Authorization: Bearer sk_live_…

POST /api/v1/profiles/{id}/connect/sessions
X-Profile-Id: prf_…

POST /api/v1/posts
Idempotency-Key: …
{ "text": "…", "platforms": ["facebook","instagram","linkedin"] }

GET /api/v1/posts/{postId}