Skip to main content
Every action that changes wallet state in Dakota — sending funds, attaching a signer group, modifying a policy — requires an endorsed request: a cryptographically signed declaration of intent. This guide explains the signing model end-to-end, documents every intent type, and walks through the full signer group and policy lifecycles.
If you haven’t set up a wallet yet, start with Non-Custodial Wallets first, then return here for the complete signing reference.

The Endorsed Request Model

An endorsed request wraps two things:
  1. An intent — a JSON object describing exactly what you want to do
  2. One or more signatures — ECDSA P-256 signatures (or WebAuthn assertions) proving that authorized signers approved the intent
Dakota’s policy engine re-canonicalizes the intent server-side and verifies each signature against the stored public keys of the signers allowed to authorize it. Then:
  • A transaction is checked against the wallet’s policies, including any approval threshold.
  • Every other intent is a governance change (to a signer group, a policy, a wallet’s signer groups or policies, or a signed destination). It needs signatures from the governance of the signer group that controls the resource, and at least as many distinct signers as that group’s governance quorum. The quorum is 1 by default. A group can set its own, and with governance enforcement on the default is 2 for a group whose governing group has 3 or more members. See Signer Group Governance.
Only then does the engine execute the action. This means:
  • You never send private keys — only signatures
  • The server cannot fabricate intents — every action has cryptographic proof of authorization
  • Multiple signers can co-approve — for a transaction, the signatures array accepts as many entries as the threshold rules in the wallet’s policies require (approval_threshold, or amount_threshold for an amount at or above its minimum); for a governance change, as many as the governance quorum requires; at most 100 signatures per request. A request with more is refused with 400 validation_error before any signature is checked: errors[0].field is signatures (code invalid_field_value) on a signer group member add, member removal or governance update and on a crypto destination, and endorsement.signatures elsewhere. Some requests are refused at fewer: card settlement enablement above 16 (400 invalid_request), and a wallet transaction above 16 on a wallet whose mandate or agent signer checks the signatures (403)

How Signing Works

Every signature follows the same three-step process, regardless of intent type.

Step 1: Build the Intent JSON

Create the intent object with the exact fields required for the operation. Field names are snake_case. Amounts are strings (e.g., "10.5", not 10.5). Omit any optional fields that don’t apply.
Sign the JCS canonicalization of exactly the intent JSON you send, no more and no less. The server rebuilds the intent from what it received and verifies your signature against that, so every field you submit must appear in the bytes you signed, including fields holding a zero. In particular, an add_policy_rule intent for an amount_threshold rule must carry min_amount in the signed intent even when it is 0; dropping it because the value looks empty produces a signature the server cannot match. The same applies to threshold: a hard-cap rule with threshold: 0 must carry threshold in the signed intent.

Step 2: Canonicalize with RFC 8785 (JCS)

RFC 8785 JSON Canonicalization Scheme produces a deterministic byte sequence from any JSON object by sorting keys alphabetically and removing insignificant whitespace. This ensures that your client and Dakota’s policy engine hash identical bytes, regardless of how your language orders JSON keys.

Step 3: Hash with SHA-256, Sign with ECDSA P-256

Hash the canonical bytes with SHA-256, then sign the hash using your ECDSA P-256 private key. The signature must be in ASN.1 DER encoding (not raw r || s), then base64-encoded.
This is the flow for ES256 signers. If your signer is a WebAuthn credential (key_type: WEBAUTHN) — a passkey or hardware authenticator — the signature is a WebAuthn assertion bundle rather than a DER signature over the hash, and the intent is carried as the assertion’s challenge. See WebAuthn & Passkey Signing.

Code Examples

Browser only: crypto.subtle.sign with ECDSA returns an IEEE P1363 raw r || s encoding, not ASN.1 DER. You must convert it before submitting — the rawEcdsaSignatureToDer helper above does this. Submitting the raw form will fail signature verification.

Intent Types Reference

