A social media messaging API for every chat in your inbox
The OnlySocial social media messaging API lets your own software work in the same inbox as your team and the Salesbot. Send messages on WhatsApp, Instagram, Messenger, TikTok, Telegram, SMS and live chat, manage contacts and pipeline stages, and run broadcasts, all from one workspace key.
What the social media messaging API covers
The social media messaging API is the REST side of the OnlySocial unified inbox. Everything your team does by hand in a conversation, your code can do too: read threads, send replies, assign a conversation, pause the bot, add an internal note, tag a contact or move them to the next stage. Messages you send this way show up in the thread like any other reply.
It shares its workspace key with the Publishing API and the Link in Bio API, with scoped permissions, so one integration can schedule a post, answer the comments it gets and record the lead it creates. Each permission is separate, which lets you hand a contractor a key that can read conversations but never send. A read-only key is a good start while you test.
- Conversations: list, read, mark read, open or close, assign, pause the bot
- Messages: send text, media or approved templates
- Contacts: create, update, tag, note, move stage, bulk actions
- Tags, segments, broadcasts and connected channels
Send messages on the channel the customer used
One endpoint sends every message. Give it the contact and the text, and OnlySocial sends it on the channel the customer last used, or on the channel you name. The message is recorded in the thread, your team sees it, and the same webhooks fire as for a reply typed in the dashboard. Send an idempotency key with each request so a retried call never sends twice.
Media goes by reference, as an item from your media library or a file from an earlier message, so links to outside files are refused. When a contact is blocked or opted out, or the platform's messaging window has closed, the request is refused with a clear reason, which keeps your code from breaking WhatsApp or Instagram rules.
Messaging windows, handled for you
Each platform limits when a business can reply. The send endpoint checks the window for you and tells you when a template is needed, so your integration never sends a message the platform would block or penalise.
Safe to retry
Networks drop connections. Send the same idempotency key again and OnlySocial returns the first result instead of sending a second copy, so a retry after a timeout never doubles a message to a customer.
A WhatsApp messaging API with templates built in
WhatsApp lets a business reply freely for 24 hours after the customer's last message. After that, you need an approved template. The WhatsApp messaging API handles both: send plain text inside the window, and send a template with its parameters to start the conversation again. The answer tells you which case applies, so your code can switch without guessing.
Connect your number through the WhatsApp Business API in OnlySocial, create and approve templates there, and use them from your code. Order updates, booking reminders and back-in-stock notes become one request each. Read more about WhatsApp Business in OnlySocial, including templates, broadcasts and the Salesbot.
Instagram DM API and the other channels
Instagram, Messenger, TikTok and Telegram conversations arrive in the same inbox and answer to the same endpoints, so the Instagram DM API side is the call you already use for WhatsApp. Read a thread's messages, reply within the platform's window, and let the Salesbot or a person take over when needed. Comment threads sit in the inbox too.
SMS runs through your Twilio or Plivo number and live chat through the widget on your website, and both use the same send call. That means one piece of code can follow a customer from an Instagram DM to an SMS reminder without learning a new API for each channel.
A contacts API for tags, notes and pipeline stages
Every person who messages you becomes a contact with their history across channels. The contacts API lets you create and update contacts, add and remove tags, write internal notes and move a contact to another pipeline stage, one at a time or in bulk. Segments group contacts by rules, and you can list the people in each segment for a broadcast or an export.
Keep OnlySocial in step with the CRM you already use: when a deal closes elsewhere, move the contact to Won here; when someone books in OnlySocial, tag them in your CRM from the webhook. The same records feed the social CRM board your team works from.
Broadcasts you can create, approve and send from code
Broadcasts go to a segment on WhatsApp, Messenger, Instagram, Telegram or SMS. Through the API you can create a broadcast, edit it, approve one that was held for review, send it now and list its recipients with their status. Opt-outs are respected, and the delivery figures match what your team sees in the app.
A store can trigger a launch broadcast when a product goes live, and an events team can send reminders to everyone tagged for a session. Plan limits apply in the same way as broadcasts sent from the dashboard. See how broadcasts work in OnlySocial for templates and scheduling.
What teams build with the social media messaging API
An online store sends a WhatsApp order update the moment a parcel ships and answers "where is my order" questions from its own order system. A clinic books appointments in its scheduling tool and sends the reminder through the social media messaging API on the channel each patient prefers. A support team routes urgent Instagram DMs to its helpdesk and posts the answer back into the same thread.
Agencies use the social media messaging API to connect each client’s inbox to the tools that client already pays for, without asking anyone to change how they work. Example: Marlow Studio, a sample shop, tags every buyer from its store webhook and sends a thank-you message with care tips a week after delivery.
Messaging webhooks for every event
Messaging webhooks tell your server what happens without polling. Subscribe an endpoint to the events you need: a message received, sent, delivered, read or failed, a conversation assigned or closed, a contact created, updated, tagged, untagged or moved to a new stage. Every request is signed, so you can check it came from OnlySocial before you act on it.
Webhooks pair with the send endpoint to build a full loop: a message arrives, your code looks up the order, and a reply goes back in the same thread. The webhook reference in the OnlySocial API docs lists every event with an example body and shows how to verify signatures.
- Base URL: https://app.onlysocial.io/api/v1
- Header: Authorization: Bearer osk_YOUR_SECRET
- Permissions per area, such as salesbot:messages:send
- 60 requests per minute per key across the APIs
# Claude Code claude mcp add --transport http onlysocial https://app.onlysocial.io/mcp # Cursor: ~/.cursor/mcp.json { "mcpServers": { "onlysocial": { "url": "https://app.onlysocial.io/mcp" } } }
curl -X POST https://app.onlysocial.io/os/api/$WORKSPACE_UUID/posts \ -H "Authorization: Bearer osk_YOUR_SECRET" \ -H "Content-Type: application/json" \ -d '{ "accounts": [12, 18], "date": "2026-11-12", "time": "18:00", "timezone": "Europe/Lisbon", "schedule": true, "versions": [{ "account_id": 0, "is_original": true, "content": [{ "body": "The rust tote is back." }] }] }'
How to start with the social media messaging API
- Step 1
Connect your channels
Connect WhatsApp, Instagram, Messenger, TikTok, Telegram, SMS or the live chat widget in OnlySocial, so conversations start arriving in the inbox.
- Step 2
Create a scoped key
Create a workspace API key with only the permissions your integration needs, for example read conversations and send messages.
- Step 3
Subscribe to webhooks
Point a webhook at your server for messages and contact events, and verify each signature before you act on it.
- Step 4
Reply and update
Send replies, tag contacts and move pipeline stages from your code, while your team and the Salesbot keep working in the same threads.
What OnlySocial customers say
Rated 4.4 out of 5 from 61 reviews on Trustpilot. Read every review
I switched to OnlySocial from a major competitor and I have had the best experience in the world. Their customer service is top tier and they're adding new features all the time. I'd recommend OnlySocial to anyone looking to automate their social media experience.
Infinite accounts, API endpoint, all good.
I had issues setting up my comment auto reply using chatgpt, and the support went through the stress of guiding me through every step. … Exceptional service... with lots of features.
Social media messaging API FAQ
Something else? The help and API docs cover every feature.
What is a social media messaging API?
A social media messaging API lets your software read and send direct messages on social and chat channels without a person typing in an app. With OnlySocial, one REST API covers WhatsApp, Instagram, Messenger, TikTok, Telegram, SMS and live chat, plus the contacts, tags, segments and broadcasts behind those conversations.
Can I send WhatsApp messages with the API?
Yes. Inside WhatsApp's 24-hour window you can send text and media. After the window closes, send an approved template with its parameters. The WhatsApp messaging API refuses a free-form message outside the window with a clear reason, so your code knows to switch to a template.
Is there an Instagram DM API?
Yes. Instagram DMs land in the OnlySocial inbox and use the same endpoints as every other channel, so you list conversations, read messages and send replies with one set of calls. Instagram's own messaging window applies, and comment replies stay in the inbox too.
How do messaging webhooks work?
You subscribe an endpoint to the events you want, such as message received, delivered, read or failed, or a contact tagged or moved stage. OnlySocial sends a signed request for each event. Verify the signature, then act on it, for example by replying through the send endpoint.
Can I sync contacts with my CRM through the contacts API?
Yes. Create, update and tag contacts, add notes and move pipeline stages from your code, and listen to contact webhooks to update your CRM in return. OnlySocial also connects to HubSpot directly; see the integrations page.
Will the API take over conversations from my team or the Salesbot?
No. Messages sent through the API are recorded as bot sends. They never take a conversation over from a person, and your team can pause the bot, assign the thread or reply at any time. The AI sales chatbot keeps working alongside your integration.
Does the social media messaging API cost extra?
No. The Messaging API comes with every OnlySocial plan, on the same workspace key as the Publishing and Link in Bio APIs. Broadcast and contact limits follow your plan; compare them on the pricing page.
Bring your code into every conversation
Connect your channels, create a scoped key and send your first message through the social media messaging API today.
