EN
Developer guide · Updated November 2026

Meta API: Every Meta Developer API Explained

The Meta API is a family of APIs, not one. Here is what each one does, which accounts it reaches, how to get access and what it costs, then how a SaaS product can connect its users' WhatsApp, Instagram and Facebook conversations with a single API.

Meta for Developers v27.0
Graph APIgraph.facebook.com
MessagingMessenger PlatformFacebook Page conversations
MessagingInstagram PlatformProfessional accounts, DMs, media
MessagingWhatsApp Cloud APIBusiness messaging, billed per message
Pages APIPosts, comments, Page insights
Marketing APICampaigns, audiences, reporting
Conversions APIServer side events for ads
Threads APIPublish and read Threads posts
Meta Model APIMuse models, billed per token
GET graph.facebook.com/v27.0/me 200 OK
Short answer

The Meta API is the family of developer APIs Meta offers for Facebook, Instagram, WhatsApp, Threads, advertising and AI. Most of them are products of the Graph API, Meta's versioned HTTP API at graph.facebook.com. You reach them through a Meta app, access tokens and permissions approved in App Review.

This guide maps each Meta API to what it does and who can use it, then explains access, cost and limits. If your product needs the conversations of its own users, the last section shows how to connect WhatsApp, Instagram and Messenger accounts through one messaging API.

With Unipile

Every Action Your CRM Can Run on WhatsApp, Instagram and Facebook

Through Unipile, one integration lets a CRM, helpdesk or AI agent act on the accounts its users connect: read and answer conversations, manage messages, follow profiles, publish and reply to comments, all in real time.

Your CRM · Inbox WhatsAppSales WhatsAppInstagram@northwind.shopFacebookNorthwind Page
All 10WhatsApp4Instagram3Facebook3
InstagramChloe LambertTyping...2
WhatsAppAmir KhanCan I change my booking?1
WhatsAppTeam Lyon (group)Paul: Stock arrives Friday
FacebookBen NovakWhat are your opening hours?1
WhatsAppSara GomezYou: All sorted, thanks!
FacebookJulia NashCommented on your post
FacebookLucas MeyerSent a photo
InstagramNora BlakeReacted to your message
WhatsAppPriya RaoThanks, see you Monday!
InstagramChloe LambertTyping...
Today
Hi! Is the linen jacket still available in M?10:44
ForwardedYes, here is the size guide.10:46
PDF
order-2231.pdf184 KB
Here is my last order, same size please.10:491
EditedPerfect, I've reserved a size M for you until Friday.10:51
Seen
Reply to Chloe on Instagram...
Webhooks Instagrammessage.newInstagrammessage.reaction.newWhatsAppmessage.receipt.readWhatsAppchat.updateFacebookmessage.update

The full action list, channel by channel

