View as Markdown

Mandate · API reference

Agreements

Two parties confirming the same document with a passkey.

Related guide: Two-sided agreements

The agreement object

Attributes

idstringRequired
Unique identifier for the object.
objectenumRequired
The type of object. One of agreement.
content_hashstring
SHA-256 of the document.
content_descriptionstring
A description of the document.
modestring
The mode in effect.
statusstring
The object's current status.
partiesarray of objects
The parties, in signing order.
Show child attributes
party_idstringRequired
The party's ID.
labelstringRequired
A short human-readable label.
statusstringRequired
The object's current status.
signed_atany | nullRequired
When the party signed.
tierany | nullRequired
The verified tier.
expires_atstring
When it expires.
created_atstring
When it was created.
completed_atany | null
When every party had signed.
signing_linksarray of objects
Each party's signing link. Returned once, at creation.
Show child attributes
party_idstringRequired
The party's ID.
labelstringRequired
A short human-readable label.
urlstringRequired
A URL.
overall_statusstring
The overall status, the worst of its parts.
partyobject
The party.
Show child attributes
party_idstringRequired
The party's ID.
labelstringRequired
A short human-readable label.
statusstringRequired
The object's current status.
other_partiesarray of objects
The other parties, by label and status.
Show child attributes
labelstringRequired
A short human-readable label.
statusstringRequired
The object's current status.
sign_challengestring
The challenge this party signs with their passkey.
can_signboolean
Whether this party can sign now.
party_statusstring
This party's status.
waiting_for_otherboolean
Whether this party is waiting for the other to sign first.
consentobject
The consent text the approver accepts.
Show child attributes
draftbooleanRequired
Whether the consent text is a draft.
versionstringRequired
The version number.
markerstringRequired
The DRAFT marker shown with the consent text.
disclaimerstring
What the agreement proves and what it doesn't.
receipt_urlstring
A link to the completion receipt.

The agreement object

{
  "id": "agr_01M6VQBCKJRJDMXHNTHJM1YWY7",
  "object": "agreement",
  "content_hash": "f7fc850029ac065767a610de3fb0f55a1b27b15cf4e5316c20af995a91574505",
  "content_description": "Services agreement v3",
  "mode": "parallel",
  "status": "pending",
  "parties": [
    {
      "party_id": "pty_01M6VQBCKJPFR7PFY8MF628ERM",
      "label": "Provider",
      "status": "pending",
      "signed_at": null,
      "tier": null
    },
    {
      "party_id": "pty_01M6VQBCKJZ08BW431ZMT1X0JE",
      "label": "Client",
      "status": "pending",
      "signed_at": null,
      "tier": null
    }
  ],
  "expires_at": "2026-11-14T19:21:46.354Z",
  "created_at": "2026-11-07T19:21:46.354Z",
  "completed_at": null,
  "signing_links": [
    {
      "party_id": "pty_01M6VQBCKJPFR7PFY8MF628ERM",
      "label": "Provider",
      "url": "http://localhost:5173/sign/YWdyXzAxTTZWUUJDS0pSSkRNWEhOVEhKTTFZV1k3fnB0eV8wMU02VlFCQ0tKUEZSN1BGWThNRjYyOEVSTX4xNzk0Njg0MTA2.nr3vFNYbvFWS4Ff9dN730J5EIYvh-DwxMAQNpFYbFAM"
    },
    {
      "party_id": "pty_01M6VQBCKJZ08BW431ZMT1X0JE",
      "label": "Client",
      "url": "http://localhost:5173/sign/YWdyXzAxTTZWUUJDS0pSSkRNWEhOVEhKTTFZV1k3fnB0eV8wMU02VlFCQ0tKWjA4Qlc0MzFaTVQxWDBKRX4xNzk0Njg0MTA2.yhYnf4yUKyeTxXsv4wZIwfi1w3mNkIzRfbIgPSuwf3E"
    }
  ]
}

Events

