Developers — Bonjourchat
Skip to content

Developers

Build on Bonjourchat.

One REST API for contacts, conversations and messages across chat, WhatsApp, email and voice. Send from any channel, hand off between AI and humans, and react to every event with webhooks.

Base URLhttps://api.bonjourchat.com/v1

Quickstart

  1. 01

    Install the SDK

    Node 18+ or Python 3.9+. Or call the REST API directly.

  2. 02

    Create an API key

    In Settings → Developers. Store it as BC_KEY.

  3. 03

    Send a message

    It lands in the customer’s thread in the inbox, next to every other channel.

npm i @bonjourchat/sdk

import { Bonjourchat } from "@bonjourchat/sdk";

const bc = new Bonjourchat(process.env.BC_KEY);

await bc.messages.send({
  channel: "whatsapp",
  to: "+33612345678",
  text: "Your order #4821 has shipped.",
});

Authentication

Authenticate every request with a bearer token. Keys are scoped to one workspace. Use bc_test_ keys against the sandbox — nothing is sent to real customers — and bc_live_ keys in production.

Never expose a secret key in the browser. The widget uses a public workspace ID instead.

curl https://api.bonjourchat.com/v1/contacts \
  -H "Authorization: Bearer $BC_KEY"

API reference

JSON in, JSON out. Select an endpoint to see an example.

Contacts

Conversations

Messages

AI agents

Knowledge

GET /v1/conversations?status=open&assignee=ai
{
  "data": [
    {
      "id": "cv_31Fz",
      "contact": "ct_8Hq2",
      "status": "open",
      "assignee": "ai:support",
      "channels": [
        "chat",
        "whatsapp"
      ]
    }
  ],
  "has_more": true
}

Webhooks

Register an HTTPS endpoint and we’ll POST every event within a second. Each request is signed with Bonjourchat-Signature (HMAC-SHA256). Failed deliveries retry for 24 hours.

{
  "id": "evt_2Pq9",
  "type": "message.received",
  "created": "2026-10-03T09:43:12Z",
  "data": {
    "channel": "whatsapp",
    "conversation": "cv_31Fz",
    "contact": "ct_8Hq2",
    "text": "Do you do bulk orders?"
  }
}

Errors & rate limits

100 requests per second per workspace. Every response includes X-RateLimit-Remaining. Errors return a stable code you can branch on.

400invalid_request

A parameter is missing or malformed.

401invalid_api_key

The key is missing, revoked or from another workspace.

404not_found

The object doesn’t exist in this workspace.

409channel_unavailable

The contact can’t be reached on that channel (e.g. WhatsApp 24h window closed).

429rate_limited

Too many requests. Retry after the Retry-After header.

SDKs & widget

Node.js

npm i @bonjourchat/sdk

Python

pip install bonjourchat

iOS & Android

Swift Package · Maven

Web widget

cdn.bonjourchat.com/w.js

Need help integrating? Talk to our team.