Trimline is in private beta. Public launch: June 2027.Join the waitlist →
Docs / Resources

Contracts

Terms, notice periods and price uplifts extracted from your order forms and agreements.

Beta. The Trimline API is available to private beta customers. Endpoints may change before general availability in June 2027, and every breaking change is announced in the changelog. Request access.

A contract records the commercial terms with a vendor: when the current term starts and ends, whether it renews automatically, how much notice it needs, and what you pay. We extract these terms from order forms, MSAs and renewal notices in memory, and keep only the terms. The documents themselves stay in your mailbox, and every field links back to its source.

Endpoints

The contract object

{
  "id": "ctr_4Lw7Yh",
  "object": "contract",
  "vendor": "ven_9xKd02",
  "term_start": "2026-02-01",
  "term_end": "2027-01-31",
  "auto_renews": true,
  "renewal_term_months": 12,
  "notice_period_days": 60,
  "notice_deadline": "2026-12-02",
  "annual_value": { "amount": 3840000, "currency": "usd" },
  "billing_interval": "annual",
  "uplift": { "type": "percent", "max": 7.0 },
  "quantity": 40,
  "unit": "seat",
  "documents": [
    { "id": "doc_51Hc", "kind": "order_form", "received_at": "2026-01-22T17:03:00Z", "source_url": "https://mail.google.com/mail/u/0/#all/18c2f…" }
  ],
  "confidence": { "notice_period_days": 0.98, "uplift": 0.91 },
  "verified": false,
  "livemode": false
}
notice_deadlinedateThe last day you can give notice of non-renewal. It’s calculated from term_end and notice_period_days.
upliftobject, nullableAny automatic price increase at renewal. type is percent or cpi. max is the cap, if one is stated.
confidenceobjectHow confident we are in each extracted field, from 0 to 1. Fields below 0.85 are flagged for review in the dashboard.
verifiedbooleantrue once someone on your team or ours has confirmed the terms.

List contracts

GET/v1/contracts
vendorstringOnly contracts for this vendor.
term_end[gte], term_end[lt]dateFilter by end date.
auto_renewsbooleanOnly auto-renewing contracts, or only the ones that don’t auto-renew.
verifiedbooleanFilter by verification state.

Retrieve a contract

GET/v1/contracts/:id

Returns the contract. Trimline doesn’t store document files. Each entry in documents has a source_url that opens the original message or file in your own mailbox or finance platform.

Correct a contract

PATCH/v1/contracts/:id

If we’ve extracted a term incorrectly, correct it here. Corrected fields get a confidence of 1.0 and the contract is marked verified. Changing term_end or notice_period_days recalculates the related renewal’s deadline.

curl -X PATCH https://api.trimline.tech/v1/contracts/ctr_4Lw7Yh \
  -H "Authorization: Bearer $TRIMLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "notice_period_days": 90 }'

Send a non-renewal notice

POST/v1/contracts/:id/send_notice

Creates a draft giving the vendor written notice that you won’t renew. Like every draft, it isn’t sent until it’s approved. Sending notice protects your leverage. It doesn’t stop you negotiating, and you can still sign a new deal afterwards.

reasonenumswitching, no_longer_needed, budget or renegotiating. This sets the tone of the notice.
approveboolean, default falseApprove and send straight away. Requires the drafts:write scope.

Returns 409 notice_deadline_passed if the deadline has already gone by. The notice can still be drafted with "force": true, but the vendor isn’t obliged to accept it for this term.

Something unclear or missing? Email developers@trimline.tech.