propertrustpropertrust
PROGRAMISTOJ

API kaj MCP

Ĉio, kion vi povas fari en la panelo de ProperTrust krom subskribi, por viaj propraj sistemoj kaj por AI-agentoj: tempostampi dosierojn en Bitcoin, verki kontraktojn el biblioteko de klaŭzoj, komenci subskribajn rondojn, sekvi ilin ĝis kompletiĝo kaj kontroli pruvojn.

Rapida komencoMCPRegulojKontoBibliotekoInterkonsentojDokumentoj kaj pruvojTelegramEraroj kaj limoj

Rapida komenco

1. Ensalutu kaj kreu ŝlosilon sub API kaj MCP en la panelo. Ŝlosilo komenciĝas per pt_live_ kaj estas montrata unufoje. Malfermi la paĝon de ŝlosiloj

2. Sendu ĝin kiel bearer-ĵetonon kun ĉiu alvoko.

curl https://api.propertrust.com/v1/me \
  -H "Authorization: Bearer pt_live_…"

3. Tempostampu dosieron: la enhavo estas konservata ĉifrite, ĝia SHA-256 estas ankrita en Bitcoin.

curl -X POST https://api.propertrust.com/v1/documents \
  -H "Authorization: Bearer pt_live_…" \
  -F title="Board minutes 26 November" -F file=@minutes.pdf

4. Komencu subskriban rondon el via propra teksto. Ĉiu "## Titolo" fariĝas klaŭzo, kiun la partioj agnoskas unu post la alia antaŭ ol subskribi.

curl -X POST https://api.propertrust.com/v1/agreements \
  -H "Authorization: Bearer pt_live_…" -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-10482" \
  -d '{"title":"Purchase of Product X",
       "wording":"## 1. Subject\nThe Seller sells Product X to the Buyer for CHF 1200.\n\n## 2. Delivery\nWithin 14 days.",
       "parties":[{"name":"Jane Buyer","email":"jane@example.com","role":"Buyer"}]}'

La respondo enhavas la id, la haketon de la PDF, la kontrolkodon kaj aliĝligilon por ĉiu invitita partio. Demandu GET /agreements/{id} ĝis la stato estas completed.

La kompleta gvidilo por agentoj kaj programistoj troviĝas ĉe https://api.propertrust.com: kiel kontraktoj eniras, kiel ili atingas la partiojn, kiuj subskriboj revenas, kiu vidas kion, kaj kiam la Telegram-roboto ekagas.

Baza URL: https://api.propertrust.com/v1 · OpenAPI 3.1: https://api.propertrust.com/openapi.json · Por lingvomodeloj: https://api.propertrust.com/llms.txt

MCP: konekti AI-agenton

ProperTrust estas servilo de Model Context Protocol. Agento konektita per unu el viaj ŝlosiloj ricevas ĉiun operacion de ĉi tiu paĝo kiel ilon, nomitan kun la prefikso pt_. Ĝi agas kiel via konto kaj ene de la amplekso de la ŝlosilo; la listo de iloj, kiun ĝi vidas, jam estas filtrita laŭ tiu amplekso.

Finpunkto: https://api.propertrust.com/mcp · Transporto: Streamable HTTP (JSON-RPC 2.0 per POST, senstata)

claude mcp add --transport http propertrust https://api.propertrust.com/mcp \
  --header "Authorization: Bearer pt_live_…"
{
  "mcpServers": {
    "propertrust": {
      "type": "http",
      "url": "https://api.propertrust.com/mcp",
      "headers": { "Authorization": "Bearer pt_live_…" }
    }
  }
}

Klientoj, kiuj povas lanĉi nur lokajn servilojn, atingas la finpunkton per la ponto mcp-remote; la ŝlosila paĝo en la panelo montras la pretan agordon.

Provu ĝin permane:

curl -X POST https://api.propertrust.com/mcp \
  -H "Authorization: Bearer pt_live_…" -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"pt_whoami","arguments":{}}}'

Reguloj

  • Ŝlosilo agas kiel la konto, kiu kreis ĝin, kaj vidas tion, kion tiu konto vidas. Ĝi havas ĝis tri rajtamplekson: legi (ĉiam), skribi, enhavo.
  • Neniu ŝlosilo povas subskribi. Ĉiu partio donas sian subskribon persone, en la panelo aŭ en Telegram, post konfirmo de ĉiu klaŭzo. Legado de teksto per la API neniam validas kiel legokonfirmo.
  • Krei interkonsenton, aldoni partion kaj memorigi sendas retpoŝton al aliaj homoj. Agento demandu sian mandatanton antaŭ ol fari tion.
  • Frostigita teksto ne estas redaktebla. Por ŝanĝi ĝin, nuligu la interkonsenton kaj kreu novan.
  • Nur haketaĵoj estas publikaj. Titoloj aperas en pruvpaĝoj nur se vi agordas public_title.
  • Kunmetitaj tekstoj devenas de klaŭzobiblioteko kaj estas helpilo, ne jura konsilo.