ActionWhatsAppInstagramFacebook
Connection
Connect with Hosted AuthYesYesYes
QR code or pairing codeYesn/an/a
Credentials with two factor authenticationn/aYesYes
Messaging
List chats and messagesYesYesYes
Start a new conversationYesYesYes*
Send messages and attachmentsYesYesYes
Edit and delete messagesYesYesYes
Forward messagesYesYesYes
ReactionsYesYesYes
Mark as read and read receiptsYesYesYes
Group chatsYesYesYes
Mute and archive chatsYesYesYes
Pin messagesYesYesNo
Typing indicatorYesPresence onlyYes
Users
User profilesYesYesYes
Follow, unfollow and followersn/aYesYes
Invitations and follow requestsn/aYesYes
Block and unblock usersYesYesNo
Posts
Read postsn/aYesYes
Create, edit and delete postsn/aYesYes
Storiesn/aYesNo
Comments and repliesn/aYesYes
Reactions on posts and commentsn/aYesYes
Real time
New messages in real time (webhook)YesYesYes
Connect with Hosted Auth
AreaConnection
WhatsAppYes
InstagramYes
FacebookYes
QR code or pairing code
AreaConnection
WhatsAppYes
Instagramn/a
Facebookn/a
Credentials with two factor authentication
AreaConnection
WhatsAppn/a
InstagramYes
FacebookYes
List chats and messages
AreaMessaging
WhatsAppYes
InstagramYes
FacebookYes
Start a new conversation
AreaMessaging
WhatsAppYes
InstagramYes
FacebookYes*
Send messages and attachments
AreaMessaging
WhatsAppYes
InstagramYes
FacebookYes
Edit and delete messages
AreaMessaging
WhatsAppYes
InstagramYes
FacebookYes
Forward messages
AreaMessaging
WhatsAppYes
InstagramYes
FacebookYes
Reactions
AreaMessaging
WhatsAppYes
InstagramYes
FacebookYes
Mark as read and read receipts
AreaMessaging
WhatsAppYes
InstagramYes
FacebookYes
Group chats
AreaMessaging
WhatsAppYes
InstagramYes
FacebookYes
Mute and archive chats
AreaMessaging
WhatsAppYes
InstagramYes
FacebookYes
Pin messages
AreaMessaging
WhatsAppYes
InstagramYes
FacebookNo
Typing indicator
AreaMessaging
WhatsAppYes
InstagramPresence only
FacebookYes
User profiles
AreaUsers
WhatsAppYes
InstagramYes
FacebookYes
Follow, unfollow and followers
AreaUsers
WhatsAppn/a
InstagramYes
FacebookYes
Invitations and follow requests
AreaUsers
WhatsAppn/a
InstagramYes
FacebookYes
Block and unblock users
AreaUsers
WhatsAppYes
InstagramYes
FacebookNo
Read posts
AreaPosts
WhatsAppn/a
InstagramYes
FacebookYes
Create, edit and delete posts
AreaPosts
WhatsAppn/a
InstagramYes
FacebookYes
Stories
AreaPosts
WhatsAppn/a
InstagramYes
FacebookNo
Comments and replies
AreaPosts
WhatsAppn/a
InstagramYes
FacebookYes
Reactions on posts and comments
AreaPosts
WhatsAppn/a
InstagramYes
FacebookYes
New messages in real time (webhook)
AreaReal time
WhatsAppYes
InstagramYes
FacebookYes

* On Facebook, a personal account can start a conversation; a Page can only reply to people who wrote to it.

Source: Unipile's provider features (V2), read on November 18, 2026. Unipile is not an official Meta app and not a Meta Partner; each user connects their own account.

Definition

What Is the Meta API?

There is no single Meta API. Meta for Developers exposes several products, and most of them share one foundation: the Graph API, where every Facebook or Instagram object is a node you read and write over HTTPS.

Each product adds its own endpoints, permissions and review. Meta ships a new Graph API version several times a year: v27.0 arrived on November 4, 2026. Since July 1, 2025, Meta builds new APIs that do not depend on the Graph API on a separate REST framework based on OpenAPI; the Llama API was among the first. Existing Graph API integrations keep working.

Not to be confused with MetaApi, an unrelated trading API for MetaTrader. Searching for a Meta Business API? There is no product by that name: you probably need the Business SDK, the Business Management API (business portfolios, assets, system users), the Marketing API or the WhatsApp Business Platform.

Sources: Meta's Graph API overview and changelog, and the REST API overview. Last verified: November 2026.

Anatomy of a Graph API call
Versionv27.0, pinned in the URL
NodeAn object with an ID: a Page, a user, a post, an ad account
EdgeA collection on that node, such as /feed or /conversations
TokenA user, Page or system user access token
Map

The Meta APIs at a Glance

Ten APIs cover most needs. The first question is always the same: which account will your app act for, and what does Meta require before it lets you?

