Guide

Multi-tenant profiles and externalId mapping

In Social Relay a platform account is the SaaS buyer (shared token wallet). An application is a product isolation unit under that platform. Each end customer is a profile under an application that owns their social connections and posts. Profiles are created by your backend via POST /api/v1/profiles when a user needs social—not by end users signing up on socialrelay.dev. Optional externalId is unique per application.

← GuidesAuthentication & tenancyUpdated 2026-08-10

In short

In Social Relay a platform account is the SaaS buyer (shared token wallet). An application is a product isolation unit under that platform. Each end customer is a profile under an application that owns their social connections and posts. Profiles are created by your backend via POST /api/v1/profiles when a user needs social—not by end users signing up on socialrelay.dev. Optional externalId is unique per application.

Who creates profiles?

Your SaaS creates them on the fly under an application-scoped API key. When an end user enables social in your product, your server calls POST /api/v1/profiles (title + externalId = your user/tenant id), stores the returned prf_… on your user record, then uses X-Profile-Id for connect and publish.

End users do not log into socialrelay.dev to open a profile. They only use your app—and Social Relay’s hosted connect URL when linking networks.

The socialrelay.dev Applications → Profiles tab is for you (the platform operator): inspect API-created profiles, fix externalId, and smoke-test. Manual create there is optional QA only.

Why profiles exist

A multi-tenant social API cannot treat all pages as one flat account. Profiles isolate OAuth connections, post history, and errors so one customer never posts as another—and applications isolate products so Timely never sees SoundCloud customers.

You do not create one profile per social network. One profile holds Facebook, Instagram, LinkedIn, Bluesky, and Mastodon connections for that customer.

Platform vs application vs profile

  • Platform: your SaaS on socialrelay.dev — token wallet, rate limits, billing
  • Application: product isolation unit — API keys, profiles, webhooks, connect (e.g. Timely, SoundCloud)
  • Profile: one end customer under an app — title, status, externalId, connections[], posts[]
  • Connection: one network under a profile (Facebook Page, Instagram professional, LinkedIn personal member, Bluesky, or Mastodon)

externalId

Set externalId to your stable customer key (e.g. sc_123 or org_100) when you create the profile from your app. It must be unique per application (the same externalId may exist on different apps). Clear it with null on PATCH if you outgrow the mapping.

List and get profiles with your application API key only—no cross-app or global profile directory.

Create with externalId (from your backend)json
{
  "title": "Acme Bakery — Downtown",
  "externalId": "customer_123",
  "metadata": { "plan": "pro" }
}

Lifecycle

Soft-delete disables a profile for new posts while preserving audit history. Re-connect OAuth if tokens expire or the user switches Pages.