Konto

GET/v1/mereadMCP: pt_whoami

The account behind the key: name, identity level, what the key may do. Call it first to check that the connection works.

GET/v1/catalogreadMCP: pt_catalog

The fixed lists the other calls refer to: contract types with their default roles and fields, legal systems, governing laws with default venue, arbitration institutions, document kinds, identity levels.

GET/v1/guidereadMCP: pt_guide

The ProperTrust guide for agents, chapter by chapter. Without a topic it lists the chapters. Read "overview" before your first task, "contracts" before creating an agreement, "confidentiality" before handling anything sensitive, "telegram" before passing Telegram handles. Topics: overview, contracts, distribution, signatures, confidentiality, telegram, recipes, errors.

topic · string: overview | contracts | distribution | signatures | confidentiality | telegram | recipes | errors · Chapter to read. Leave out for the list of chapters.

Biblioteko

GET/v1/templatesreadMCP: pt_templates_list

The templates of the account's library with their key and the variables each one needs.

GET/v1/templates/{template}readMCP: pt_template_get

One template with its wording in Markdown. Variables appear as {{name}}.

template* · string · Template key (for example shop.product-x) or id.
POST/v1/contracts/composereadMCP: pt_contract_compose

Builds the wording of a contract from structured input with the same deterministic composer as the contract assistant in the panel: no language model is involved, the clauses come from the ProperTrust clause library and depend on contract type, governing law and dispute forum. Returns Markdown. With save_draft the result is also stored as a draft the account holder can review and edit in the panel. Pass the Markdown, or the draft id, to agreement_create to start the signature round. Call catalog for the allowed values.

contract_type* · string: nda | service | consulting | contractor_terms | employment | sales | loan | convertible | shareholders | licence | lease | mou | settlement | custom · Kind of contract.
title* · string · Title printed on the contract.
parties* · array · The parties in order. The first one takes the first default role of the contract type. · eroj: name, role, entity_type, country, address, reg_no, representative, email
governing_law · string: ch | de | at | li | fr | it | es | nl | be | lu | pl | se | ew | ie | sg | hk | au_nsw | ca_on | us_de | us_ny | us_ca | us_tx | us_wy | us_fl | us_nv | unidroit | cisg_ch | neutral_ch | neutral_ew · Default ch (Swiss law). The legal system, the venue and the language default from it.
language · string: en | de · Language of the wording.
purpose · string · Background of the deal, printed as recitals.
fields · object · Content fields of the contract type, as named in catalog.fields: for example amount, currency, payment_terms, scope, deliverables, start_date, goods, premises, interest_rate, maturity_date. Also: effective_date, term_type (indefinite|fixed), term_months, notice_period_days, confidentiality_years, liability_cap, non_compete_months, ip_to_client, exclusive.
special_clauses · string · Your own wording, appended as a numbered section.
venue_city · string
venue_country · string
venue_exclusive · boolean · Exclusive jurisdiction, default true.
escalation · boolean · Thirty days of negotiation before any proceedings, default true.
arbitration · boolean · Arbitration instead of state courts, default false.
arbitration_institution · string: swiss | icc | lcia | dis | viac | scc | siac | hkiac | icdr | jams | uncitral
arbitration_seat · string
arbitrators · integer: 1 | 3
arbitration_language · string
require_level · integer · Identity level every signer needs, default 1.
open_for_parties · boolean · Further parties may accede later; adds an accession clause.
save_draft · boolean · Also store the wording as a draft in the panel (needs the write scope).

Interkonsentoj

POST/v1/agreementswriteMCP: pt_agreement_create

Freezes a wording and starts the signature round: the text is rendered to PDF, hashed, stored encrypted and anchored in Bitcoin, and every party is invited to read it clause by clause and sign. Give exactly one source: template (with variables), wording (Markdown, sections start with "## "), draft (id from contract_compose), or a finished file (file_base64 with filename; REST also takes the multipart part "file"). The account behind the key is always the first party. This sends messages to other people: e-mail to parties with an email, and a Telegram message from the ProperTrust bot to parties with a telegram handle. The answer lists, under "telegram", what the bot could do for each handle and the start link to pass on where it could not write. Guide: topics contracts, distribution, telegram.

