OpenBSP API
Open-source WhatsApp and Instagram Business Platform
Self-hostable, multi-tenant, AI-agent ready. Built with Deno 🦕 and Postgres 🐘, powered by Supabase ⚡
OpenBSP is designed for both individual businesses and service providers. You
can use it to manage your own WhatsApp and Instagram messaging, or leverage its
features to become a
Meta Business Partner
and offer messaging services to other organizations.
Table of contents
Platforms
Channels
Development
Community
Quickstart
Receive and send WhatsApp messages in two steps. Before you start (once): sign
up at web.openbsp.dev, connect your WhatsApp number
(Integrations → WhatsApp), and create an API key (Settings → API Keys). Every
call below sends two headers: apikey (the public Supabase key) and api-key
(your secret key).
The API is PostgREST over the database, every table is
an endpoint, so you can use plain REST or any
Supabase SDK (JS, Python, Dart, …).
1. Receive messages — register a webhook; OpenBSP POSTs every new message to
your URL:
curl -X POST 'https://nheelwshzbgenpavwhcy.supabase.co/rest/v1/webhooks' \
-H 'apikey: <PUBLISHABLE_KEY>' -H 'api-key: <API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"organization_id": "<ORG_ID>",
"table_name": "messages",
"operations": ["insert"],
"url": "https://your-app.com/webhook"
}'
Your endpoint receives the messages table row as is, wrapped in a thin
envelope:
{
"entity": "messages",
"action": "insert",
"data": {
// the row, exactly as stored
"id": "9b2d…",
"organization_id": "…",
"conversation_id": "…",
"external_id": "wamid.…",
"service": "whatsapp",
"organization_address": "<PHONE_NUMBER_ID>",
"conversation_address": "5491155551234",
"sender_address": "5491155551234",
"content": {
"version": "1",
"type": "text",
"kind": "text",
"text": "Hi!"
},
"status": { "delivered": "2026-07-17T12:00:00Z" },
"timestamp": "2026-07-17T12:00:00Z"
}
}
Reply when data.sender_address is set — the contact authored it; it is null on
your own outgoing rows, which the webhook also fires for (and, with "update",
for status changes).
2. Send a message — insert a row; OpenBSP dispatches it to WhatsApp:
curl -X POST 'https://nheelwshzbgenpavwhcy.supabase.co/rest/v1/messages' \
-H 'apikey: <PUBLISHABLE_KEY>' -H 'api-key: <API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"organization_id": "<ORG_ID>",
"organization_address": "<PHONE_NUMBER_ID>",
"conversation_address": "5491155551234",
"service": "whatsapp",
"content": {
"version": "1",
"type": "text",
"kind": "text",
"text": "Hello from OpenBSP!"
}
}'
The same insert through the Supabase JS SDK:
import { createClient } from "@supabase/supabase-js";
const supabase = createClient(
"https://nheelwshzbgenpavwhcy.supabase.co",
"<PUBLISHABLE_KEY>",
{ global: { headers: { "api-key": "<API_KEY>" } } },
);