The AB Marketing API

The AB Marketing API lets your other systems — your online shop, your app, your CRM — send in their contacts, what those people agreed to, their unsubscribes, and what they did after an email. An API is a way for one program to talk to another; this page is for whoever looks after those systems.

Create a key

  1. Open API from the workspace’s buttons. Only a Manager or an Admin can create or revoke keys.
  2. Say Which system will use it, e.g. Online shop (production). Make one key per system, so each can be revoked on its own.
  3. Click Create key, copy it from Copy this key now into the other system’s secret settings, and click I’ve stored it.

Each key shows when it was created and last used. Revoke refuses that system from then on; what it already sent is kept.

What the API does

Base address https://blz.actionbridge.io. Send the key on every call as Authorization: Bearer mk_… (or X-AB-Key: mk_… if your tool can’t set that header).

CallFor
GET /api/marketing/topicsThe workspace’s topics and their ids. Topics are made in the app, never through the API.
POST /api/marketing/contactsUp to 500 contacts per call, each with optional consent per topic, or an unsubscribe, bounce or complaint
POST /api/marketing/eventsUp to 500 events — “bought”, “booked a demo” — which become Acted in your results

Up to 120 calls a minute from one address. Each contact and each event succeeds or is refused on its own, with a reason, so one bad row never stops the rest.

Or: the website tag

If what you want to count happens on your website — a sign-up, a purchase — you may not need anyone to call the API. The website tag is a snippet for your pages that reports those events from the visitor’s browser.

  1. Enter your website’s domains. On the API page, under Website tag, type them in Your website’s domains (one per line, such as example.com; subdomains are included) and click Save domains. A Manager or an Admin can do this.
  2. Paste the snippet into every page, before </head>. It is shown once the domains are saved, with a Copy button.
  3. Tell it the visitor agreed to cookies: when your cookie banner records consent, call abm('consent', 'granted').
  4. Report what they did: abm('event', 'purchase', { id: 'order-1042' }). The id is optional; with it, a repeat counts once.

The key in the snippet is not a secret; it only works from pages on your domains. Replace key issues a new one, and pages with the old snippet stop counting until you paste the new one. Use the API instead for what happens away from your website, such as an order confirmed in your back office.

The same rules as a person

  • Consent needs a basis — opt-in, customer, business-card or imported-unknown — and an opt-in needs the name of the wording the person saw (noticeVersion). The same meanings as in Topics and consent.
  • Restoring a withdrawal, or lifting a suppression, needs a reason a person can read later.
  • Sending the same thing again changes nothing, so a nightly sync of everyone is fine.
  • A blank field changes nothing: the API can update a name or company but never empty it.
  • Events are only accepted for people the workspace already knows — a contact it holds or someone it has emailed. Others are refused and nothing about them is kept. Send an id (such as the order number) so a retried call records the event once.

Your developer can ask us for the full reference, with every field, example and error code, at actionbridge.io/contact.

Published on 2026-11-29
Last updated on 2026-11-30
Version 2