Docs / Getting started

Getting started

Bump keeps exact running totals of what happens in your app. Your server sends an event when something countable happens, like an order or a new team member, and Bump adds it to the totals per customer and for the whole app. When a total crosses a line you set, Bump records a milestone and can send your app a signed webhook.

Create a project

Sign in and choose New project. Give it a name, a timezone and a currency. Days on charts follow the timezone, and amounts are in the currency.

Both are fixed once the project has its first event, live or test. Until then you can change them under Settings.

Every project comes with two environments, live and test. Start in test. Environments explains the difference.

Get a test token

  1. Switch the sidebar to Test.
  2. Open Developers, then the API tokens tab.
  3. Name the token after where it will run, like Laptop, and choose Create token.

The token starts with bump_test_. Copy it right away: Bump shows it once and only keeps a hash. Creating tokens takes an owner or admin of the team.

Send your first event

Replace bump_test_… with your token:

curl https://api.bumpbunny.dev/v1/track \
  -H "Authorization: Bearer bump_test_…" \
  -H "Content-Type: application/json" \
  -d '{"trackable": "orders", "identifiable": "usr_123", "amount": 49.99}'

That's one order of 49.99 for the customer usr_123. Bump answers with one result per event:

{
  "object": "list",
  "data": [
    {
      "object": "event",
      "id": "evt_vyp6qrbsr80rycr5",
      "status": "accepted",
      "milestones": []
    }
  ]
}

orders and usr_123 didn't exist before this call. Bump creates trackables and identifiables the first time an event names them.

See it on the overview

Open Overview, still in test. orders is in the trackables table with a count of 1 and an amount of 49.99, and Active today says 1. usr_123 is under Identifiables, and Developers > Events has the event itself, with its evt_ ID.

Next

  • Sending events has every field, body shape and limit.
  • Errors shows what a rejected event looks like and where to find it later.
  • Using Laravel? The stickysoftware/bump-laravel package sends events for you, with idempotency keys, batching and retries. Laravel package shows how.