• cURL or an HTTP client (Insomnia/Postman)
  • Optional: Node.js 18+ or Python 3.9+ for examples
  • A public HTTPS endpoint (or a tunneling tool) to receive webhooks. We recommend checking out webhook.site for quick testing.

Environment setup

Set your API key as an environment variable:
export BLOOIO_API_KEY=YOUR_API_KEY

Make test requests

Try a simple authenticated request to validate your key:
curl -H "Authorization: Bearer $BLOOIO_API_KEY" \
  https://backend.blooio.com/v1/api/me
Send a message:
curl -X POST https://backend.blooio.com/v1/api/messages \
  -H "Authorization: Bearer $BLOOIO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: dev-$(uuidgen)" \
  -d '{"to": "+15551234567", "text": "Hello from Blooio (dev)!"}'

Receive webhooks locally

You can test webhooks by running a local server and exposing it with a tunneling tool.
  1. Start a local server (Node.js example):
// server.js
import express from 'express'

const app = express()
app.use(express.json())

app.post('/webhooks/blooio', (req, res) => {
  console.log('Webhook:', req.headers['x-blooio-event'], req.body)
  res.sendStatus(200)
})

app.listen(3001, () => console.log('Listening on http://localhost:3001'))
  1. Expose your server:
ngrok http http://localhost:3001
  1. Point Blooio to your public URL:
curl -X PUT https://backend.blooio.com/v1/api/config/webhook \
  -H "Authorization: Bearer $BLOOIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"webhook_url":"https://YOUR-NGROK-URL/webhooks/blooio"}'
See the full event payloads in Webhook events.

Tips for development

  • Use Idempotency-Key during development to avoid duplicates
  • Log response bodies and headers when debugging
  • Store timestamps (ms) from responses to correlate with webhooks