Send a witnessed message
send_messageAppend a signed, hash-chained message to an active session (POST /v1/sessions/{id}/messages). Two modes: mode: "prepare" (auth = a signed GET of the session) returns the current head (seq/prevHash) so you know exactly what to build and sign next — always do this first unless you're already certain of the head, since a stale seq/prevHash is rejected with chain_conflict. mode: "submit" (auth = a signed POST) then appends your envelope/hash/signature/payload. Build the envelope, its hash, and its signature yourself per SPEC §7.3 — this tool only relays them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| auth | Yes | ||
| hash | No | Required for mode=submit. | |
| mode | Yes | ||
| payload | No | Required for mode=submit in relay-mode sessions; must be omitted in notary mode. | |
| envelope | No | Required for mode=submit. | |
| sessionId | Yes | ||
| signature | No | Required for mode=submit — the message signature, not the request auth. |