APIWhat it doesAccounts it reachesAccess required
Graph APIRead and write Facebook and Instagram objectsUsers, Pages, businessesMeta app, access token, permissions
Pages APIPublish posts, moderate comments, read Page insightsFacebook PagesPage access token, App Review
Messenger PlatformSend and receive Page conversationsFacebook Pages, Instagram professional accountsPage token, messaging permission, App Review
Instagram PlatformPublish media, manage comments and DMs, read insightsInstagram professional accountsInstagram or Facebook Login, App Review
WhatsApp Business PlatformSend templates and replies through the Cloud APIWhatsApp Business phone numbersBusiness portfolio, verified number, per message billing
Threads APIPublish, read and reply to Threads postsThreads profilesMeta app with Threads use case, App Review
Marketing APICreate campaigns, audiences and reportsAd accountsBusiness verification, ads permissions
Conversions APISend web, app and offline events for adsBusinesses running adsPixel or dataset, system user token
Content Library APIQuery public content for researchApproved researchersApplication through Meta, not open to products
Meta Model APIRun Meta AI models such as Muse SparkDevelopers (public preview)API key from Meta, billed per token
Graph API
What it doesRead and write Facebook and Instagram objects
Accounts it reachesUsers, Pages, businesses
Access requiredMeta app, access token, permissions
Pages API
What it doesPublish posts, moderate comments, read Page insights
Accounts it reachesFacebook Pages
Access requiredPage access token, App Review
Messenger Platform
What it doesSend and receive Page conversations
Accounts it reachesFacebook Pages, Instagram professional accounts
Access requiredPage token, messaging permission, App Review
Instagram Platform
What it doesPublish media, manage comments and DMs, read insights
Accounts it reachesInstagram professional accounts
Access requiredInstagram or Facebook Login, App Review
WhatsApp Business Platform
What it doesSend templates and replies through the Cloud API
Accounts it reachesWhatsApp Business phone numbers
Access requiredBusiness portfolio, verified number, per message billing
Threads API
What it doesPublish, read and reply to Threads posts
Accounts it reachesThreads profiles
Access requiredMeta app with Threads use case, App Review
Marketing API
What it doesCreate campaigns, audiences and reports
Accounts it reachesAd accounts
Access requiredBusiness verification, ads permissions
Conversions API
What it doesSend web, app and offline events for ads
Accounts it reachesBusinesses running ads
Access requiredPixel or dataset, system user token
Content Library API
What it doesQuery public content for research
Accounts it reachesApproved researchers
Access requiredApplication through Meta, not open to products
Meta Model API
What it doesRun Meta AI models such as Muse Spark
Accounts it reachesDevelopers (public preview)
Access requiredAPI key from Meta, billed per token

Going deeper on one platform: the Facebook API guide covers the Graph API, Pages and Messenger; the Instagram API guide covers the Instagram Platform; the WhatsApp API guide covers the Business Platform and its providers.

Decision

Which Meta API Do You Need?

Start from what your product does. Each need below points to one API.

You answer customers on your own Page or Instagram

Messenger Platform

Page conversations and Instagram DMs, inside the 24 hour messaging window.

You send notifications or support on WhatsApp

WhatsApp Cloud API

Templates outside the customer service window, billed per message.

You publish content

Pages, Instagram and Threads APIs

One API per network, each with its own review.

You run or measure ads

Marketing and Conversions APIs

Ad accounts, business verification, server side events.

You add AI to your product

Meta Model API

Meta models through an API key, billed per token.

Your users connect their own accounts in your SaaS

Unipile API

WhatsApp, Instagram and Facebook conversations of each user, one API and one webhook format.

Use cases

Meta API Use Cases by Provider

What teams actually build with Meta APIs, provider by provider, and where the official API ends and a connected account takes over.

Your ATS
CandidatesJobs
CandidateStage
Lina BenaliSure, Thursday 10am worksInterviewWhatsApp
Tom KellerCV sent as PDFScreeningWhatsApp
Nora SilvaThanks for the offer!OfferWhatsApp
Paul MartinIs the role remote?NewWhatsApp

Meta API use cases on WhatsApp

Meta's Cloud API serves a business phone number: support desks, order updates and template campaigns, billed per message. When each recruiter, advisor or salesperson works from their own WhatsApp, Unipile connects that account by QR code so your ATS, CRM or inbox reads and sends their messages, groups included. WhatsApp API guide.

Candidate and client chats stay attached to the right record.

Your Shop Inbox
Instagram DMsOrders
MessageTopic
Emma DuvalDo you have it in blue?ProductInstagram
Ravi ChandraWhere is order #2231?OrderInstagram
Maya BrownLoved the packaging!FeedbackInstagram
Jon LeeCollab for my channel?PartnerInstagram

Meta API use cases on Instagram

The Instagram Platform covers professional accounts: publishing, comments, insights and DMs, after App Review. Shops, agencies and creator tools that need each user's own inbox connect the account through Unipile and handle DMs, attachments, posts and comments with the same endpoints as other channels. Instagram API guide.

DMs answered from the tool where orders and customers already live.

Your CRM
ContactsDeals
ContactStage
Julia ChenIs the demo still on?QualifiedFacebook
Lucas MeyerSend me the quoteProposalFacebook
Sofia RiveraSigned, thanks!WonFacebook
Daniel MoreauLet's talk MondayNewFacebook

