Skip to main content
POST
Amend a mandate — append a new version (ALPHA)

Authorizations

x-api-key
string
header
required

Path Parameters

mandate_id
string
required

Body

application/json

A new version of an active mandate's rule, signed by a recognized signer of the mandate's customer other than the bound one (§8).

The rule below is taken VERBATIM — it is stored, and the signature is verified, exactly as sent. Unlike mandate creation, this endpoint does NOT normalize it: a rule that is not already canonical is refused with 400 naming the offending field, rather than being rewritten into something you cannot reproduce. So window must be present and non-empty (send "NONE" for a lifetime window), targets must be recipient ids and never payee names, and asset must already be uppercase. This is what lets you compute the signed bytes from the body you are about to send.

signer_public_key
string
required

The amending signer's public key. Must differ from the mandate's bound signer.

signature
string
required

Signature over the JCS-canonical amend payload — the same shape as the approve/cancel payload with action set to "amend", rule set to the NEW rule below EXACTLY as you send it, and one extra key, version, set to the version being created (the mandate's current version + 1). Including the version is what stops a signature for v2 from being replayed to create v3. Because the rule is never normalized on this path, the bytes you sign are the bytes the server verifies.

rule
object
required

The complete NEW rule, not a patch, in canonical form — it is stored and signed verbatim, never normalized. window is REQUIRED here (use "NONE" for a lifetime window) even though it is optional when creating; targets must be recipient ids, not payee names; asset must be uppercase. Anything else is refused with 400 naming the field, not silently rewritten. target_type, window, asset and network_id must additionally match the current version exactly; only the amount fields and targets may differ.

Response

The mandate at its new version. version is the version just created; rule is now that version's rule.

id
string
status
enum<string>

expired is DERIVED, never stored - a pending or active mandate whose valid_until has passed. It cannot authorize payments and cannot be approved; it can still be cancelled.

Available options:
pending,
active,
expired,
rejected,
revoked,
done
bound_signer_id
string
customer_id
string

The customer this mandate is anchored to - approval requires a recognized signer of this customer other than the bound one (§8), and recipient targets belong to it. Absent only on rows created before the anchor existed.

target_names
string[]

DERIVED, display-only - the rule's recipient targets resolved to names, parallel to rule.targets (raw id on a miss). Absent for address/any target kinds. The ids in the rule remain the grant.

instruction_id
string
version
integer

The CURRENT version number (1 for a mandate that has never been amended). rule below is this version's rule — the one the gate governs on. Each version is immutable and independently signed; the full history is at GET /mandates/{mandate_id}/versions.

rule
object
valid_from
integer<int64>
valid_until
integer<int64>
approved_by_signer_id
string
approved_at
integer<int64>

Unix time of the §8 approval; absent until approved.

rejected_by_signer_id
string

The signer that cancelled the mandate while it was still pending (§8); absent otherwise.

revoked_by_signer_id
string

The signer that cancelled the mandate after activation (§8); absent otherwise.