Template → fill → send
The most common flow: a standard document from the customer’s template, the agent fills its fields, a human approves, the recipients get an email.1
Find the template
list_templates, then get_template with the chosen templateKey. The response lists every field with
filledBy. The agent fills owner fields; any_recipient and specific_recipient fields belong to the signers.2
Create the draft with fields and recipients
create_contract
contractKey, the recipients with signingUrl, and unfilledFields — owner fields the agent
still has to fill (use fill_placeholders) or ask the user about. Nobody has been emailed.3
Show the user and get approval
The agent shows the contract name, the filled values, each recipient and their role, and asks to send.
4
Send
send_for_signature
send mode. Recipients are emailed in signing order.5
Track
get_contract_timeline for events, download_contract_pdf once the status is Fully signed. In production,
listen to the webhook instead of polling.cURL
Embedded signing without email
Your product already talks to the signer (in your app, a chat, a portal). Show the signing link there and never send a Sendforsign email.-
Create the draft and add recipients (
create_contractwithrecipients, oradd_recipients). Both return each recipient’ssigningUrl:With a recipient custom domain the links can be on your own domain. - Give each signer their own link in your UI: a button, a message, or an iframe/new tab. The link identifies the recipient, so treat it like a password reset link: show it only to that person.
-
Don’t call
send_for_signature. The agent can run indraftmode for this flow. - Learn about the signature from the webhook.
recipientKey comes from recipient list.
For a fully embedded editor and contract list (review and edit what the agent drafted), use the
React components, and set your branding for any emails you do send.
One tenant per customer
A product with many customers keeps each customer’s templates and contracts apart. The tenant is chosen by your code through headers, so an agent working for customer A cannot see customer B’s contracts.
Setup, once per customer (from your backend):
cURL
clientKey with the customer. When a user of that customer starts an agent session, open the MCP
connection with:
React when a contract is fully signed
Webhooks are perclientKey. Register one per client:
cURL
GET /api/download_pdf), store it, and tell the agent or
the user. To resume an agent conversation, pass it the contractKey; it can call get_contract and
get_contract_timeline. All events: webhooks concept.
Upload a finished text and get it signed
For legal-AI products that draft elsewhere: pass the final text ascontent (Markdown by default, or
contentFormat: "html") to create_contract, add signers, send. For a PDF, use PDF upload
and PDF placeholders in REST.