template · string · Key or id of a library template.
variables · object · Values for the template variables.
wording · string · Your own wording in Markdown. Each "## Heading" becomes one clause the parties acknowledge.
draft · string · Id of a draft stored with contract_compose or in the panel.
file_base64 · string · A finished contract file (PDF or other), base64 encoded, up to about 11 MB. It is signed as a whole: no clauses, each party confirms once that it read the document.
filename · string · File name with extension, with file_base64.
title · string · Required with wording and with a file; optional otherwise.
language · string: en | de · Language of the verification notice on the PDF when you pass wording. Default en.
parties · array · The other parties, each with a name and an email, a telegram handle, or both. Required with template. · eroj: name, email, telegram, role
message · string · Note shown in the invitation.
pin · string · Optional PIN (4 to 8 digits) for the printed verification code: with it, the public check page shows the wording and the parties.
require_level · integer · Identity level every signer needs (wording and file; templates and drafts carry their own).
open_for_parties · boolean · Keep the round open so parties can be added after others have signed (wording and file).
idempotency_key · string · Optional. Repeat a call with the same value within 24 hours and you get the first result back instead of a second record. In REST the header Idempotency-Key does the same.
GET/v1/agreementsreadMCP: pt_agreements_list

Agreements the account owns or is a party to, newest first.

status · string: collecting | completed | cancelled · Only this status.
role · string: owner | party · Only those the account owns, or only those of others it is a party to.
limit · integer · Rows per page, default 25.
page · integer · Page number, default 1.
GET/v1/agreements/{id}readMCP: pt_agreement_get

Status of one agreement: who was invited, who read, who signed (with the signature record: method, time, identity level, hash), who declined, how far the Telegram bot got with each party, the hash of the document, the Bitcoin anchor, the verification code, and after completion the bundle hash and the editions. This is the call to poll. Guide: topic signatures.

id* · string · Agreement id.
GET/v1/agreements/{id}/wordingcontentMCP: pt_agreement_wording

The wording of an agreement clause by clause. Reading it through the API does not count as a read receipt for any party. The PDF itself: GET /agreements/{id}/document.

id* · string · Agreement id.
GET/v1/agreements/{id}/bundlereadMCP: pt_agreement_bundle

The signature bundle of a completed agreement: the canonical record of who signed which document when, with every read receipt and signature hash. Returned parsed and as the exact JSON text whose SHA-256 is bundle_sha256, so you can check the hash yourself. It holds names, times and hashes, not the wording.

id* · string · Agreement id.
POST/v1/agreements/{id}/partieswriteMCP: pt_agreement_add_party

Invites a further party to an open agreement (owner only). Give an email, a telegram handle, or both. Sends the invitation (e-mail, and through the bot for a handle) unless notify is false; the join link and the Telegram start link are in the answer either way.

id* · string · Agreement id.
name* · string
email · string
telegram · string · Telegram handle (@name, name or t.me/name).
notify · boolean · Send the invitation, default true.
DELETE/v1/agreements/{id}/parties/{party}writeMCP: pt_agreement_remove_party

Removes a party that has not read or signed yet (owner only). A party that has read or signed stays on the record.

id* · string · Agreement id.
party* · string · Party id from agreement_get.
POST/v1/agreements/{id}/remindwriteMCP: pt_agreement_remind

Sends the invitation again to every party that has not joined yet (owner only): by e-mail, and through the Telegram bot for parties with a handle (the bot writes to the same party at most once in six hours).

id* · string · Agreement id.
POST/v1/agreements/{id}/closewriteMCP: pt_agreement_close

Closes a round that was kept open for further parties (owner only). Works when every current party has signed; the agreement then completes: signature bundle, anchoring, one edition per party.

id* · string · Agreement id.
POST/v1/agreements/{id}/cancelwriteMCP: pt_agreement_cancel

Cancels an agreement that is still collecting signatures (owner only). It cannot be reopened; the document and its timestamp stay on the record.

id* · string · Agreement id.
POST/v1/agreements/{id}/pinwriteMCP: pt_agreement_set_pin

Sets the PIN of the public verification page, or removes it when pin is left out (owner only). The notice printed on an existing PDF does not change.

id* · string · Agreement id.
pin · string · Optional PIN (4 to 8 digits) for the printed verification code: with it, the public check page shows the wording and the parties.
GET/v1/agreements/{id}/documentcontent

The PDF of the agreement, for its owner and its parties. Does not count as a read receipt.

Dokumentoj kaj pruvoj

POST/v1/documentswriteMCP: pt_document_deposit

Stores a file encrypted in the vault and anchors its SHA-256 in Bitcoin: proof that exactly this content existed at this time. Give the content as text, or as content_base64 for binary files. REST also accepts multipart/form-data with the part "file". The anchor is confirmed within a few hours; document_get shows the state.