Meta API use cases on Facebook and Messenger

Meta's Pages API and Messenger Platform let a business answer and publish as its own Page. With Unipile, each user connects a personal account and the Pages they manage: Messenger chats flow into the CRM, and posts go out as the user or as the Page. Facebook Messenger CRM integration.

Every Messenger conversation saved on the right contact.

Your Unified Inbox
All channelsMine
ConversationChannel
Amir KhanCan I change my booking?WhatsAppWhatsApp
Chloe LambertSent you a photoInstagramInstagram
Ben NovakWhat are your hours?MessengerFacebook
Sara GomezThanks, all sortedWhatsAppWhatsApp

One inbox for Meta messaging

Helpdesks, AI agents and sales engagement tools often need all three channels at once. Built on Meta, that means three platforms, three webhook formats and three reviews. Through Unipile, every channel shares one chat and message model, one webhook URL and one authentication flow. Messaging API.

One integration for every Meta conversation your users have.

Use cases that stay on Meta's own APIs

Publishing tools

Threads API

Schedule and publish Threads posts, read replies and insights for a Threads profile, after App Review.

Ads, reporting and lead sync

Marketing, Conversions and Lead Ads

Build ad reporting, send server side events, and push Lead Ads forms to a CRM through the leadgen webhook.

AI features and agents

Meta Model API

Call Meta's models for summaries, replies or classification, billed per token, alongside your messaging data.

These three stay on Meta's own APIs: Unipile does not cover Threads, ads or AI models. It focuses on the conversations, posts and comments of the accounts your users connect.

By product

Meta API Integration by Product Type

The same three channels serve very different products. This grid shows what each type of software usually builds on WhatsApp, Instagram and Facebook.

ProductWhatsAppInstagramFacebookLearn more
CRM and sales toolsClient chats on each rep's numberDMs from leads and customersPage and personal Messenger chats on the contactCRM use case
ATS and recruitingCandidate follow up and interview schedulingReplies to creator and talent outreachCandidate messages from Pages and profilesATS use case
Helpdesk and unified inboxSupport conversations and groupsOrder and product questionsPage inbox and Messenger requestsUnified inbox
Outreach and sales engagementPersonal follow ups in a sequenceDMs after a first contactMessenger follow ups from the user's own account (a Page only replies)Outreach use case
AI agentsAnswer and summarize chatsDraft replies to DMsTriage Page messagesAI agent use case
Social media toolsNot applicablePosts, comments and DMsPosts as a Page or a user, comments as the userSocial media API
CRM and sales tools
WhatsAppClient chats on each rep's number
InstagramDMs from leads and customers
FacebookPage and personal Messenger chats on the contact
Learn moreCRM use case
ATS and recruiting
WhatsAppCandidate follow up and interview scheduling
InstagramReplies to creator and talent outreach
FacebookCandidate messages from Pages and profiles
Learn moreATS use case
Helpdesk and unified inbox
WhatsAppSupport conversations and groups
InstagramOrder and product questions
FacebookPage inbox and Messenger requests
Learn moreUnified inbox
Outreach and sales engagement
WhatsAppPersonal follow ups in a sequence
InstagramDMs after a first contact
FacebookMessenger follow ups from the user's own account (a Page only replies)
AI agents
WhatsAppAnswer and summarize chats
InstagramDraft replies to DMs
FacebookTriage Page messages
Social media tools
WhatsAppNot applicable
InstagramPosts, comments and DMs
FacebookPosts as a Page or a user, comments as the user
Access

How to Get Meta API Access

There is no single Meta API key. You work with an app, access tokens and permissions, and each permission your users rely on goes through App Review.

1

Create a Meta developer account

Register on Meta for Developers with a Facebook account.

2

Create a Meta app

Choose the use case (Pages, Messenger, Instagram, WhatsApp, Threads, ads) and note the App ID and App Secret.

3

Get access tokens

Users and Page admins sign in to grant your app tokens. Server jobs use a system user token from a business portfolio.

4

Request permissions

For example pages_messaging, instagram_manage_messages or whatsapp_business_messaging.

5

Pass App Review and Business Verification

Advanced Access is required before people without a role on your app can use it.

Test your first call

In the Graph API Explorer, select your app, generate a token with the permissions you need and run a first request. In production, call the same endpoints over HTTPS or through Meta's Business SDK.

