# Brinkpost

Brinkpost is a messaging API: your product sends events, and lifecycle campaigns (onboarding, win-back, product updates) start and stop on them.

- Docs: https://brinkpost.com/docs (every page also as Markdown: add `.md`)
- API base: https://api.brinkpostapp.com/v1
- OpenAPI 3.1: https://brinkpost.com/openapi.json
- API catalog: https://brinkpost.com/.well-known/api-catalog
- Console (keys, campaigns, event log): https://app.brinkpostapp.com
- MCP server: https://api.brinkpostapp.com/mcp (API key as a bearer)

## Authentication

A workspace API key, `bp_live_` followed by 32 letters and digits, created in the console (https://app.brinkpostapp.com/settings/api-keys).
Send it as `"api_key"` in the JSON body of a POST (the way the docs show it), or as `Authorization: Bearer <key>`.
GET requests use the bearer header. Keep the key on the server; projects usually hold it in `.env` as `BRINKPOST_API_KEY`.

## Send an event

```bash
curl https://api.brinkpostapp.com/v1/events \
  -H "Content-Type: application/json" \
  -d '{"api_key":"'"$BRINKPOST_API_KEY"'","event_name":"plan_upgraded","email":"jordan@acmecorp.io","properties":{"plan":"pro"}}'
```

202 answer: `{"event_id":"evt_...","status":"accepted"}`, plus `campaign_exits` when the event ended campaigns for that contact.

- `event_name` (required, at most 64 characters), `email` (required), `user_id`, `properties` (JSON object, up to 32 KB), `timestamp`.
- Batches: `POST /v1/events/batch` with `{"api_key": ..., "events": [ ... ]}`, at most 1,000 events and 5 MB.
- Retries: an `Idempotency-Key` header; a key used again within 24 hours answers 409 and records nothing.

## Campaigns and metrics

- `GET /v1/campaigns`: ids (`cmp_...`), status and exit events. The starter Win-back campaign exits on `plan_upgraded`.
- `GET /v1/metrics?campaign_id=cmp_...&period=last_week`: sent, delivered, opened, clicked, `delivery_rate` (delivered / sent) and `open_rate` (unique opens / delivered), with daily figures. Periods: `last_7_days` (default), `last_week` (previous Monday to Sunday), `last_30_days`, or `from`/`to`.

## Errors

JSON `{"error":{"type","code","message","param","doc_url"}}`. 401 `key_revoked`: the key was revoked; a workspace member makes a new one in the console. 422 `email_required`, `event_name_too_long`. 413 `batch_too_large`. 409 `idempotency_key_reused`. 429 `rate_limited`.

## Plans

- Free: $0, 1,000 contacts, event retention 30 days, 10 requests per second.
- Growth: $79 a month with 10,000 contacts, then $6 per 1,000 contacts; event retention 1 year; 100 requests per second. 40,000 contacts cost $259 a month.
- Scale: $599 a month with 100,000 contacts, then $4.50 per 1,000 contacts; event retention 3 years; 500 requests per second; SAML single sign-on.

Details: https://brinkpost.com/pricing