Every endorsed request carries one of fourteen intent types. The table below lists all of them with their discriminator value, endpoint, and required fields. enable_card_settlement is signed by the governance of the signer group that the wallet’s customer policy names in signer_group_id (its members, or its governing group’s), at that group’s governance quorum. No approval threshold from the wallet’s policies applies. A key from another signer group attached to the wallet is refused. See Wallet enablement.
The last four intents are not sent as an intent object. Their endpoints take an ordinary request body plus signatures, and Dakota builds the intent from the path, the body and the X-Idempotency-Key header. You sign the intent Dakota will build, so it must match field for field:
  • idempotency_key is the X-Idempotency-Key header of the request, verbatim. It must be a lowercase UUID; an uppercase one is refused with 400, because the signed intent carries the header exactly as sent. Generate the key first, put it in the intent, sign, then send the same value in the header.
  • For the three signer group intents, signer_group_version is the group’s current version (read it with GET /signer-groups/{signer_group_id}). It is always in the intent, even when it is 0. create_crypto_destination has no version.
  • Numbers stay numbers ("signer_group_version": 3, not "3").

Send Transaction

Send crypto from a wallet. This is the only intent type without a type discriminator field.
The operation.kind field determines which sub-fields are required: A contract call carries the whole call in data: the ABI-encoded calldata (function selector and arguments), starting with a lowercase 0x and decoding to 4 to 32768 bytes. to is the contract address. The call moves no funds, so it has no amount or asset_id, and caip2 must be an EVM chain (eip155:<chain id>). method and args are not supported: an intent that carries them is refused with 400.
The wallet’s policies apply to contract calls too. A contract call is allowed only by a contract_call_allowlist rule that lists it, and an address_list allow-list on the wallet also denies it unless the allow-list sets deny_contract_calls: false; see Policies — address_list.
Amounts are strings ("10.5", not 10.5). The caip2 field uses CAIP-2 chain identifiers (e.g., eip155:1 for Ethereum mainnet, eip155:11155111 for Sepolia).

Attach Signer Group to Wallet

Detach Signer Group from Wallet

Attach Policy to Wallet

policy_version is optional. Send the policy’s current version (from GET /policies/{policy_id}) so the signatures approve the rules the signers saw: if the policy changes before the request lands, it is refused with 409 stale_policy_version and the policy is not attached. Leave it out and the intent is signed and checked exactly as before. See Signatures can be tied to the policy version.

Detach Policy from Wallet

policy_version is optional here too, and works the same way: a detach signed at an old version is refused with 409 stale_policy_version and the policy stays attached.

Add Policy Rule

Available rule types:

Remove Policy Rule

Update Policy Rule

updated_definition is a JSON string, not a nested object. Serialize the definition object to a string before including it in the intent.An update replaces the definition outright, so send a complete one — anything you leave out is gone from the rule. Keys outside the rule type’s schema are rejected. The accepted shapes:
  • approval_threshold: {"threshold": int32 (> 0), "description"?: string}
  • amount_threshold: {"min_amount": int64 (>= 0), "threshold": int32 (>= 0), "asset": {"id"}}. The threshold key is required, even when it is 0. 0 is valid only when the stored rule’s action is deny.
  • address_list: {"addresses": [string], "match"?: "recipient_only" | "any_involved", "deny_contract_calls"?: bool}. On an allow rule, addresses may be empty (the rule then blocks every payment, and contract calls and typed-data signatures while deny_contract_calls is on), match must be recipient_only or left out, and deny_contract_calls defaults to true when left out. On a deny rule, addresses must not be empty. Because the update replaces the definition, leaving out match or deny_contract_calls resets it to the default. See Policies — address_list.
For an amount_threshold update, asset.id is the only asset field you need to send. The rest of the asset identity — network, contract address, token standard, decimals — describes the asset rather than the rule, and the server restores whatever the stored rule already recorded for that asset.

Delete Policy

