ONLINEDeliverability
Bento

API Quickstart

Get up and running with the Bento API in under 5 minutes. By the end of this guide, you'll have tracked your first event and verified it appears in your Bento dashboard.


Get Your API Keys

Before making API calls, you'll need three credentials:

  1. Log in to Bento
  2. Go to SettingsAPI Keys
  3. Copy these values:
    • Publishable Key (starts with pk_)
    • Secret Key (starts with sk_)
    • Site UUID

Track Your First Event

The Events API is the most common way to interact with Bento. Let's track a simple event to make sure everything is working.

Using cURL

Replace the placeholder values with your actual credentials:

curl -X POST 'https://app.bentonow.com/api/v1/batch/events?site_uuid=YOUR_SITE_UUID' \
  -H 'Authorization: Basic YOUR_BASE64_CREDENTIALS' \
  -H 'User-Agent: MyApp/1.0' \
  -H 'Content-Type: application/json' \
  -d '{
    "events": [{
      "type": "$custom.quickstart_test",
      "email": "test@example.com",
      "fields": {
        "first_name": "Test",
        "source": "api_quickstart"
      }
    }]
  }'

Quick Auth Setup

Generate your Base64 credentials:

echo -n "YOUR_PUBLISHABLE_KEY:YOUR_SECRET_KEY" | base64

Or use the URL shortcut (credentials in the URL):

curl -X POST 'https://YOUR_PUBLISHABLE_KEY:YOUR_SECRET_KEY@app.bentonow.com/api/v1/batch/events?site_uuid=YOUR_SITE_UUID' \
  -H 'User-Agent: MyApp/1.0' \
  -H 'Content-Type: application/json' \
  -d '{
    "events": [{
      "type": "$custom.quickstart_test",
      "email": "YOUR_EMAIL@example.com"
    }]
  }'

Expected Response

A successful request returns:

{
  "results": 1,
  "failed": 0
}

Verify It Worked

Let's confirm your event was recorded:

  1. Go to your Bento Dashboard
  2. Click Search in the top navigation
  3. Search for test@example.com (or whatever email you used)
  4. Click on the subscriber profile
  5. Look for the $custom.quickstart_test event in their activity timeline

You should see:

  • The event type you sent
  • Any fields you included (like first_name)
  • The timestamp of when it was received

Next Steps

Now that you've made your first API call, here's what to explore next:

Learn the Core APIs

APIUse Case
Events APITrack user actions, trigger automations
Subscribers APIImport/export contacts, update profiles
Emails APISend transactional emails
Tags APIOrganize subscribers with tags

Use an SDK

Skip the raw HTTP calls and use our official SDKs:

Common Patterns

  • User signups: Track $signed_up events when users create accounts
  • Purchases: Track $purchase events with value and product details
  • Page views: Use Bento.js for client-side tracking
  • Transactional emails: Send password resets, receipts, and notifications via the Emails API

Need Help?