title* · string
filename · string · File name with extension, for example minutes-2026-11-26.md.
text · string · Content as plain text (UTF-8).
content_base64 · string · Content of a binary file, base64 encoded (up to about 11 MB; larger files go through multipart).
kind · string: document | idea | deposit · document (default), idea (prior art), deposit (evidence).
public_title · boolean · Show the title on the public proof page. Default false: the page shows the hash and the time only.
notes · string · Private note.
idempotency_key · string · Optional. Repeat a call with the same value within 24 hours and you get the first result back instead of a second record. In REST the header Idempotency-Key does the same.
GET/v1/documentsreadMCP: pt_documents_list

The documents in the account's vault, newest first.

kind · string: document | contract | idea | deposit | bundle | notarial
limit · integer · Rows per page, default 25.
page · integer · Page number, default 1.
GET/v1/documents/{id}readMCP: pt_document_get

One document of the vault with its hash and every anchor: provider, state, Bitcoin block, link to the OpenTimestamps proof file.

id* · string · Document id, or its SHA-256.
GET/v1/documents/{id}/contentcontentMCP: pt_document_content

The decrypted file. REST streams the bytes. As a tool it returns text for text files and base64 otherwise, up to 5 MB.

id* · string · Document id, or its SHA-256.
GET/v1/proofs/{sha256}readMCP: pt_proof_lookup

Asks whether a SHA-256 is registered with ProperTrust, by anyone: when it was first seen and how it is anchored. Shows what the public proof page shows, never content. Compute the hash yourself; the file does not need to leave your system.

sha256* · string · SHA-256 of the file, 64 hex characters.
GET/v1/verify/{code}readMCP: pt_verify_code

Checks the code printed next to the QR on a ProperTrust document: who issued it, the state of the signature round, the hash and the anchor. Shows what the public check page shows without the PIN.

code* · string · The printed code, for example K7QF-3M9XPA.

Telegram

GET/v1/telegram/groupsreadMCP: pt_telegram_groups

The Telegram groups the ProperTrust bot moderates and the account is a member of, with the state of the gate and the open rounds. Empty until the account is connected to Telegram (send /connect to the bot).

POST/v1/agreements/{id}/telegramwriteMCP: pt_telegram_invite

Triggers the ProperTrust bot for one agreement (owner only): it writes to every party with a telegram handle that has not signed and that it has not written to yet, and returns for each such party the status (contacted, or needs_start_link when Telegram does not let the bot write first) and the start link. With again it repeats the invitation to parties contacted before, at most once in six hours. agreement_create and agreement_add_party trigger the bot by themselves; use this after you learn that a party has opened the bot, or for a reminder. Guide: topic telegram.

id* · string · Agreement id.
again · boolean · Also write again to parties that were contacted before. Default false.
POST/v1/telegram/groups/{group}/roundswriteMCP: pt_telegram_moderate

Lets the bot run the signature round of an open agreement in a Telegram group: it posts the wording there, and every member confirms the clauses and signs in the private chat with the bot. The bot writes into the group at once.

group* · string · Group id from telegram_groups.
agreement* · string · Id of an agreement that is collecting signatures and that the account owns.

Eraroj kaj limoj

REST respondas per HTTP-stato kaj JSON-korpo: error estas stabila vorto, kiun vi povas testi, message estas frazo por homoj. Kiel MCP-iloj, la samaj eraroj revenas kiel ilrezulto kun isError.

{ "error": "scope_missing", "message": "This key does not have the \"write\" scope that agreement_create needs." }
  • 401 missing_api_key, invalid_api_key · neniu ŝlosilo, aŭ ŝlosilo nekonata, revokita aŭ eksvalidiĝinta
  • 403 scope_missing, forbidden, level_too_low · la ŝlosilo aŭ la konto ne rajtas fari tion
  • 404 not_found, template_not_found · nenio kun ĉi tiu id por ĉi tiu konto
  • 409 conflict, in_progress · la stato ne permesas tion, ekzemple la interkonsento jam estas finita
  • 422 invalid_input, cannot_create · argumento mankas aŭ estas malĝusta; details nomas la kampon
  • 429 rate_limited · 120 vokoj po minuto por ĉiu ŝlosilo; la kapoj X-RateLimit-Remaining kaj Retry-After montras vian staton

Skribaj vokoj akceptas la kapon Idempotency-Key (kiel ilo: la argumento idempotency_key). Se vi ripetas vokon kun la sama valoro ene de 24 horoj, vi ricevas la unuan rezulton anstataŭ duan interkonsenton. Listoj estas paĝigitaj per limit kaj page; has_more indikas, ĉu ekzistas plia paĝo. Tempoj estas laŭ ISO 8601 en UTC. Alŝutoj estas ĝis 48 MB.

API-versio 1.2.0. Demandoj: support@propertrust.com.