Sent to your webhook endpoints when they subscribe:

  • mandate.agreement.completed
  • mandate.agreement.declined

Create an agreement

POST/v1/mandate/agreements

Creates an agreement over a document's SHA-256 hash, with a signing link per party. Each party confirms with a passkey over the hash and their role. The document itself is never sent.

Parameters

Idempotency-Keystringheader
Retry a create safely: the same key + request returns the stored response (24 h, per caller).
content_hashstringRequired
sha-256 hex of the canonicalized document.
content_descriptionstringRequired
A description of the document.
partiesarray of objectsRequired
The parties, in signing order.
Show child attributes
labelstringRequired
A short human-readable label.
emailstring
An email address.
phonestring
The party's phone number, to send the link by SMS.
modeenum
The mode in effect. One of parallel, sequential.
expires_in_hoursinteger
How long the agreement stays open, in hours.

Returns

The agreement, with a signing link for each party. See the agreement object.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -X POST "$PROVENANCE_API/v1/mandate/agreements" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content_hash": "f7fc850029ac065767a610de3fb0f55a1b27b15cf4e5316c20af995a91574505",
    "content_description": "Services agreement v3",
    "mode": "parallel",
    "parties": [
      {
        "label": "Provider",
        "email": "ops@brindlecote.example"
      },
      {
        "label": "Client",
        "email": "legal@acme.example"
      }
    ]
  }'

Response 201

{
  "id": "agr_01M6VQBCKJRJDMXHNTHJM1YWY7",
  "object": "agreement",
  "content_hash": "f7fc850029ac065767a610de3fb0f55a1b27b15cf4e5316c20af995a91574505",
  "content_description": "Services agreement v3",
  "mode": "parallel",
  "status": "pending",
  "parties": [
    {
      "party_id": "pty_01M6VQBCKJPFR7PFY8MF628ERM",
      "label": "Provider",
      "status": "pending",
      "signed_at": null,
      "tier": null
    },
    {
      "party_id": "pty_01M6VQBCKJZ08BW431ZMT1X0JE",
      "label": "Client",
      "status": "pending",
      "signed_at": null,
      "tier": null
    }
  ],
  "expires_at": "2026-11-14T19:21:46.354Z",
  "created_at": "2026-11-07T19:21:46.354Z",
  "completed_at": null,
  "signing_links": [
    {
      "party_id": "pty_01M6VQBCKJPFR7PFY8MF628ERM",
      "label": "Provider",
      "url": "http://localhost:5173/sign/YWdyXzAxTTZWUUJDS0pSSkRNWEhOVEhKTTFZV1k3fnB0eV8wMU02VlFCQ0tKUEZSN1BGWThNRjYyOEVSTX4xNzk0Njg0MTA2.nr3vFNYbvFWS4Ff9dN730J5EIYvh-DwxMAQNpFYbFAM"
    },
    {
      "party_id": "pty_01M6VQBCKJZ08BW431ZMT1X0JE",
      "label": "Client",
      "url": "http://localhost:5173/sign/YWdyXzAxTTZWUUJDS0pSSkRNWEhOVEhKTTFZV1k3fnB0eV8wMU02VlFCQ0tKWjA4Qlc0MzFaTVQxWDBKRX4xNzk0Njg0MTA2.yhYnf4yUKyeTxXsv4wZIwfi1w3mNkIzRfbIgPSuwf3E"
    }
  ]
}

Retrieve an agreement

GET/v1/mandate/agreements/{id}

Returns an agreement with each party's status.

Parameters

idstringpathRequired
The object's ID.

Returns

The agreement, with each party's status. See the agreement object.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/mandate/agreements" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content_hash": "f7fc850029ac065767a610de3fb0f55a1b27b15cf4e5316c20af995a91574505",
    "content_description": "Services agreement v3",
    "mode": "parallel",
    "parties": [
      {
        "label": "Provider",
        "email": "ops@brindlecote.example"
      },
      {
        "label": "Client",
        "email": "legal@acme.example"
      }
    ]
  }' > step.json
