API Overview

View markdown

Developer API

Manage subscribers, track events, and send emails. Use the REST API directly or pick an SDK.

Cheat Sheet

Base URL: https://app.bentonow.com/api/v1/

EndpointMethodWhat it doesTriggers Automations?
/batch/eventsPOSTTrack user activity, create users, update fieldsYes
/batch/subscribersPOSTSync user data (like CSV import)No
/batch/emailsPOSTSend transactional emailsNo

Required headers for all requests:

Code
Authorization: Basic {base64_encoded_credentials}
User-Agent: YourApp/1.0
Content-Type: application/json

Before You Start

Common issues that will break your requests:

  • Missing User-Agent — Cloudflare blocks requests without one
  • Wrong auth format — Base64 encode publishable_key:secret_key (with colon)
  • Wrong site_uuid — Each site has its own UUID, check your dashboard

Shortcut: Skip base64 encoding by putting credentials in the URL:

Shell
https://PUBLISHABLE_KEY:SECRET_KEY@app.bentonow.com/api/v1/...

Authentication

Use Basic auth with your publishable_key as username and secret_key as password. Add site_uuid as a query parameter.

Generate base64 credentials:

Shell
echo -n "your_publishable_key:your_secret_key" | base64
# Output: eW91cl9wdWJsaXNoYWJsZV9rZXk6eW91cl9zZWNyZXRfa2V5

Example request:

Shell
curl -X GET 'https://app.bentonow.com/api/v1/fetch/tags?site_uuid=YOUR_SITE_UUID' \
  -H 'Authorization: Basic YOUR_BASE64_CREDENTIALS' \
  -H 'User-Agent: MyApp/1.0'

Get your keys from Settings → API Keys. Don't commit them to source control.


Quick Examples

Track Events

Creates the event, creates the user if new, updates custom fields, and triggers automations.

POST/v1/batch/events
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": "account.signup",
      "email": "user@example.com",
      "fields": { "first_name": "Jesse" }
    }]
  }'

Sync Subscribers

Bulk import/update users without triggering automations. Perfect for nightly syncs.

POST/v1/batch/subscribers
curl -X POST 'https://app.bentonow.com/api/v1/batch/subscribers?site_uuid=YOUR_SITE_UUID' \
  -H 'Authorization: Basic YOUR_BASE64_CREDENTIALS' \
  -H 'User-Agent: MyApp/1.0' \
  -H 'Content-Type: application/json' \
  -d '{
    "subscribers": [{
      "email": "user@example.com",
      "first_name": "Jesse",
      "tags": "lead,mql",
      "remove_tags": "prospect"
    }]
  }'

Send Transactional Emails

For time-sensitive emails like password resets. For marketing emails, use events + automations instead.

POST/v1/batch/emails
curl -X POST 'https://app.bentonow.com/api/v1/batch/emails?site_uuid=YOUR_SITE_UUID' \
  -H 'Authorization: Basic YOUR_BASE64_CREDENTIALS' \
  -H 'User-Agent: MyApp/1.0' \
  -H 'Content-Type: application/json' \
  -d '{
    "emails": [{
      "to": "user@example.com",
      "from": "hello@yourapp.com",
      "subject": "Reset your password",
      "html_body": "<p>Click here to reset: {{ link }}</p>",
      "transactional": true
    }]
  }'

Client-Side Tracking

Add Bento.js to track page views and identify logged-in users:

HTML
<script src="https://app.bentonow.com/{YOUR_SCRIPT}.js" async defer></script>
<script>
  window.addEventListener("bento:ready", function() {
    bento$(function() {
      // bento.identify('user@example.com'); // Call first if logged in
      bento.view();
    });
  });
</script>

Reference

Rate Limits

EndpointLimit
/api/v1/fetch/*100/min
/api/v1/batch/*100/min
/api/v1/experimental/*100/min
/api/v1/stats/*60/hour

Need more? See Plans and API access or contact support.

Error Codes

CodeMeaningFix
400Bad requestCheck request format
401UnauthorizedCheck keys and site_uuid
429Rate limitedSlow down requests
500Server errorCheck status page
BLOCKEDCloudflareAdd User-Agent header

Need Help?

Discord is fastest. Or email support@bentonow.com.