first-call.sh
# Read the id and name of the token owner
curl "https://graph.facebook.com/v27.0/me?fields=id,name&access_token={ACCESS_TOKEN}"

Which permissions for which use case

Use caseMain permissions
Answer Page messages on Messengerpages_messaging, pages_manage_metadata
Publish and moderate on a Pagepages_manage_posts, pages_read_engagement, pages_manage_engagement
Instagram DMsinstagram_business_manage_messages (Instagram Login) or instagram_manage_messages (Facebook Login)
WhatsApp messagingwhatsapp_business_messaging, whatsapp_business_management
Lead Ads to a CRMleads_retrieval, pages_manage_metadata
Ad reportingads_read
Threads publishingthreads_basic, threads_content_publish
Answer Page messages on Messenger
Main permissionspages_messaging, pages_manage_metadata
Publish and moderate on a Page
Main permissionspages_manage_posts, pages_read_engagement, pages_manage_engagement
Instagram DMs
Main permissionsinstagram_business_manage_messages (Instagram Login) or instagram_manage_messages (Facebook Login)
WhatsApp messaging
Main permissionswhatsapp_business_messaging, whatsapp_business_management
Lead Ads to a CRM
Main permissionsleads_retrieval, pages_manage_metadata
Ad reporting
Main permissionsads_read
Threads publishing
Main permissionsthreads_basic, threads_content_publish

The Meta Model API is the exception: it uses a classic API key created in its own developer console, with no App Review. Tokens and permissions for Facebook are detailed in the Facebook API guide.

Sources: Meta's access tokens guide and App Review documentation, and the Graph API Explorer guide. Last verified: November 2026.

Troubleshooting

Common Meta API Errors and How to Fix Them

Most failed calls come back with one of a few error codes. Here is what they mean and what to do.

CodeWhat it meansWhat to do
190Access token expired, revoked or invalidRefresh or exchange the token, and ask the user to reconnect if it was revoked
10, 200 to 299Permission missing or not approvedRequest the permission, check its access level and the Page tasks of the token owner
4, 17, 32, 613Rate limit reached (app, user, Page or custom)Back off, read the usage headers and spread calls over time
368Action blocked for a policy reasonStop the action and review Meta's platform terms and the content sent
100Invalid parameter or object not reachable with this tokenCheck the ID, the fields requested and the token type
131047 (WhatsApp)Free form message sent outside the 24 hour windowSend an approved template instead
190
What it meansAccess token expired, revoked or invalid
What to doRefresh or exchange the token, and ask the user to reconnect if it was revoked
10, 200 to 299
What it meansPermission missing or not approved
What to doRequest the permission, check its access level and the Page tasks of the token owner
4, 17, 32, 613
What it meansRate limit reached (app, user, Page or custom)
What to doBack off, read the usage headers and spread calls over time
368
What it meansAction blocked for a policy reason
What to doStop the action and review Meta's platform terms and the content sent
100
What it meansInvalid parameter or object not reachable with this token
What to doCheck the ID, the fields requested and the token type
131047 (WhatsApp)
What it meansFree form message sent outside the 24 hour window
What to doSend an approved template instead

Sources: Meta's Graph API error handling guide and WhatsApp Cloud API error codes. Last verified: November 2026.

Pricing

Does the Meta API Cost Anything?

Calling most Meta APIs is free. Money comes in through WhatsApp messages, ads, AI tokens and the engineering time to keep an integration running.

Graph, Pages, Instagram, ThreadsNo feeMeta does not charge per call. Your cost is the app, App Review and version upgrades.
WhatsApp Business PlatformPer messageBilled per delivered template message since July 1, 2025, by category and country.
Meta Model APIPer tokenInput and output tokens are billed, in public preview since July 2026.

Rate limits

Meta caps calls rather than charging for them. Graph API limits depend on the token: per app and number of users for user tokens, per Business Use Case for Pages, Instagram and ads. Each response carries usage headers such as X-App-Usage and X-Business-Use-Case-Usage, so your app can slow down before it is throttled.

WhatsApp rates are detailed in our WhatsApp Business API pricing guide.

Sources: Meta's rate limiting guide and WhatsApp pricing. Last verified: November 2026.

Limits

Where Official Meta APIs Stop for SaaS Products

