Agents and the API

Give an AI a key and it builds your flows. How to connect Claude Code or claude.ai, how much rope to give it, and what you can see afterwards.

Updated · 5 min read

Where it is in the app

Open Home, choose Settings, then General › API keys.

  • Home
  • Settings
  • General
  • API keys

You can hand an AI a key to this account and let it build your flows. Not a chat box that suggests one — the real thing: it reads your lists, your segments and the events coming out of your shop, writes the emails, assembles the flow, and hands it back for you to switch on.

Two rules make it safe:

  • A flow the agent builds is the same flow you build. It goes through the same checker as the editor. There is no second, looser path into your account.
  • Nothing sends until somebody says so. Out of the box the agent may build and edit, and a person switches each flow on. You can raise that later.

#Get a key

Go to the Agents & API screen, at /automations/agents, and press Issue key. Settings → General → API keys links to it as Agents & MCP. (The old address, /settings/agents, now opens API keys, where your other keys live.)

  • One key per brand. Issuing a new one kills the old one that second.
  • It is shown once. Leaving the page loses it, and the only way back is a new key.
  • Only owners and admins can issue, replace or revoke it — a key is another way into your account, so it sits with the people who manage the team.

Treat it like a password. Anyone holding it can build flows in your brand.

#Connect Claude Code

One line in a terminal. The screen prints it with your key already in it:

Code
claude mcp add --transport http amino-engine \
  https://app.aminoengine.com/api/mcp \
  --header "Authorization: Bearer PASTE-YOUR-KEY-HERE"

Then type /mcp inside Claude Code and amino-engine is listed. Tell it: "Read the guide, then build me a welcome series."

#Connect claude.ai or Claude desktop

Settings → Connectors → Add custom connector. Paste this as the URL and name it Amino Engine:

Code
https://app.aminoengine.com/api/mcp?token=PASTE-YOUR-KEY-HERE

The key is in the address here because a custom connector is only an address — there is nowhere else to put it. That is your own browser and your own connector settings, and it is the one place we accept a key that way.

#Connect anything else

Anything that can make a web request. Send the key as a header:

Code
curl -sS https://app.aminoengine.com/api/agent/v1/me \
  -H "Authorization: Bearer PASTE-YOUR-KEY-HERE"

/me changes nothing and is the right first request: it proves the key works, names the brand, and says what the agent is allowed to do right now.

Everything lives under https://app.aminoengine.com/api/agent/v1/. Bodies and answers are JSON.

#How much rope

Two settings on the Agents & API screen, and one of them is a stop button.

Setting What it means
Build drafts only (the default) It creates and edits flows and emails. A person switches each flow on.
May switch flows on Everything above, and it can turn a finished flow on by itself.
Agent on / off Off refuses every request with the key, without losing the key. One click to stop everything.

On the cautious setting, an attempt to switch a flow on comes back refused, in words the agent can act on: "This brand lets the agent build drafts only. Ask a person to switch it on."

Some things the agent can never do, on either setting:

  • Change a flow while it is running. It has to pause it first.
  • Change what starts a flow once that has been set. Triggers are locked for the life of the flow; the answer is to copy it and start again.
  • Send a campaign. Flows only.
  • Turn a flow on that your plan does not cover, or a text flow before you have registered for texting. Those refusals are the same ones you see in the editor.

The same key also lets your AI list, make, change and pause your Advertising links, with five extra tools. See "Agent addresses, tools and errors". Making or changing a link needs May switch flows on and an Advertising plan. Reading needs only the key.

#What you see afterwards

Everything the agent does is written to your activity log, the same one your own changes go to, with the agent named as the actor. It shows on the Agents & API screen — the last fifty things, newest first — and in Settings → General → Activity log in full.

Built a flow. Edited a flow. Wrote an email. Paused a flow. Switched a flow on. Each row links to the flow it touched, so you can open it and read what was actually built before anything goes out.

If something is there you did not expect: switch the agent off, or revoke its key. The flows it already built stay exactly as they are, and none of them send until they are switched on.

#If it didn’t work

  1. The agent says the key is wrong. Issue a new one on the Agents & API screen and paste it in again. Issuing a key kills the one before it, so an agent still holding the old key stops the second you press the button — that is the intended way to cut one off.

  2. The agent says it is switched off. Somebody turned the agent off for this brand. Turn it back on from the Agents & API screen.

  3. It built the flow but could not switch it on. The agent is on build drafts only. Either switch the flow on yourself, or give the agent more rope on the Agents & API screen.

  4. It cannot find your list or your template. Ids belong to one brand. An agent pointed at the wrong brand sees nothing at all rather than somebody else’s things, which is deliberate.

  5. It keeps being told to wait. Three hundred requests a minute per brand is the ceiling. The answer says how many seconds to wait; a well-behaved agent waits and carries on.

  6. A flow it built has sent nothing. Nothing sends until the flow is switched on and your sending address is verified. Neither of those is something an agent can do for you.

  7. You do not recognise what it did. Switch the agent off, or revoke its key, and read Settings → General → Activity log. Anything it built stays as a draft and sends nothing.

    On screenSettings › General › Activity log
Was this helpful?

Still stuck? A person answers.

Email support@aminoengine.com and we answer within one business day.