Signed by the governance of the policy’s signer group. What happens to a policy that is still attached to a wallet depends on your team:
  • With governance enforcement on, the delete is refused with 409 and reason policy_attached, and nothing changes. params.wallet_ids lists up to 20 of the wallets that still hold the policy and params.wallet_count gives the total; GET /policies/{policy_id}/wallets lists them all. Detach it from each of them first with Detach Policy from Wallet (DELETE /policies/{policy_id}/wallets/{wallet_id}), which needs the wallet’s governance as well as the policy’s (see Who signs). Then send the delete again with a new idempotency key and new signatures: the refusal is kept for the old key. Deleting a policy that no wallet holds works as before, signed by its signer group’s governance at its quorum; too few signatures is 403 insufficient_endorsements. If Dakota cannot read whether enforcement is on, it treats the delete as enforced.
  • With governance enforcement off, the delete also detaches the policy from every wallet that holds it.
Deleting a policy is irreversible. With governance enforcement off, it also removes the policy’s rules from every wallet it was attached to, so check which wallets hold it with GET /policies/{policy_id}/wallets first.
With governance enforcement on, a policy whose signer group is one Dakota manages (for payment agents or card settlement) cannot be deleted: the delete is refused while a wallet holds it, and once it is detached no group can sign for it. It stays as an inactive record that governs nothing.

Add Signers to Group

Adds a member to a signer group. Signed by the group’s governance, as it was before the addition: the new key cannot endorse its own addition.
  • new_member_keys is a list holding exactly one key: the member_key you send in the body, as registered with POST /signers. Adding a key that is already a member returns 409.
  • signer_group_id is the {signer_group_id} of the path.
Request: POST /signer-groups/{signer_group_id}/signers with header X-Idempotency-Key: 3f1c2b7e-8d4a-4f6e-9b2c-1a7d5e9f0c3b and body:

Remove Signers from Group

Removes one or more members. Signed by the group’s governance.
  • The key is group_id here, not signer_group_id.
  • members_to_remove holds public keys as the group lists them, in the order you send them in the body. Order matters: the list is not sorted before signing.
Request: POST /signer-groups/{signer_group_id}/signer-removals with header X-Idempotency-Key: 7a0e4c1d-2b3f-4e5a-8c6d-9f0b1a2c3d4e and body:
A removal that would leave the group below a threshold it must keep is refused with 422 below_threshold: at least one member, enough endorsers for its governance quorum, and enough endorsers for any group it governs. A policy’s approval_threshold does not block a removal; a policy left unmeetable refuses transactions until you add a member.

Update Signer Group Governance

Sets who governs a group and how many of them must agree. Signed by the group’s current governance.
  • The body replaces the group’s whole governance. A field you leave out is cleared: no governance_threshold means the default quorum, and no governance_signer_group_id means the group governs itself.
  • A field you leave out of the body is also left out of the signed intent, never sent as null. To clear both settings, sign {"idempotency_key", "signer_group_id", "signer_group_version", "type"} only.
  • governance_threshold is at least 1 and at most the number of members of the governing group (or the group itself) who can sign governance changes.
  • governance_signer_group_id is another signer group of your team: not the group itself, not a group Dakota manages, and not a group that is itself governed. A group that governs other groups cannot be given a governing group.
  • The result must leave a quorum someone can meet. Settings that break these rules are refused with 400.
Request: PATCH /signer-groups/{signer_group_id}/governance with header X-Idempotency-Key: c5d6e7f8-0a1b-4c2d-8e3f-4a5b6c7d8e9f and body:

Create Crypto Destination

An optional signed form of POST /recipients/{recipient_id}/destinations for a crypto destination. Governance enforcement does not require it: a Full access key can add a crypto destination without signatures, with enforcement on or off. With enforcement on, the signed form lets an Operate API key add a destination that the signer group’s governance approved (see Governance enforcement).
  • address is the body’s crypto_address, and recipient_id is the {recipient_id} of the path.
  • network_id is required when you send signatures, because the signed intent names it.
  • signer_group_id must be attached to a wallet of the recipient’s customer; otherwise the request is refused with 403 insufficient_endorsements. Send it in the body next to signatures.
  • The signatures are checked only when the destination is created; they are ignored on an update.
  • Each signed approval creates one destination. Use a new X-Idempotency-Key, and new signatures over it, for every destination; an approval that was already used is refused.
