Log inStart Free Trial
easyCoexistence Official APIs

Social media API for agencies: run your clients' accounts from your own software

A social media API for agencies lets the agency's own software connect, publish, reply and report on each client's accounts. With easyCoexistence's Partner API, a client's WhatsApp number and Instagram, Facebook, TikTok, YouTube and LinkedIn accounts join the agency's account through hosted links tagged with the client's id, and one API key schedules, routes and watches all of them.

200 characters

The longest external_ref a connect session takes, the agency's own id for the client, kept on each connection.

1 hour

How long a hosted connect link works for the client who opens it.

Advanced Access

What a Meta app needs to serve Instagram professional accounts it doesn't own or manage, after App Review and Business Verification.

ADMINISTRATOR

The LinkedIn Page role a member needs for the rw_organization_admin permission, which manages Pages and reads their reporting.

End of cycle

When billing stops for a client connection the agency removes through the API.

How does the API organise an agency's clients?

By your client id. Send it as external_ref on every connect session, and it stays on each number and account the session creates and comes back on every status event. GET /channels?external_ref=client_118 lists that client's social accounts, with &channel=instagram to narrow it to one network, and GET /connections?external_ref=client_118 lists their WhatsApp numbers. Every client sits on the agency's one account, under one ec_live_ key, which is what puts the whole count in one price band.

One client's accounts
curl "https://easycoexistence.com/api/v1/channels?external_ref=client_118" \
  -H "Authorization: Bearer $EC_API_KEY"

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

How does a client hand over access?

Through a link the agency sends. POST /connect-sessions with the network as channel, the client's external_ref and the agency's name as partner_name returns a url; the client opens it, signs in on the network's own consent screen, or runs Meta's popup and scans a QR code for a WhatsApp number, and lands back on the agency's redirect_url. A Facebook or LinkedIn sign-in can bring several Pages at once, each its own connection, so check the list against the client's brief.

How does the agency publish for clients?

From its own approval flow. The agency's software keeps drafts until the client signs off, then sends each approved post to POST /channels/:id/posts with its publish_at, up to 90 days ahead. GET /channels/:id/posts gives one account's calendar, GET /posts with a status filter shows what is waiting across clients, and post.published and post.failed tell the account manager what happened. LinkedIn posts always pass through a person's approval, which an agency's sign-off step already provides.

How does the agency reply to comments and DMs for clients?

From one inbox that routes by account. PUT /channels/:id/webhook sets a destination for each Instagram account, Facebook Page and TikTok account, and every forwarded comment, mention or DM carries the account_id, which maps to the client. A WhatsApp number's messages go from Meta to the webhook_url set for it. Replies leave through each network's API with the credentials from GET /channels/:id?credentials=1, and the agency's team can also work across clients in Claude or ChatGPT through the MCP connector on the same account.

How does the agency build client reports?

From each network's own analytics, called with the client account's credentials. Instagram and Facebook insights come from Meta's Graph API, TikTok's from its API for Business, YouTube's from YouTube Analytics, whose base the credentials include, and LinkedIn's from its statistics endpoints. The agency's report job fetches fresh credentials per account at the start of each run, pulls the period's figures and files them under the client's external_ref.

How does the agency know a client's account needs attention?

From signed status events. channel.disconnected and connection.disconnected carry the client's external_ref, so the agency's software can alert that client's account manager and send the client a new connect link. Every connection is monitored 24/7, and the agency's owner is also emailed when one drops. A client who withdraws access in the network's settings shows up the same way.

What happens in the API when a client leaves?

The agency's offboarding job lists the client's connections by external_ref and calls DELETE /channels/:id and DELETE /connections/:id on each. Billing for them stops at the end of the cycle, scheduled posts on a removed channel are canceled, and a removed social account's token is forgotten. A WhatsApp number stays on the Cloud API until the client disconnects it in the WhatsApp Business app.

Common mistakes

  • Queueing client posts before the client signs off. A queued post publishes at its time without another check, so hold drafts in your approval step and send them only once approved.
  • Putting the Partner API key in a client portal's front end. The key reaches every client's credentials on the account, so keep it on the agency's server.
  • Waiting for comment events from a client's YouTube channel or LinkedIn Page. easyCoexistence receives none from either, so the report or inbox job reads them through each network's API.
Doing this with EasyCoexistence

easyCoexistence gives an agency's own software one API for its clients' WhatsApp numbers and their Instagram, Facebook, TikTok, YouTube and LinkedIn accounts, and more channels: hosted connect links tagged per client, a publishing queue, forwarded comments and DMs, fresh credentials for reports 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 clients need their own easyCoexistence account?

No. A client opens the hosted link and signs in, and the connection joins the agency's account, where it is billed and monitored.

Can the agency keep clients on separate API keys?

One account holds one key. Separate keys mean separate easyCoexistence accounts, each billed from the first band, so most agencies keep clients apart by external_ref instead.

Can the client see the agency's name when connecting?

Yes. The hosted page shows the name sent as partner_name. The network's own consent screen names easyCoexistence as the app asking for access.

How much does easyCoexistence cost for an agency?

US$ 9 to US$ 0.75 per client connection per month, falling as the agency adds clients, the same on every network, 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