Recipient guard

The first time an agent sends to an email address, phone number, bank account or host that no person in the workspace approved before, the request waits for a person, even when a rule allows the action. A known payee with a new account is named as changed bank details.

A rule that allows payments.send up to €500, or email.send to anyone, cannot tell the supplier you pay every month from an account an attacker slipped into an invoice. Text in an email or a web page can tell an agent that a supplier’s bank details changed, or that a report should also go to an outside address. The request then looks like every other one the rule allows.

The recipient guard looks at who a request sends to. The first time an agent sends to an email address, phone number, bank account or host that no person in the workspace approved before, the request waits for a person, even when an allow rule covers it. Once a person approves it, that recipient is known, and the rule applies to it again from then on.

Allow rules cover both actions. People approved paying Acme GmbH at DE89 3704 0044 0532 0130 00 and emailing finance@northwind.example before.

The agent asks to

Waiting for a person · allowed: false. The allow rule does not count for a recipient nobody approved before. The agent is told only that it waits.

  • Bank details changed for acme gmbh: new IBAN GB82WEST12345698765432, approved before was DE89370400440532013000.

What counts as known

A recipient is known when either of these is true:

  • A person approved a request for a guarded action that sent to it (approving a draft does not count), and that approval still stands: it was not called off in its cancel window, its run was not stopped, and the agent was not contained after it.
  • An owner listed it as trusted (below).

An approval by a rule never teaches the guard anything. Otherwise an agent could make a new recipient look normal just by asking often enough. Known recipients are shared across the workspace: an account one agent was approved to pay is known for every agent.

What it reads from a request

The guard reads recipients from the request’s details, never from its summary, and keeps each in one written form so two spellings of the same one match:

email
Addresses in fields that name who a message goes to: to, cc, bcc, recipients, reply_to, attendees, and any field with email, recipient or address in its name. Read in lower case. An address in the body of a message is not a recipient.
phone
A phone number in one of those fields, or in a field with phone in its name: 7 to 15 digits, kept with its + when it has one.
iban
An IBAN anywhere in the details, also when written in groups of four. Only one whose check digits add up counts, so other numbers are not mistaken for one.
account
An account number or wallet address in a field with account, acct, wallet, iban or payto in its name, or in a field called destination (such as a Stripe connected account). It needs at least two digits. Its case is kept.
host
The host of a web address in a field that names where a call goes: url, uri, webhook, endpoint, callback, destination and the like.

The payee is read from a field such as payee, beneficiary, vendor, supplier, creditor or account_holder, or from name inside an object one of those fields holds.

Changed bank details

When a request pays a new account for a payee that people approved paying at another account, the guard says so: the payee’s bank details changed, and here is the account approved before. This is the usual shape of invoice fraud, and the one a person should check by calling the supplier on a number they already have. An agent sending this:

{
  "agent": "payables-bot",
  "action": "payments.send",
  "summary": "Pay Acme GmbH invoice 2291",
  "amount": { "value": "480.00", "currency": "EUR" },
  "details": {
    "invoice": "2291",
    "beneficiary": {
      "name": "Acme GmbH",
      "iban": "GB82 WEST 1234 5698 7654 32"
    }
  }
}

waits for a person, who sees this on the request in the inbox:

"first_contact": {
  "new": [
    {
      "kind": "iban",
      "value": "GB82WEST12345698765432",
      "payee": "acme gmbh",
      "changed_from": "DE89370400440532013000"
    }
  ],
  "unreadable": false
}

When a recipient cannot be read

A request for a guarded action waits for a person too, with unreadable set, when its details name no recipient the guard can read, or when a field that names recipients holds something else: a name with no address, an address with more around it such as "known@acme.com"@evil.example, a number that is no phone number, or a web address with no host. Leaving the recipient out, or hiding one among known ones, never gets an agent past the guard. If more than 50 recipients are new, the request lists 50 and counts the rest in more. If your agent’s tool uses field names the guard does not read, rename them, or keep that action off the guard’s list.

Setting it

Owners set and remove the guard; every member can see it. It works on every plan, Free included.

actions
The actions that send to someone, as rules write them: email.send, payments.*, sms.send. 1 to 20 patterns.
trusted
Recipients to trust without a person first, up to 200: an email address, @domain (every address and host at that domain or under it), a host name or web address (that host only), an IBAN in any spacing, a phone number or an account number.
curl -X PUT https://api.variantgate.com/v1/workspaces/$WORKSPACE_ID/recipient-guard \
  -H "Authorization: Bearer YOUR_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "actions": ["email.send", "payments.*", "http.post"],
    "trusted": ["@northwind.example", "DE89 3704 0044 0532 0130 00"]
  }'
{
  "actions": ["email.send", "payments.*", "http.post"],
  "trusted": ["@northwind.example", "DE89370400440532013000"],
  "held": 0,
  "last_held_at": null,
  "set_by": "maya@northwind.example",
  "updated_at": "2026-11-30T14:02:10Z"
}
200
The guard is set. Setting it again replaces it.
403
You are a member, not an owner.
422
No action, more than 20 actions or 200 trusted entries, a pattern that is not one, or a trusted entry that is no recipient.

held counts the requests the guard kept a rule from approving. The activity log records each change as recipient_guard.set or recipient_guard.removed, with how many recipients are trusted but never which ones. Read it, or turn it off:

curl https://api.variantgate.com/v1/workspaces/$WORKSPACE_ID/recipient-guard \
  -H "Authorization: Bearer YOUR_SESSION_TOKEN"
curl -X DELETE https://api.variantgate.com/v1/workspaces/$WORKSPACE_ID/recipient-guard \
  -H "Authorization: Bearer YOUR_SESSION_TOKEN"

What it never does

  • It never approves a request, and never sets allowed to true.
  • A request a rule denies stays denied; the guard only ever holds back what a rule would approve.
  • It never tells the agent why it waits: the agent sees a pending request like any other. An agent under an allow rule can still tell from approved and pending answers which recipients go through.
  • An agent key can never read or change it.

It works alongside the other checks. Unusual flags a host one agent never reached once it has a history; the summary check holds a request whose summary leaves a recipient out; the trifecta guard holds what a run sends out after reading private data and untrusted content.

During a deploy

While two versions of the API run side by side during a deploy, one from before the guard ignores it: a request it takes is decided as before, and its recipients are not stored, so a person’s approval of it teaches the guard nothing. That recipient simply stays new. Set a recipient guard once every instance runs this version.