Meta's APIs are built for a business managing its own Pages, numbers and ads. A Meta API integration for a SaaS product that serves many customers runs into four walls.

  • Business accounts only. The Messenger Platform answers as a Facebook Page, the Instagram Platform needs a professional account, WhatsApp needs a Business number. Personal accounts are out of scope.
  • One review per product. Each permission needs Advanced Access, and Meta reviews your use case, screencast and privacy policy before your customers can connect.
  • Three platforms, three models. Messenger, Instagram and WhatsApp each have their own IDs, message formats, webhooks and messaging windows.
  • Constant upgrades. Several Graph API versions ship every year and each one is supported for at least two years before it is retired, so integrations need regular maintenance.

Sources: Meta's Messenger Platform overview and versioning guide. Last verified: November 2026.

With Unipile

One API for Meta Messaging: WhatsApp, Instagram and Messenger

CRMs, helpdesks, recruiting tools and AI agents need the conversations of their own users, not of one company Page. With Unipile, each user links their account through a hosted authentication page, and your app calls one REST API for all three channels.

ChannelWhat your app can doLearn more
WhatsAppConnect a WhatsApp account by QR code, list chats, send messages and attachments, reactions, groupsWhatsApp API guide
InstagramConnect an Instagram account, read and send DMs and attachments, profiles, posts and commentsInstagram API guide
FacebookConnect a personal account and the Pages it manages, read and reply to Messenger chats, publish posts as a PageFacebook Messenger API
All threeSame endpoints, same objects and the same webhooks for new messages, reactions and read receiptsProvider features
WhatsApp
What your app can doConnect a WhatsApp account by QR code, list chats, send messages and attachments, reactions, groups
Instagram
What your app can doConnect an Instagram account, read and send DMs and attachments, profiles, posts and comments
Facebook
What your app can doConnect a personal account and the Pages it manages, read and reply to Messenger chats, publish posts as a Page
All three
What your app can doSame endpoints, same objects and the same webhooks for new messages, reactions and read receipts

List chats and reply, whatever the channel

Once a user connects an account, you get an account_id. The calls are identical for WhatsApp, Instagram and Facebook.

meta-messages.sh
# 1. List the chats of a connected WhatsApp, Instagram or Facebook account
curl --request GET \
  --url "https://api.unipile.com/v2/{ACCOUNT_ID}/chats" \
  --header "X-API-KEY: {YOUR_API_KEY}"

# 2. Reply in one of those chats
curl --request POST \
  --url "https://api.unipile.com/v2/{ACCOUNT_ID}/chats/{CHAT_ID}/messages/send" \
  --header "X-API-KEY: {YOUR_API_KEY}" \
  --header "content-type: application/json" \
  --data '{ "text": "Thanks, your order ships today." }'
200 OK · message sent from the user's account

Full reference in the Unipile API documentation.

Compliance

Each user connects their own account

Unipile is an independent company, not an official Meta app and not a Meta Partner. It acts on behalf of authenticated users, who remain bound by Meta's terms. Use it for legitimate scenarios such as customer support, CRM and direct conversations.

Step by step

Meta API Integration in 5 Steps: WhatsApp, Instagram and Messenger

The same five steps connect any of the three Meta channels, so a team that ships WhatsApp first can add Instagram and Messenger without a new integration.

1

Create a Unipile account

Get your API key from the dashboard. The free trial lasts 7 days, with no credit card.

2

Open a Hosted Auth link

Call POST /v2/auth/link with the providers you offer, for example WhatsApp, Instagram and Facebook, then send your user to the returned link.

3

Receive the account_id

The user lands back on your redirect_uri with an account_id, and an account.add webhook confirms the account is ready.

4

Backfill chats and messages

List the chats of the account with GET /v2/{ACCOUNT_ID}/chats and store the history you need.

5

Go real time with webhooks

Subscribe one endpoint to message.new and the other message events, and reply with messages/send.

Connect an account and receive its messages

connect-account.sh
# Hosted Auth link for WhatsApp, Instagram and Facebook
curl --request POST \
  --url "https://api.unipile.com/v2/auth/link" \
  --header "X-API-KEY: {YOUR_API_KEY}" \
  --header "content-type: application/json" \
  --data '{
    "providers": ["whatsapp", "instagram", "facebook"],
    "redirect_uri": "https://yourapp.com/accounts/callback",
    "expires_on": "2027-01-01T00:00:00.000Z"
  }'
