Behavly

Build on Behavly with the API and MCP.

The actions Behavly Agent takes, from your own code or your AI app, with your role and your plan’s limits.

Four ways in, one workspace.

The Behavly API and MCP server let other apps work in your workspace. AI apps such as Claude, ChatGPT and Cursor connect over MCP; any other app or script calls POST /api/v1/{action} with a key. Both run the same actions as Behavly Agent, with your role and your plan’s limits.

Call any action over HTTP.

Every call is POST /api/v1/{action} with a JSON body and your key in the Authorization header. The API documentation lists every endpoint with examples: campaigns, contacts and patterns, the Unibox, templates, insights, email accounts and settings.

Connect your AI app over MCP.

Claude, ChatGPT, Gemini, Perplexity, Grok, Cursor, Claude Code and VS Code connect to Behavly’s MCP server. Choose Continue with Behavly, pick the workspace and the access, and Behavly makes the app a key of its own.

Send your product’s events.

Your backend sends send_event with the person’s email and the event’s details, using a key with Send events only access. A Trigger Campaign that starts on it takes the person in the moment it arrives.

One snippet on your site.

Paste one async script tag into your site’s head, on your signed-in pages too. You do not call an identify function: the snippet detects a signed-in session on its own.

One API call starts the follow-up.

Your backend sends Behavly an event when something happens to a person, like a declined card or an ending trial. Every Trigger Campaign that starts on it takes them in the moment it arrives, and the event's details can fill the emails.

POSThttps://behavly.io/api/v1/send_event
curl -X POST 'https://behavly.io/api/v1/send_event' \
  -H "Authorization: Bearer $BEHAVLY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "event": "payment_failed",
    "email": "ana@example.com",
    "properties": {
      "plan": "Pro",
      "amount": 49
    }
  }'
  1. Event received · payment_failed
  2. Trigger matched · Payment failed
  3. Campaign started · Payment recovery
  4. First email scheduled · Ana

From a key to your first call.

  1. Make a key.

    In Settings → API, click Create API key, name it after the app or computer it is for, and choose Read & write, Read only, or Send events only. Copy it: it is shown once, and a lost key is revoked and replaced, never recovered.

  2. Call an action.

    Send POST /api/v1/{action} with a JSON body and the header Authorization: Bearer YOUR_API_KEY. The key acts as the person who made it, in the workspace it was made in, with their role as it is now.

  3. Or connect an AI app.

    Copy the server URL from Settings → MCP and add it in your AI app. Behavly’s sign-in page opens: choose Continue with Behavly, pick the workspace and Read & write or Read only, and the app appears under Connected apps.

  4. Send events from your server.

    With a Send events only key, send each event to send_event with the person’s email and its details. Send your own id when you retry: the same key twice is one event. send_events takes up to 100 in one request.

  5. Changes that matter wait for you.

    By default, deleting something or sending email to real people waits: the app gets a link, and you check the change in Behavly and approve or decline it within 30 minutes. Every change shows in the Audit log as via API or via MCP.

The controls around every key.

One workspace
A key acts as the person who made it, in the workspace it was made in. It never reaches another workspace.
Their role, as it is now
A key can do what its person’s role allows when it is used. Change someone’s role and their keys follow; remove them and their keys stop.
Read only
Looks things up. Every change is refused.
Send events only
Sends events and nothing else, so if it ever leaks it cannot read your contacts or change anything.
Your plan
Every plan can use the API and MCP. What an app does counts as if you did it in Behavly; at a limit, the app is told what ran out and given the link to Billing.
Turn it off
Owners and admins see every key and can revoke any of them. Workspace access in the API tab turns every key off at once without deleting any.

Questions about the API.

01

Is the API on every plan?

Yes. Every plan can use the API and MCP. Everything an app does counts toward your workspace’s plan exactly as if you did it in Behavly, and calls over MCP or the API are not Behavly Agent chat messages.
02

How does an app sign in?

AI apps choose Continue with Behavly on Behavly’s sign-in page, and Behavly makes them a key of their own. Any other app sends a key as the header Authorization: Bearer YOUR_API_KEY. Every call is POST /api/v1/{action} with a JSON body.
03

Can a key delete things or send email on its own?

Not by default. Deleting something or sending email to real people waits for you: the app gets a link, and you approve or decline the change in Behavly within 30 minutes.
04

Can I send events from the browser?

Not with a key: Behavly refuses an event sent from a browser with a key, because a key in a web page can be copied by anyone. On your website, the snippet’s behavly.track starts the same campaigns for a visitor your site has identified.

Meet the Behavly Agent.

It reads what each user does in your product and writes their follow-ups. Free to start, no credit card.