Log inStart Free Trial
easyCoexistence Official APIs

Multi-tenant social media API: one API key, many customers' accounts

easyCoexistence's Partner API is multi-tenant by design: one ec_live_ key on your account connects and manages many customers' WhatsApp numbers and social accounts. Each connection carries your customer's id as external_ref, holds that customer's own token, gets its own webhook destination and appears in signed status events, so GET /channels?external_ref= lists one customer's accounts.

200 characters

Longest external_ref a connect session takes: your own id for the customer, stored on the connection it creates.

1 key

API keys an easyCoexistence account holds at a time; separate keys mean separate accounts with separate bills.

50 open

Connect sessions one account may hold open at once, next to a limit of 100 new sessions an hour.

5 minutes

Age after which a signed event's timestamp should be rejected, with the HMAC compared in constant time.

How does one account serve many customers?

Your easyCoexistence account stands for your product, and each customer is a tag on the connections they bring. Customers create no account of their own, never see your key and are billed by you, not by easyCoexistence:

Your accountOne ec_live_ key, one bill, one status events URL
Your customerYour own id, sent as external_ref
NumberA WhatsApp number at /connections
ChannelA social account at /channels
DestinationA webhook per number or channel

How do you tag each connection with your customer?

Send external_ref on the connect session. The value is stored on the number or channel the session creates, added to the redirect and included in its status events. A Facebook or LinkedIn sign-in that brings several Pages tags each one. To see one customer's accounts, filter either list:

One customer's social accounts and numbers
curl "https://easycoexistence.com/api/v1/channels?external_ref=customer_4821" \
  -H "Authorization: Bearer $EC_API_KEY"

curl "https://easycoexistence.com/api/v1/connections?external_ref=customer_4821" \
  -H "Authorization: Bearer $EC_API_KEY"

How are customers' tokens kept apart?

Each connection holds its own customer's token. A WhatsApp number's token is the business token Meta issues at Embedded Signup, scoped to that customer's assets, and a social account's token is the one its owner granted. Credentials come only through your key, from your backend, and an ID that is not on your account answers 404 not_found. Look up the connection for the customer a job belongs to before you fetch its token, so one tenant's work never runs on another's account.

How do webhooks work per customer?

One destination per account, chosen by you. Point the channels at one URL and route on account_id in the body, or give each customer a URL of their own. Each channel signs with its own secret from PUT /channels/{id}/webhook, so the account_id tells you which secret to verify with. A number's messages go from Meta to its webhook_url, which is set on the WhatsApp Business Account, so route those on phone_number_id.

How do status events say which customer they concern?

By carrying your external_ref. One events URL per account receives connection.* and channel.* events, each with the connection or channel view inside, external_ref included, and post.published and post.failed carry the post and its channel. Events are signed with the account's own secret in X-EC-Signature and retried when your endpoint fails, so handle each delivery id once.

How fast can you onboard many customers?

At 50 open connect sessions and 100 new ones an hour per account. Meta counts every first-time WhatsApp onboarding against an app-wide limit that every easyCoexistence account shares, and the caps keep one platform's import from using it up. Create each session when its customer is about to connect, and a cap answers 429 cap_reached or rate_limited.

What if a customer's account is already connected elsewhere?

The sign-in is refused. A social account connects through one easyCoexistence account at a time, so if another service using easyCoexistence holds it, the session's last_error says so and the customer removes it there or signs in with a different account. Within your own account, a customer can connect as many accounts as they need, each tagged with the same external_ref.

How do you offboard one customer?

List their connections and channels by external_ref and DELETE each one. Removing a number revokes easyCoexistence's access at Meta and stops monitoring; removing a channel revokes access at the network and cancels its posts still waiting in the queue. Billing for each stops at the end of the cycle, and the customer's other connections, like other tenants', are untouched.

Common mistakes

  • Using an email as external_ref. Emails change and the value is stored on each connection, so use the stable id from your own database.
  • Verifying forwarded events with the wrong tenant's secret. Look the secret up by the account_id in the body, since each channel signs with its own.
  • Sending connect links to your whole customer base at once. Only 50 sessions can be open per account, so invite customers in waves.
  • Deleting a customer only in your own database. Their connections stay on your account and your bill until each one is removed through the API.
Doing this with EasyCoexistence

easyCoexistence lets one API key serve your whole customer base: their WhatsApp numbers and their Instagram, Facebook, TikTok, YouTube and LinkedIn accounts, and more channels, each tagged with your customer id, with its own token, webhook and signed events, and every connection monitored 24/7. US$ 9 to US$ 0.75 per connection per month, falling as you add connections, with the first 3 days free.

easyCoexistence is a multichannel API and MCP server that connects AI agents such as Claude and ChatGPT to WhatsApp, Instagram, TikTok, Facebook and more. On WhatsApp it uses Coexistence: the business keeps using its number in the WhatsApp Business app while the AI works through Meta's official API.

Frequently asked questions

Do I need one easyCoexistence account per customer?

No. One account and its key can hold the connections of many customers, told apart by external_ref. Separate accounts are only needed when you want separate bills.

Can my customers see each other's accounts?

Not through easyCoexistence. They never hold your key, and they open only their own connect links. What each customer sees inside your product is decided by your code.

Can I give each customer a different webhook URL?

Yes. Each number and each channel takes its own destination, so a customer-specific URL works, as does one shared URL routed by account_id.

How is a multi-tenant account billed?

Per connection across all your customers together: US$ 9 to US$ 0.75 per connection per month, set by the band of your total count, with the first 3 days free.

Keep reading

Connect your first channel in two minutes.

No platform reviews to wait for. Connect WhatsApp, Instagram, TikTok or another channel, then ask your AI to post, reply or report, and watch it work.

  • 3 days free
  • Cancel any time
  • Official APIs only
  • Monitored 24/7

Verified on