Agent addresses, tools and errors
Every address and tool an agent can use, the five ad-link tools, and what each error answer means.
Where it is in the app
Open Home, choose Settings, then General › API keys.
- Home
- Settings
- General
- API keys
Reference for the agent API. Start with "Agents and the API" to get a key.
#Every address
All of them under https://app.aminoengine.com/api/agent/v1, all with Authorization: Bearer YOUR-KEY.
| Request | What it does |
|---|---|
GET /me |
Who am I: the brand, how much rope, whether the agent is switched on, and the team addresses an alert step may use. |
GET /guide |
The written guide for the agent. Read this first. |
GET /flows/schema |
The flow schema, the rules, and the three examples. |
GET /flows |
Every flow, newest first. ?status=draft, live or off to narrow it. |
POST /flows |
Make one. A name plus either a definition or a library flow to start from. |
GET /flows/{id} |
One flow in full, with its definition and how many people are in it. |
PATCH /flows/{id} |
Change the name, the definition, the tags or the sending rules. |
DELETE /flows/{id} |
Delete one. |
POST /flows/{id}/status |
Switch it on or off. |
POST /flows/{id}/clone |
Copy it, switched off. |
GET /library |
The ready-made flows, and whether this brand has what each one needs. |
GET /templates · POST /templates |
List the email designs, or write a new one. |
GET /templates/{id} · PATCH /templates/{id} |
Read one, or edit one it wrote. |
GET /lists · POST /lists |
Your lists, or a new one. |
GET /segments |
Your segments, with how many people are in each. |
GET /events |
Every event this brand actually receives, and how often. |
#Every tool
Over MCP the flow and email work is twenty-one tools:
| Tool | What it does |
|---|---|
whoami |
The brand, the rope, whether the agent is on, and the team addresses an alert step may use. |
guide |
The written guide. Read it first. |
flow_schema |
The schema, the rules and three valid examples. |
list_flows |
Every flow, with its trigger and how many steps. |
get_flow |
One flow in full. |
create_flow |
Build one, from a definition or from the library. |
update_flow |
Change a flow that is not running. |
set_flow_status |
Switch a flow on or off. |
clone_flow |
Copy a flow. |
delete_flow |
Delete a flow. |
list_library |
The ready-made flows and what each one needs. |
list_templates |
Every email design, and whether it can be edited. |
get_template |
One design, with its HTML. |
create_template |
Write a new email. |
update_template |
Edit one it wrote. |
list_lists |
Your lists and their sizes. |
create_list |
Make a list. |
list_segments |
Your segments and their sizes. |
list_events |
The events your shop and site are sending. |
send_code |
Email somebody a one-time code or sign-in link. |
verify_code |
Check what they typed back. |
#Ad-link tools
The same address carries five tools for your Advertising links. They need an Advertising plan. Reading works on either setting. Anything that changes a link needs May switch flows on.
| Tool | What it does |
|---|---|
list_ad_links |
Your links and their 7-day counts. |
get_ad_link |
One link, its version, its addresses, its daily numbers and its last 50 clicks. |
create_ad_link |
Make a live link: a name, a platform, 1 to 5 HTTPS pages with whole-number percentages that add up to 100, an optional bot page, optional device and country routes, and optional tracking parameters. |
update_ad_link |
Replace a link's setup. Send the full setup and the version you read. A stale version is refused. The link's address does not change. |
set_ad_link_status |
Pause or resume routing. Send the current version. |
See "Make an ad link" and "Split clicks across pages and route by device or country" for what each setting means.
#When it goes wrong
Every refusal is one sentence saying what to do about it, and most carry a hint as well.
| Answer | What happened |
|---|---|
| 401 | The key is wrong, missing, or was replaced. Issue a new one on the Agents & API screen. |
| 403 | The agent is switched off for this brand, or it is on build drafts only and tried to switch a flow on. |
| 404 | No flow, template or list with that id in this brand. |
| 409 | The flow is live (pause it first), or its trigger is already set (copy the flow instead), or the email was built in the visual editor and cannot have its HTML replaced. |
| 413 | The body was too big. An email design can be up to 102 KB. |
| 422 | The flow did not pass the checker. The answer names the field and the rule. |
| 429 | Too many requests. 300 a minute per brand. Wait the number of seconds it tells you. |