Customers without a wallet. With governance enforcement on, an Operate key can add a crypto destination only with signatures from a signer group attached to one of the recipient’s customer’s wallets. If the customer has no wallet, no signer group can approve the destination, and the request is refused with 403 insufficient_endorsements. Two ways round it:
  • Add the destination with a Full access key or from the dashboard. Neither needs signatures.
  • Create a wallet for the customer first, with one of your existing signer groups (POST /wallets with the customer’s customer_id and the group in signer_groups; an Operate key can do this). Then have that group’s governance sign the destination.

Signer Group Governance

A governance change is every intent except a transaction: member changes, governance updates, attaching or detaching signer groups and policies, policy rule changes, card settlement enablement and signed destinations. Each one must be signed by the governance of the signer group that controls the resource, at that group’s quorum.

Who signs

A signer group is governed by its own members, unless it names another signer group of your team in governance_signer_group_id. Then the members of that governing group sign the group’s governance changes, and the group’s own members cannot. Which group’s governance applies depends on the intent: When several groups must sign, put all their signatures in one signatures array: they all sign the same intent. Signer groups that Dakota manages for payment agents and card settlement never govern: “every signer group on the wallet” means every group except those, and when a policy’s own signer group is one Dakota manages, the signer groups of the wallets it concerns sign instead.
Keep governing groups simple. A governing group should govern itself: a group that is deleted, managed by Dakota, or itself governed by another group cannot govern, and the groups it governs could then never change.

How many: the quorum

GET /signer-groups/{signer_group_id} returns the group’s governance: effective_governance_threshold is:
  1. governance_threshold, when you set one with Update Signer Group Governance; otherwise
  2. the default: 1, or 2 when your team has governance enforcement on and the governing group (the group itself, when it governs itself) has 3 or more members;
  3. for the default only, capped at the number of members who can sign governance changes, and never below 1. A governance_threshold you set stands as set.
Each signature must come from a different member who can sign. Two signatures from the same key, a signature that does not verify, or more signatures than there are such members, and the whole request is refused. Keys of payment agents and card settlement signers are members for spending only: they never count toward a governance quorum, and a governance change signed by one of them is refused. A group’s governance quorum is separate from the approval_threshold of its policies, which applies to transactions only.

Signatures are tied to the group version

add_signers_to_group, remove_signers_from_group and update_signer_group_governance sign over signer_group_version. Once a membership change or governance settings update lands, the version moves on and every signature made over the old version is refused with 409 stale_signer_group_version: read the group again and sign again. Sending the same request again with the same idempotency key within 24 hours of a successful response returns that response and changes nothing. A refusal from the policy engine (403 insufficient_endorsements, 409 stale_signer_group_version, 409 stale_policy_version, 409 policy_attached, and the passkey checks 400 webauthn_wrong_type and 400 webauthn_user_not_present) is kept for the same 24 hours and returned again for that key, and the same key with a different request, such as one with more signatures, is refused as a different request. So to retry such a refusal, prepare the change again with a new idempotency key and collect every signature again. Other refusals, such as 400 endorsement_required and a malformed X-Idempotency-Key, are not kept: fix the request and send it again. A signature cannot be reused under a new X-Idempotency-Key, because the key is part of what was signed.

Signatures can be tied to the policy version

A policy attach or detach (attach_policy_to_wallet, detach_policy_from_wallet) can sign over the policy’s version. Without it, the signatures name only the wallet and the policy, so they still apply if the policy’s rules change after the signers approved it: a policy’s own signer group could loosen the rules between the wallet owners’ signatures and the request landing.
  1. Read the policy with GET /policies/{policy_id} and take its version. The version starts at 1 and normally only rises: with every rule change (added, updated or removed), and when the policy’s endorser scope, signer group or client changes.
  2. Show the signers the policy’s rules at that version, and put the same number in the intent’s policy_version. It is part of the canonical JSON, a JSON number between policy_id and type in key order. A value below 1 is refused with 400.
  3. Send the request with the same policy_version in its intent.
