Skip to main content
PATCH
Create, update, or remove a Rule on a signer-Layer

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

environmentId
string
required

ID of the environment

Required string length: 36
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Example:

"95b11417-f18f-457f-8804-68e361f9164f"

walletId
string
required

UUID of the wallet

Required string length: 36
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Example:

"95b11417-f18f-457f-8804-68e361f9164f"

Body

application/json
op
enum<string>
required

The per-Rule operation to apply to the wallet-Layer, batch to apply multiple operations atomically in one enclave cycle, or replace to set the Layer's full Rule list

Available options:
upsert,
remove,
batch,
replace
rule
object
declarativeRule
object

A Rule authored in the policy rule language, evaluated by the engine as stored rather than compiled from WaasPolicyRule. Shares identity and authorship with a legacy Rule so the Layer machinery — deletion markers, authorship stamping, the edit guard — keys on the same fields and needs no second code path for anything but evaluation. A Layer holds one syntax or the other: a write that would leave both in one Layer is refused.

ruleId
string
Required string length: 36
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Example:

"95b11417-f18f-457f-8804-68e361f9164f"

operations
object[]

Only used when op is batch — applied atomically in one enclave cycle

Required array length: 1 - 100 elements
rules
object[]

Only used when op is replace — the Layer's full Rule list, in either syntax. A declarative Rule sent without a ruleId is given one. Only admins and business-account admins may replace.

Maximum array length: 200
intent
object

The initiator's proposal, signed with their session key. Built by the API, not the client — sign these exact bytes verbatim, because re-serializing can change them and invalidate the signature. autoExecute is inside the signed bytes, so an approver consents to it and nothing can flip it afterwards.

intentSignature
string

Hex-encoded ECDSA P-256 signature over the canonicalized payload, produced by the signer's session key — which never leaves their device, so consent cannot be given on their behalf. Exactly 128 hex characters. WebCrypto emits the raw r‖s form with both halves padded to 32 bytes, so unlike DER the length never varies. Constrained here so a malformed value is a 400 at the edge rather than an enclave round trip that returns INTENT_SIGNATURE_INVALID, and so an unbounded string cannot be persisted against a proposal.

Pattern: ^[0-9a-fA-F]{128}$
proposalId
string

The approved updatePolicyLayer proposal to redeem. Resend the same update with it; the stored proposal is what runs, and intent and intentSignature are not needed.

Required string length: 36
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Example:

"95b11417-f18f-457f-8804-68e361f9164f"

shareSetId
string

Targets a share set other than the caller's own, as returned in the wallet's shareSetId or otherShareSets. Omit to target the caller's own active share set. A share set's id changes when the wallet's shares are refreshed or reshared; Rules are unaffected by that rotation, so re-read the wallet's share sets to get the current id.

Required string length: 36
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Example:

"95b11417-f18f-457f-8804-68e361f9164f"

Response

Signer-Layer updated successfully

layerId
string
required

Unique identifier for the wallet-Layer

layerContent
object
required

The decrypted, mutated wallet-Layer document

updatedAt
string<date-time>
required

ISO 8601 timestamp of when the wallet-Layer was last updated

message
string

Message describing the operation result

translatedFromLegacy
boolean

True when legacy rules are translated for this response without saving them.

translationWarnings
object[]

What the translation left out or could not translate.