Skip to main content

Prerequisites

  • A Monigo account — sign up free
  • An API key from Dashboard → API Keys

1. Get your API key

Your API key authenticates all requests to the Monigo API. Copy your live or test key from the dashboard.
mk_live_xxxxxxxxxxxxxxxxxxxx   # live mode
mk_test_xxxxxxxxxxxxxxxxxxxx   # test mode
Use test mode keys during development. Test events are isolated from live data and won’t trigger real charges.

2. Create a customer

Before ingesting usage, you need a customer record. If your customer already exists (from a previous call), this is idempotent.
curl -X POST https://api.monigo.com/v1/customers \
  -H "Authorization: Bearer mk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "external_id": "user_abc123",
    "name": "Acme Corp",
    "email": "billing@acme.com"
  }'

3. Ingest a usage event

Send an event every time your customer uses a billable feature.
curl -X POST https://api.monigo.com/v1/events \
  -H "Authorization: Bearer mk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "customer_id": "cus_xxxx",
    "event_name": "api_calls",
    "quantity": 1,
    "idempotency_key": "req_unique_id_here",
    "timestamp": "2026-02-20T10:00:00Z"
  }'
The idempotency_key ensures the event is only counted once, even if you retry the request.

4. Verify in the dashboard

Open your Monigo dashboard and navigate to Events. You should see the event appear within a few seconds.

Next steps