export AGREEMENT_ID=$(jq -r '.id' step.json)
export SIGN_URL=$(jq -r '.signing_links[0].url' step.json)
curl "$PROVENANCE_API/v1/mandate/agreements/$AGREEMENT_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "id": "agr_01M6VQBCKK1A11DP42VAM0P5WS",
  "object": "agreement",
  "content_hash": "f7fc850029ac065767a610de3fb0f55a1b27b15cf4e5316c20af995a91574505",
  "content_description": "Services agreement v3",
  "mode": "parallel",
  "status": "pending",
  "parties": [
    {
      "party_id": "pty_01M6VQBCKKH2ZGTQA40MD5JMKJ",
      "label": "Provider",
      "status": "pending",
      "signed_at": null,
      "tier": null
    },
    {
      "party_id": "pty_01M6VQBCKKD2W3HHXKG7EBQDSG",
      "label": "Client",
      "status": "pending",
      "signed_at": null,
      "tier": null
    }
  ],
  "expires_at": "2026-11-14T19:21:46.355Z",
  "created_at": "2026-11-07T19:21:46.355Z",
  "completed_at": null
}

Get an agreement receipt

GET/v1/mandate/agreements/{id}/receipt

Returns the completion receipt, an ES256 JWS over the agreement and each party's signing evidence, once every party has signed.

Parameters

idstringpathRequired
The object's ID.

Returns

The receipt, its signed token and a link to verify it.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl "$PROVENANCE_API/v1/mandate/agreements/agr_01M5Q2KJMKC7J3XJPD6BEYMFGB/receipt" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "object": "receipt",
  "id": "rcpt_a763dae0d5d6852156a1846ac45e5f21",
  "claims": {
    "receipt_id": "rcpt_a763dae0d5d6852156a1846ac45e5f21",
    "type": "agreement_completion",
    "agreement_id": "agr_01M5Q2KJMKC7J3XJPD6BEYMFGB",
    "content_hash": "9f2c4e6a8b0d1f3e5a7c9b1d3f5e7a9c0b2d4f6e8a1c3b5d7f9e0a2c4b6d8f1e",
    "content_description": "Master services agreement v3, Brindlecote and Fallowmere",
    "mode": "parallel",
    "status": "completed",
    "completed_at": "2026-10-24T22:52:10.410Z",
    "parties": [
      {
        "party_id": "pty_01M5Q2KJMKVY6QJKSJXEA6T7VB",
        "label": "Brindlecote (buyer)",
        "status": "signed",
        "signed_at": "2026-10-24T22:40:12.004Z",
        "tier": "sep"
      },
      {
        "party_id": "pty_01M5Q2KJMKXR3W9D2T8N6F4C1A",
        "label": "Fallowmere (supplier)",
        "status": "signed",
        "signed_at": "2026-10-24T22:52:10.410Z",
        "tier": "strongbox"
      }
    ],
    "iss": "https://provenanceauth.com"
  },
  "token": "eyJhbGciOiJFUzI1NiIsInR5cCI6InByb3ZlbmFuY2UtcmVjZWlwdCtqd3QifQ.eyJyZWNlaXB0X2lkIjoi…",
  "verify_url": "https://app.provenanceauth.com/developers/verify?receipt=eyJhbGciOiJFUzI1NiIsInR5cCI6InByb3ZlbmFuY2UtcmVjZWlwdCtqd3QifQ.eyJyZWNlaXB0X2lkIjoi…"
}

List agreements

GET/v1/mandate/agreements

Lists your account's two-sided agreements.

Parameters

No parameters.

Returns

The account's agreements.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl "$PROVENANCE_API/v1/mandate/agreements" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "object": "list",
  "data": [],
  "has_more": false,
  "next_cursor": null
}

Was this page helpful? Send us feedback

LLM? Read llms.txt.