Late-bind a session pubkey to an envelope that was created without one

MCP create_signing_envelope creates envelopes whose session_pubkey_jwk_json is NULL (an AI agent has no IndexedDB to keep a private key in). The first browser to open the resulting signing_url generates a non-extractable ECDSA P-256 keypair and POSTs the public JWK here. The handler UPDATEs the envelope row iff session_pubkey_jwk_json IS NULL (write-once, enforced by both the WHERE clause AND by trg_envelopes_session_update from migrations 0010 + 0011). Subsequent protected requests then carry the standard x-fsig-session-* headers. NOT required when the envelope was created via POST /api/envelopes directly — that call already binds the session.

post/api/envelopes/{envelope_id}/session-bind

Request

  • Base URL: https://free-sign.com
  • URL: https://free-sign.com/api/envelopes/{envelope_id}/session-bind
  • Auth: none declared

Path parameters

envelope_idstring required

Request body

session_pubkey_jwkobject required

ECDSA P-256 public key in JWK format. Must be kty=EC, crv=P-256, with x and y as 43-char base64url (32-byte coordinates). Must NOT contain the private d field.

Response

Session bound.

envelope_idstring required
session_pubkey_sha256string required
session_bound_atstring date-time required

Changes

No recorded changes to this operation across all 1 revision of this API.