Developer docs

Integrate Dinabite

Public reference for tracking, forms, bookings, and the workspace API — no login required to read. Copy-paste snippets below; replace placeholders with values from your Dinabite workspace.

Building with an AI assistant? Share this page URL. To get your tracking key and API tokens, sign in and open Settings → API or Tracking.

Start here

Pick the path that matches what you're building:

  • Marketing site on WordPress, Webflow, etc. — add the tracking embed, then optionally send server events from your backend.
  • Custom app or automation — create an API key and use /api/v1 for contacts, deals, and form submissions.
  • Lead capture without building a form UI — link to a hosted Dinabite form or embed the booking page.

Website tracking (embed)

Paste this in your site <head>, or add it as a Custom HTML tag in Google Tag Manager (All Pages trigger). Get your real key from Settings → Tracking after sign-in.

<script async src="https://your-domain.com/tracking.js?id=YOUR_TRACKING_KEY"></script>

In Settings → Tracking, add every site origin you use (e.g. https://www.example.com). Without that, cross-site requests are blocked.

The script automatically captures pageviews and submits on HTML forms on your site.

Optional JavaScript API

// After the script loads:
dinabite.grantConsent(); // if you require consent in Tracking settings
dinabite.identify({ email: "guest@example.com", firstName: "Jane" });
dinabite.track("cta_clicked", { label: "Start trial" });

// Skip a form: <form data-dinabite-ignore>...</form>

Website tracking (server)

Send events from your backend with the same workspace API key used for CRM endpoints.

{
  "events": [
    {
      "type": "form_submit",
      "properties": {
        "email": "guest@example.com",
        "name": "Jane Doe"
      },
      "external": {
        "pageUrl": "https://example.com/contact",
        "formName": "Contact",
        "fields": [
          "email",
          "name"
        ]
      }
    }
  ]
}
curl -X POST "https://your-domain.com/api/v1/tracking/events" \
  -H "Authorization: Bearer din_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d @payload.json

Event types: pageview, form_submit, booking_scheduled, identify, custom. Submissions with an email create or update contacts automatically.

REST API

Base URL: https://your-domain.com/api/v1

Create a key in Settings → API (requires a Dinabite account). Send it on every request:

curl -H "Authorization: Bearer din_YOUR_KEY" \
  "https://your-domain.com/api/v1/contacts?limit=10"

Common endpoints

  • GET /contacts · POST /contacts
  • GET /companies · POST /companies
  • GET /deals · POST /deals · GET /deals/pipelines
  • GET /forms · GET/POST /forms/:id/submissions
  • GET /analytics/overview?days=7
  • POST /tracking/events
curl -X POST "https://your-domain.com/api/v1/contacts" \
  -H "Authorization: Bearer din_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email":"guest@example.com","firstName":"Jane","lastName":"Doe"}'

Rate limit: ~120 requests/minute per workspace. Errors return JSON { "error": "..." }.

Hosted forms

Publish a form in Dinabite, then link or iframe the hosted page. Submissions appear under Forms with a Dinabite badge.

https://your-domain.com/forms/your-form-slug

Replace your-form-slug with the slug from the form builder. Works on your workspace domain or custom domain configured in Dinabite.

Custom form UI (headless)

Build your own UI and talk to the public form API. Requests must come from the same workspace host (or proxy through your server).

// 1. Load field definitions
const schema = await fetch("https://your-domain.com/api/forms/contact").then((r) => r.json());

// 2. Submit (same origin or your server proxy)
await fetch("https://your-domain.com/api/forms/contact/submit", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    email: "guest@example.com",
    name: "Jane Doe",
    pageVisitorKey: localStorage.getItem("dinabite_trk_vid"), // optional, links to visitor
  }),
});

For server-side submission with an API key, use POST /api/v1/forms/:id/submissions — the form must have internal submissions enabled.

Booking pages

Link to your public scheduling page (copy the exact URL from Scheduling in the app):

https://your-domain.com/book/your-workspace/your-host-slug

Replace your-workspace and your-host-slug with values from Scheduling → copy link. Bookings create contacts when tracking is enabled. Pass pageVisitorKey in the book request body to link the booking to a tracked visitor.

Before you ship

  • Tracking enabled and allowed domains set if the embed runs on an external site
  • API key stored in your server secrets — never in client-side code
  • Form slug / booking URL tested on the same domain users will visit
  • Submit a test with a real email — confirm the contact appears in Contacts
  • External site forms show under Forms with an External badge after the embed captures a submit
Developer docs | Dinabite