webhook.js
// One endpoint for every connected Meta account (Express)
app.post("/webhooks/unipile", express.raw({ type: "application/json" }), (req, res) => {
  // Check the unipile-signature header with your endpoint secret first
  const event = JSON.parse(req.body);
  if (event.type === "message.new") {
    // event.account_provider tells you WhatsApp, Instagram or Facebook
    saveMessage(event.account_id, event.account_provider, event.payload);
  }
  res.sendStatus(200);
});

Full reference: Hosted Auth and webhooks in the Unipile documentation.

Webhooks

Meta API Webhooks: Three Platforms, Three Setups

Every Meta platform pushes events to a verified HTTPS endpoint, but each one is subscribed, shaped and filtered differently. Here is what you set up for each, compared with Unipile's single format.

PlatformWhere you subscribeFields or eventsSignature header
Messenger PlatformSubscribe each Page to your app (subscribed_apps)messages and related fieldsX-Hub-Signature-256
Instagram PlatformSubscribe the professional account (Instagram Login) or its linked Page (Facebook Login)messages and related fieldsX-Hub-Signature-256
WhatsApp Cloud APISubscribe the WhatsApp Business Accountmessages, with delivery statuses in the same fieldX-Hub-Signature-256
Lead AdsSubscribe each Page (pages_manage_metadata), then fetch the lead with leads_retrievalleadgenX-Hub-Signature-256
UnipileOne endpoint for every connected accountmessage.new, message.update, message.reaction.new, message.receipt.read, account.addunipile-signature
Messenger Platform
Where you subscribeSubscribe each Page to your app (subscribed_apps)
Fields or eventsmessages and related fields
Signature headerX-Hub-Signature-256
Instagram Platform
Where you subscribeSubscribe the professional account (Instagram Login) or its linked Page (Facebook Login)
Fields or eventsmessages and related fields
Signature headerX-Hub-Signature-256
WhatsApp Cloud API
Where you subscribeSubscribe the WhatsApp Business Account
Fields or eventsmessages, with delivery statuses in the same field
Signature headerX-Hub-Signature-256
Lead Ads
Where you subscribeSubscribe each Page (pages_manage_metadata), then fetch the lead with leads_retrieval
Fields or eventsleadgen
Signature headerX-Hub-Signature-256
Unipile
Where you subscribeOne endpoint for every connected account
Fields or eventsmessage.new, message.update, message.reaction.new, message.receipt.read, account.add
Signature headerunipile-signature

On Meta's side, your endpoint first answers a verification request with the hub.challenge value, then receives POST notifications signed with your app secret. Answer with a 200 quickly, process events in the background and ignore duplicates, because Meta retries deliveries that fail.

Sources: Meta's Webhooks getting started guide, Webhooks for Leads and Unipile's event types reference. Last verified: November 2026.

Comparison

Building on Meta APIs vs Unipile

Both paths are legitimate. The right one depends on whose accounts your product serves.

Meta's official APIsUnipile
Accounts reachedPages, Instagram professional accounts, WhatsApp Business numbersThe accounts your users connect: personal and business, Pages they manage
Setup before the first messageMeta app, permissions, App Review, Business VerificationAPI key and a Hosted Auth link
ChannelsOne platform per channel, each with its own modelWhatsApp, Instagram and Facebook with LinkedIn, Telegram, email and calendars
WebhooksThree subscriptions and three payload formatsOne endpoint, one event format
MaintenanceEach Graph API version is supported for at least two years, then retiredUnipile follows provider changes
PricingFree to call, WhatsApp billed per messageBilled per connected account, see API pricing
Out of scopePersonal accountsAds, Threads, Lead Ads and AI models
Accounts reached
Meta's official APIsPages, Instagram professional accounts, WhatsApp Business numbers
UnipileThe accounts your users connect: personal and business, Pages they manage
Setup before the first message
Meta's official APIsMeta app, permissions, App Review, Business Verification
UnipileAPI key and a Hosted Auth link
Channels
Meta's official APIsOne platform per channel, each with its own model
UnipileWhatsApp, Instagram and Facebook with LinkedIn, Telegram, email and calendars
Webhooks
Meta's official APIsThree subscriptions and three payload formats
UnipileOne endpoint, one event format
Maintenance
Meta's official APIsEach Graph API version is supported for at least two years, then retired
UnipileUnipile follows provider changes
Pricing
Meta's official APIsFree to call, WhatsApp billed per message
UnipileBilled per connected account, see API pricing
Out of scope
Meta's official APIsPersonal accounts
UnipileAds, Threads, Lead Ads and AI models

