# Trustline

> E-signatures an AI agent can send. Trustline creates a contract or takes a PDF, emails each signer a link, and returns the signed PDF with an audit certificate and a hash-chained audit trail. Remote MCP server at https://trustline.app/api/mcp and REST API at https://trustline.app/api/v1, on every plan. Every plan starts with a 14-day free trial (card required).

An agent connects (OAuth 2.1) or signs up (device flow) with one Approve click from a person; that click also creates the account if they have none. Sending documents needs the person to start the 14-day free trial with a card (Stripe Checkout); until then a send returns HTTP 402 plan_required with details.checkoutUrl for the agent to hand to the person, since an agent cannot pay. After that, no human is needed to create, send, track or download envelopes.

## Agent autonomy

| Without a human | Needs one human click | Needs a human (payment) |
| --- | --- | --- |
| Register itself as an OAuth client (Dynamic Client Registration or a Client ID Metadata Document) | Approve the connection: Allow on the OAuth consent screen (signed in), or Approve on the emailed /connect link | Start the 14-day free trial with a card (Stripe Checkout, from the dashboard); sending documents needs it |
| Start a connection or sign-up request and poll /oauth/token for the credential | Approving from the email also creates the account if the address has none; Deny creates nothing | Change or cancel a plan, update the card (billing portal) |
| Refresh its OAuth tokens | Approve an envelope, only if approval is turned on for it or for the account (an agent can never approve) |  |
| Create, upload and edit drafts |  |  |
| Once the trial is running: send envelopes; signers get the email directly (approval is off by default) |  |  |
| Place fields, set the signing order, attach your own invoice link (on plans that include it) |  |  |
| Remind signers, void an envelope, save and send templates |  |  |
| Read status, list envelopes, download the signed PDF and audit certificate, read the audit trail |  |  |
| Follow events (events/poll, stream or webhook subscription) or register signed webhooks |  |  |
| Read its plan, whether it can send and the checkout link to hand the person (the account op) |  |  |

Also person-only, in the dashboard: account settings (including the approval switch), team members, creating or revoking API keys, disconnecting apps. Signers sign from their own email link; no op signs for them.

Steps:

1. Connect with OAuth (MCP clients with connectors): Add https://trustline.app/api/mcp. The first call answers 401 with WWW-Authenticate pointing to https://trustline.app/.well-known/oauth-protected-resource; the client registers itself (DCR or CIMD), opens /oauth/authorize with PKCE S256, the person signs in and clicks Allow once, and the client exchanges the code at https://trustline.app/oauth/token.
2. Or connect headless (device flow): POST https://trustline.app/oauth/device_authorization with the person's email, agent_name, scope and credential=api_key for a static key. Show the person the user_code; they open the emailed link, check the code and click Approve.
3. Or sign up through the API: POST https://trustline.app/api/v1/signup (or https://trustline.app/api/v1/ops/signup, or the signup op) with {email, agent_name}. It answers 202 {status:"pending"} with a device_code and no key. The account and key exist only after the person clicks Approve in the email.
4. Poll for the credential: POST https://trustline.app/oauth/token with grant_type=urn:ietf:params:oauth:grant-type:device_code and the device_code every interval seconds. authorization_pending: wait; slow_down: add 5 s; access_denied or expired_token: stop. On approval it returns the access_token (an API key with credential=api_key) exactly once.
5. A person starts the trial: Sending needs a plan. Until the account has one, a send (create with send:true, send, tpl_send) fails with HTTP 402 plan_required and details.checkoutUrl; drafts, reads and downloads still work. Hand that link to the person: they sign in, add a card at Stripe Checkout and start the 14-day free trial (plans: https://trustline.app/pricing). An agent cannot pay. Then retry the send.
6. Use the tools: Send Authorization: Bearer <token>. tl_help lists ops; tl_create with send:true emails the signers; follow progress with events/poll (MCP 2026-07-28) or tl_read status; download the signed PDF and audit trail with tl_read.
7. Errors that need the person, or a pause: plan_required (no plan, or the subscription ended): hand the person details.checkoutUrl. plan_limit with upgradeTo (a feature such as the invoice link or more senders needs a bigger plan): the person changes plans in the dashboard. There is no monthly envelope cap; rate_limited (429) means wait details.retryAfter seconds. There is no way for an agent to pay.

Plans and what each includes: https://trustline.app/pricing. Envelope approval is off by default, so sends go straight to the signers.

Full section: https://trustline.app/docs/agents#autonomy

## Docs

- [Agent quickstart](https://trustline.app/docs/agents): connect (OAuth, API key, device flow), autonomy, scopes, resources, events, webhooks, every op
- [Client quickstarts](https://trustline.app/docs/agents/quickstarts): copy-paste setup for Claude, ChatGPT, Grok, Cursor and VS Code, then a first send
- [Agent ergonomics](https://trustline.app/docs/agents/ergonomics): how the server is shaped for agents: tools by effect, one-call send, strict input, errors that say what to do next
- [Token efficiency](https://trustline.app/docs/agents/token-efficiency): measured token counts (tiktoken) for every response an agent reads, and the method
- [Events reference](https://trustline.app/docs/agents/events): MCP lifecycle events (poll, SSE push, webhook), cursors, payloads, signing; account webhooks
- [Errors reference](https://trustline.app/docs/agents/errors): every error code with HTTP status, JSON shape and the agent's recovery step; JSON-RPC codes
- [Agent autonomy](https://trustline.app/docs/agents#autonomy): what needs a person and what does not
- [Agent skill file](https://trustline.app/skill/SKILL.md): progressive guide for agents, with links to detail files
- [Connect ChatGPT](https://trustline.app/docs/chatgpt): custom MCP connector with OAuth
- [Connect Grok](https://trustline.app/docs/grok): OAuth or headless device flow
- [E-signature for AI agents](https://trustline.app/ai-agent-e-signature): overview for people choosing an e-signature MCP server

## Discovery

- [MCP endpoint](https://trustline.app/api/mcp): Streamable HTTP, stateless; MCP 2026-07-28 and earlier revisions
- [Protected resource metadata](https://trustline.app/.well-known/oauth-protected-resource): RFC 9728
- [Authorization server metadata](https://trustline.app/.well-known/oauth-authorization-server): RFC 8414
- [Op help](https://trustline.app/api/v1/help): every op and its arguments

## Optional

- [Full text for agents](https://trustline.app/llms-full.txt): this file plus every op's arguments and every page

- [Pricing](https://trustline.app/pricing)
- [Integrations](https://trustline.app/integrations)
- [Security](https://trustline.app/security)