If the policy’s version is still the one signed, the attach or detach goes ahead. If the policy changed in the meantime, it is refused with 409 stale_policy_version and nothing changes: read the policy again, check its rules, and sign again with a new idempotency key. Don’t resend the old signatures: under the same idempotency key, the same refusal comes back for 24 hours. The check also holds when a rule change lands while the attach or detach is being processed. Sign over a version you have just read, and send the request soon after the signatures are collected. Don’t keep signatures to send later. In rare cases Dakota restores a policy to an earlier version, for example when it undoes a change it made to the policy’s signer group. A version number that was used before can then come back later with different rules, and a signature kept from the earlier time would match it. policy_version is optional, with governance enforcement on or off. Leave it out and the request is signed and checked exactly as before, so existing integrations keep working. The Go and TypeScript SDKs build the canonical JSON with it.

Governance enforcement

We plan to make governance enforcement the default for all clients. Today it is off unless Dakota turns it on for your team, so build and test your integration as if it is on. In practice: collect signatures from signer group members for signer group, policy and wallet changes; manage API keys and users from a signed-in session, not with an API key; give your servers Operate keys that pass along those signed changes; and handle insufficient_endorsements and retry 503 responses, such as check_unavailable.
Governance enforcement is a switch on your team, off by default. Contact Dakota to turn it on. With it on:
  • Every member change must be signed. POST /signer-groups/{signer_group_id}/signers without signatures, and DELETE /signer-groups/{signer_group_id}/signers/{signer_id}, are refused with 400 endorsement_required.
  • A group whose governing group has 3 or more members needs 2 signatures by default instead of 1 (fewer only when fewer of those members can sign governance changes).
  • Attaching or detaching a signer group needs the governance of every signer group on the wallet. A signer group whose governance could never be met cannot be attached.
  • Attaching or detaching a policy (attach_policy_to_wallet, detach_policy_from_wallet) needs the governance of the policy’s signer group, and the governance of every signer group attached to the wallet except groups Dakota manages for payment agents and card settlement. Each of these groups must reach its own effective_governance_threshold. A member of several of these groups counts toward each of them with one signature. Send all signatures in one signatures array; a signature from a key that belongs to none of these groups refuses the whole request with 403 insufficient_endorsements.
  • Changing a rule (add_policy_rule, update_policy_rule, remove_policy_rule) on a policy that wallets hold needs the governance of every signer group on every one of those wallets, except groups Dakota manages for payment agents and card settlement, as well as the policy’s, each at its own quorum, in one signatures array. This holds for every rule change, including one that only tightens the policy: whoever governs only the policy cannot change the rules of a wallet it does not govern. A policy no wallet holds needs only its own signer group. To change a policy shared by wallets with different owners, collect every owner’s signatures, or detach the policy from the wallets first.
  • A policy that is still attached to a wallet cannot be deleted; detach it first. See Delete Policy.
  • An API key cannot create or replace an x402 spend mandate (POST /payment-agents/{payment_agent_id}/x402/mandates); it is refused with 400 endorsement_required and nothing changes, so a leaked key cannot set or raise an agent’s x402 budget. A signed-in team member whose role can create and approve mandates can still create one. If Dakota cannot confirm whether enforcement is on, the key’s request is refused with a retryable 503. Listing and cancelling mandates, and paying under a mandate already in force, are unchanged, and mandates created before enforcement was turned on stay in force: review them and cancel any you did not intend.
  • API keys cannot manage API keys or users. Creating or changing a key (POST /api-keys, PATCH /api-keys/{api_key_id}), rotating another key, and inviting, changing or removing a user (POST /users, PATCH /users/{user_id}, DELETE /users/{user_id}) are refused with 403 and reason session_required, whatever the key’s scope, so a leaked key cannot create a key or invite an admin. Do these as a team member signed in to Dakota. A key can still rotate itself, and deleting a key with an API key works as before. If Dakota cannot confirm whether enforcement is on, the key’s request is refused with a retryable 503 check_unavailable.
  • An Operate API key may submit a governance change that carries the required signatures: signed member changes, governance updates, signer group and policy attachments, policy rule changes, policy deletion and signed crypto destinations. The signatures authorize the change; the key only delivers it. The same request without the signatures is refused with 403 Forbidden, not 400 endorsement_required, because the key’s scope is checked first. Without enforcement, these endpoints need a Full access key, and an Operate key is refused with 403 even when the request is signed.
