---

name: trustline-sign
description: Send contracts for e-signature (optionally linking the signer to the sender's own invoice afterwards) and get back a signed PDF plus an ESIGN/UETA audit certificate. Use when a user asks you to get something signed, collect a signature, or check on a contract you sent.
---

# Trustline Sign

Tools: MCP `tl_read` (status, list, download, audit, tpls, hooks, account), `tl_create`, `tl_update`, `tl_send`, `tl_delete` (each runs the ops of that kind; `{op, args}`), and `tl_help` (list ops / one op's args). No tool moves money, and Trustline never collects payments: you can attach the sender's own invoice link for after signing. Or REST `POST /api/v1/ops/{op}` with the same `Authorization: Bearer <key>`.

## Connect

MCP over Streamable HTTP: `https://trustline.app/api/mcp`, nothing to install. Every request sends `Authorization: Bearer <token>` (OAuth `tlo_...` or API key `tlk_...`). No header: HTTP 401 with `WWW-Authenticate` pointing to the OAuth metadata.

- Your client does OAuth (Claude, ChatGPT, Grok connectors): add just the URL and let the person sign in.
- Otherwise, self-onboard (device flow). Ask the person for their email, then:
  1. `curl -s https://trustline.app/oauth/device_authorization -d email=<person's email> -d agent_name="<your name>" -d scope="tl:read tl:create tl:send" -d credential=api_key` returns `{device_code, user_code, verification_uri, verification_uri_complete, expires_in:900, interval:5}`.
  2. Tell the person: open the link Trustline emailed you, check the code is `<user_code>`, press Approve.
  3. Every `interval` seconds: `curl -s https://trustline.app/oauth/token -d grant_type=urn:ietf:params:oauth:grant-type:device_code -d device_code=<device_code>`. `authorization_pending`: wait. `slow_down`: add 5 s. `access_denied` or `expired_token`: stop. Success: `{"access_token":"tlk_...","token_type":"Bearer","scope":"...","credential":"api_key"}`. The key is shown once; it is revocable in the dashboard under API & Agents.
  4. Send `Authorization: Bearer <access_token>` on every MCP or REST request.
- Scopes: `tl:read` (tl_read, resources, events), `tl:create`, `tl:update`, `tl:send`, `tl:delete` (the matching tool). `tl_help` needs only a valid token. Missing scope: 403 `insufficient_scope`.

## The 30-second path

1. Not connected yet? See Connect above.
2. `tl_create {op:"create", args:{title, text, signers:[{name,email}]}}`
   - `text` becomes a clean PDF with a signature + date line per signer. Markdown-lite: `#` headings, `-` bullets.
   - Have a PDF? Pass `pdf` (base64) and `fields`; see [fields.md](fields.md).
3. `tl_send {op:"send", args:{id}}` (or pass `send:true` to `create`). It goes straight to the signers and returns `sent`. If the user wants to check it first, create it with `approval:true`: send then emails a person on the account and returns `awaiting_approval`.
4. Later: `tl_read {op:"status", args:{id}}` until `completed`, then `tl_read {op:"download", args:{id}}` for 1-hour URLs to the signed PDF and audit certificate.

## Rules

- To get paid, attach the sender's own invoice link (Team or Operator plan): [invoice.md](invoice.md). Never promise that Trustline takes a payment.
- Only a human can approve (when `approval:true`) or change plans. Never ask the user for their dashboard session.
- Errors come back as `{error, msg}`. `plan_limit` means upgrade; `invalid_state` means the envelope moved on (check `status`).
- Don't poll status faster than once a minute. On MCP 2026-07-28 use events: [events.md](events.md). Otherwise webhooks: [webhooks.md](webhooks.md).
- Reuse documents with templates: [templates.md](templates.md).