Sources: Meta's Graph API versioning guide and Unipile's provider features. Last verified: November 2026.

Best practices

Meta API Best Practices and Compliance

Most rejected apps, blocked numbers and broken integrations come from the same handful of mistakes.

  • Get consent first. Message people who contacted the business or opted in, and give them an easy way to stop.
  • Respect messaging windows. On Messenger and Instagram, you can send standard messages within 24 hours of the person's last message; the HUMAN_AGENT tag, which requires Meta's Human Agent permission, extends manual replies to 7 days. On WhatsApp, outside the 24 hour customer service window you can only send approved template messages.
  • Read the usage headers. Slow down when X-App-Usage or X-Business-Use-Case-Usage climbs, and retry with backoff.
  • Verify every webhook. Check the signature on the raw body, answer fast and make your handler idempotent.
  • Pin and plan versions. Call a fixed Graph API version and upgrade before it is retired.
  • Store tokens like passwords. Encrypt access tokens, scope them to what you need and revoke them when a customer leaves.
Compliance

Your users stay bound by Meta's terms

Unipile is not an official Meta app and not a Meta Partner. It is built in line with the Digital Markets Act, acts only on accounts that users connect themselves, and is meant for legitimate conversations such as support, CRM and recruiting.

Sources: Meta's Messenger send messages guide, rate limiting guide and WhatsApp pricing. Last verified: November 2026.

Pick the Meta API that matches your account model

Use Meta's own APIs when your company manages its own Pages, numbers, ads or AI usage. When your product needs the WhatsApp, Instagram and Facebook conversations of each of its users, connect their accounts through Unipile and keep one API for every channel.

Meta API FAQ

Quick answers on cost, access tokens, webhooks, Lead Ads and compliance.

Calling the Graph API, Pages, Instagram, Messenger and Threads APIs is free. WhatsApp Business Platform messages are billed per delivered template message since July 1, 2025, ads are paid as ad spend, and the Meta Model API is billed per token.

Yes, several. Meta for Developers offers the Graph API and products built on it (Pages, Messenger, Instagram, WhatsApp, Marketing and Conversions APIs), plus the Threads API, the Content Library API for researchers and the Meta Model API for AI.

Create a Meta app on Meta for Developers, then get tokens from the people who use it: a user token through Facebook Login, a Page token from /me/accounts, or a system user token from your business portfolio for server jobs. The Graph API Explorer gives a test token.

Meta documents it as the Conversations API of the Messenger Platform. It lists the conversations and messages of a Facebook Page or an Instagram professional account, for example GET /{page-id}/conversations?platform=instagram. Do not confuse it with the Conversions API, which sends ad events from your server.

They depend on the token. User and app tokens share a platform limit based on the number of users of your app; Pages, Instagram and ads calls count against Business Use Case limits. Meta returns usage headers with each response so you can slow down before you are throttled.

Unipile is built in line with the Digital Markets Act (DMA): its API focuses on messaging interoperability for accounts that users connect themselves, and user profiles are not stored. Unipile is not affiliated with Meta, and clients are expected to comply with the terms of each provider.

Not quite. The Graph API is the base HTTP API at graph.facebook.com that most Meta products are built on, including Pages, Messenger, Instagram, WhatsApp and the Marketing API. Threads runs on its own host, graph.threads.net, and the Meta Model API is a separate API with its own keys.

It retrieves the leads collected by Facebook and Instagram lead ad forms. You subscribe a Page to the leadgen webhook field, and each notification carries a leadgen_id that you read through the Graph API with the leads_retrieval permission.

You register a verified HTTPS endpoint in your Meta app and subscribe each Page, Instagram account or WhatsApp Business Account to the fields you need. Meta then sends signed POST notifications; check the X-Hub-Signature-256 header, answer with a 200 quickly and process events asynchronously.

Not on Meta's side: each channel has its own platform, permissions and webhooks. Unipile exposes WhatsApp, Instagram and Facebook Messenger through the same chat and message endpoints and one webhook format, for accounts your users connect themselves.