Governance enforcement does not require signatures to add a recipient or a destination. Use Operate keys for day-to-day operations. Keep Full access keys out of everyday systems: a Full access key can add recipients and destinations without signatures, and it can create signers, signer groups and wallets. See API Key Scopes.
Before turning it on, Dakota checks every signer group on your live wallets. If a group’s governance could never be met under enforcement (for example, it has fewer members who can sign than its quorum), the switch stays off until you fix that group. Turning enforcement off again needs a Dakota administrator; an API key cannot do it. Even with enforcement off, a group that has governance_threshold or governance_signer_group_id set, or that governs another group, takes member changes only when signed.

A signed change runs once

A signed governance change (a signer group, policy or wallet-attachment intent, a policy rule change or delete, or a card settlement enablement) can run only once, with or without enforcement. Within 24 hours, resending it with the same idempotency key returns the stored response, as described above. After that, the same signed intent is refused with 409 (problem type conflict, reason and code endorsement_already_used, detail this endorsement has already been used; sign a new intent) and nothing changes. An intent also counts as used when an earlier attempt with it failed after all its signatures verified, for example one refused for too few signatures or one that timed out and may have landed, so this refusal does not always mean the change ran: read the resource to see where it stands. A card settlement enablement for a wallet whose enablement is already active is answered before the signatures are checked and never gets this refusal: it returns 200 with the current enablement, or card-enablement-conflict when the settlement destination Dakota has configured differs from the recorded one, or card-spend-option-conflict when the requested spend option differs from the recorded one. Branch on code, not on detail. To make the same change again, build a new intent with a new idempotency key and collect the signatures again.

Errors

Governance refusals are application/problem+json responses whose reason (and code) is one of: The two passkey reasons come with status 400 and the validation-error problem type, except on a mandate approval, cancellation or amendment, where the problem type is invalid-request (see Signing with a passkey); as in every row above, reason and code carry the same value. The errors page has an entry for each reason. A 400 saying X-Idempotency-Key must be a lowercase UUID means the header held uppercase letters; send it in lowercase and sign that same value. Policy changes and wallet attachments keep their earlier error while nothing about them is governed (enforcement off, and no governance settings on the groups involved): a signature that fails is a 400 validation error on endorsement.signatures, as described under Troubleshooting. Once governance applies, the same failure is 403 insufficient_endorsements.

Signer Group Lifecycle

A signer group controls who can authorize wallet actions. Here is the complete lifecycle from creation through teardown.

Step-by-step

Before detaching a signer group, ensure the wallet has at least one other signer group attached, or the wallet will become unusable — no one will be able to sign transactions for it.
Adding and removing signers (steps 3 and 7) are signed by the group’s governance and tied to its version:
  • Add: send signatures and signer_group_version with member_key. Without them, the member is added unsigned; that is refused with 400 endorsement_required when your team has governance enforcement on, the group has governance settings (governance_threshold or governance_signer_group_id), or the group governs another group.
  • Remove: use POST /signer-groups/{id}/signer-removals, which takes signatures. The older DELETE /signer-groups/{id}/signers/{signer_id} takes none, so it refuses those same groups with 400 endorsement_required; it still works only for a group with no governance settings that governs no other group, while enforcement is off.
  • Each change raises the group’s version by 1, so read the group again before signing the next one.

Policy Lifecycle

Policies define automated governance rules for wallets — approval thresholds, amount limits, address allowlists, and more. Here is the complete lifecycle.

Step-by-step

Deletion order matters under governance enforcement. With enforcement on, deleting a policy that is still attached to a wallet is refused with 409 policy_attached: detach it from every wallet first. With enforcement off, the delete detaches it from every wallet itself. See Delete Policy.

Troubleshooting

Signature Verification Failed

Threshold Not Met

Signer Not Authorized

Key Format Errors