Embedding Indrava in your product
Give each of your customers their own Indrava workspace from your server, let them connect channels without an Indrava account, and post on their behalf.
Use the embedding API when your product wants social publishing for its own customers and you do not want them to sign up to Indrava. Your server creates one tenant workspace per customer. Each tenant is a full workspace of its own: its channels, posts and files are kept apart from every other tenant's and from yours.
Everything here is server to server. Never put a key in a browser or an app.
Not yet run on a hosted Indrava
The embedding API passes its automated checks, but it has not yet run against a hosted Indrava with real tenants. Treat it as a preview until this note is removed.
What you need
An API key of your own workspace with the scope embed:write. Create it under Developers in the app. This key manages tenants; it is not the key you post with.
1. Create a workspace for a customer
curl -X POST http://localhost:4000/api/v1/embed/tenants \
-H "Authorization: Bearer $INDRAVA_PARTNER_KEY" \
-H "Content-Type: application/json" \
-d '{ "externalId": "customer-42", "name": "Acme Bakery", "webhookUrl": "https://your.app/indrava/events" }'{
"externalId": "customer-42",
"name": "Acme Bakery",
"organizationId": "org_…",
"createdAt": "2027-01-04T09:00:00.000Z",
"apiKey": "ak_…",
"webhookSecret": "whsec_…"
}externalIdis your own id for the customer (letters, digits,.,:,-,_). Every other tenant route takes it in the path, so you never have to store an Indrava id.apiKeyis the tenant's key, shown once. Store it encrypted next to the customer. If it is lost or leaked, replace it withPOST /embed/tenants/{externalId}/key: every earlier key of that tenant stops working.The call is idempotent: sending the same
externalIdagain renames the workspace, puts it on your current plan, and returns"apiKey": null.webhookUrlis optional and read on the first call only. Every event of the tenant workspace is delivered there, signed withwebhookSecret. Verify it as described in Receive webhooks.
2. Let the customer connect a channel
curl -X POST http://localhost:4000/api/v1/embed/tenants/customer-42/connect \
-H "Authorization: Bearer $INDRAVA_PARTNER_KEY" \
-H "Content-Type: application/json" \
-d '{ "provider": "linkedin", "redirectUrl": "https://your.app/settings/social" }'{ "url": "http://localhost:4000/connect/…", "expiresAt": "2027-01-04T10:00:00.000Z" }Send the customer's browser to url. They see which workspace is asking, sign in at the platform, and return to your redirectUrl with the outcome in the query:
Query | Meaning |
|---|---|
| The channels that were saved |
| Nothing was saved; the message can be shown to the customer |
Do not treat the query as proof: anyone can open your redirectUrl with a made-up query. Confirm with GET /embed/tenants/{externalId}/channels or the channel.connected event.
The link works for one hour and for any number of sign-ins in that time.
provideris an id fromGET /channels/providers. Only platforms that connect by signing in can be used here. Platforms that take pasted credentials (an app password, a bot token) are connected with the tenant's key andPOST /channels/connect.redirectUrlmust behttps(http://localhostis accepted while you develop). Without it the customer ends on a plain Indrava page that says the channel is connected.
3. Post on the customer's behalf
Use the tenant's key with the ordinary API. Nothing about these calls is special: the key decides which workspace they act on.
curl -X POST http://localhost:4000/api/v1/posts \
-H "Authorization: Bearer $TENANT_KEY" \
-H "Content-Type: application/json" \
-d '{
"parts": [{ "text": "Fresh sourdough at 8." }],
"targets": [{ "channelId": "<channel id>" }],
"action": "schedule",
"scheduledAt": "2027-01-05T08:00:00Z"
}'The tenant's key holds every scope except the embed ones, so media, analytics, the inbox and the rest of the operations work the same way.
Manage tenants
Call | What it does |
|---|---|
| Your tenants, newest first |
| A tenant's channels, with their state |
| Disconnect a channel (access is revoked at the platform) |
| Replace the tenant's key |
| Delete the workspace and everything in it. Not reversible |
Plans and limits
You can have as many tenants as your plan includes clients. Past that, creating another tenant answers
402with the codePLAN_LIMIT_REACHED.A tenant workspace gets your plan's limits (channels, scheduled posts per month, AI credits) when it is created, and follows your plan when it changes: every tenant is moved within a few minutes, with no call from you. A tenant that Indrava gave limits of its own keeps them through your plan changes.
Rate limits are counted per key, so one busy tenant does not slow the others.
Security notes
A tenant can only ever be reached through the partner workspace that created it: another partner sending the same
externalIdgets its own, separate workspace.Tenant keys cannot create tenants or read your own workspace.
Deleting your own Indrava workspace does not delete its tenants. Delete them first.