API and MCP reference

Contracts

3 operations. Each REST operation is also an MCP tool of the same name. REST https://tlntconnect.com/api/v1

GET/api/v1/contract-templatesThe workspace's contract templates and the TLNT premades it can use. Admin members only.

The same templates the app's contract library shows: the agency's own (non-archived) templates and the TLNT premades its workspace may use. Rows: id, name, slug, description, category, status, source_kind (tlnt_premade | agency_custom), updated_at. Templates are managed in TLNT. Admin members on keys with contracts:write only (a non-admin member is 403 role_forbidden).

MCP tool
list_contract_templates
Scopes
contracts:write
Members
admin
Idempotency-Key
Ignored (read)
Rate weight
1

Responses

200Success
400invalid_input / invalid_json / invalid_id
401missing_token / invalid_token / revoked_token / expired_token
403missing_scope / actor_unavailable / plan_upgrade_required / role_forbidden
404not_found (unknown, cross-workspace or not visible to the key's member)
429rate_limited (honour Retry-After)
500internal_error
GET/api/v1/contract-templates/{template_id}One contract template with its current version's text and merge fields. Admin members only.

The list row plus latest_version {id, version, title, body_markdown, merge_fields, created_at}. Another workspace's template is 404.

MCP tool
get_contract_template
Scopes
contracts:write
Members
admin
Idempotency-Key
Ignored (read)
Rate weight
1

Input

template_id path, requiredstring (uuid) — Contract template id.

Responses

200Success
400invalid_input / invalid_json / invalid_id
401missing_token / invalid_token / revoked_token / expired_token
403missing_scope / actor_unavailable / plan_upgrade_required / role_forbidden
404not_found (unknown, cross-workspace or not visible to the key's member)
429rate_limited (honour Retry-After)
500internal_error
POST/api/v1/contracts/agreementsSend a creator an agreement to sign in their portal. Needs the user's written confirmation: the first call returns the preview and a confirmation_token and sends nothing.

Validates the agreement exactly as the app does (titles, parties, terms within their limits, unique clause ids, every term placeholder used) and the links (the creator on this roster; campaign_id one of that creator's campaigns; previous_file_id a structured agreement already published for that creator — 404 / 400 otherwise). Written confirmation in chat: the first call (no confirmation_token) sends nothing and answers 200 { status: "confirmation_required", preview: { signer, document, terms, clauses }, confirmation_token, expires_at } — the signer, the agreement title and parties, every term and the full clause text with the terms filled in. Show it to the user; only after they confirm in writing call again with the same arguments plus confirmation_token (single use, this credential only, valid 10 minutes). That call generates the PDF and publishes it in the creator's portal with a signature requested — the same path as the app — once, and answers 200 { status: "executed", action_id, result: { file_id } }. A token for other arguments, another credential, expired or already used is refused (409 confirmation_invalid / confirmation_expired / confirmation_used); a creator renamed or archived after the preview is 409 confirmation_stale. When the credential asks for approval in TLNT for agreement signatures, the call is queued for an admin instead (202 pending_approval). Requires contracts:write, an Idempotency-Key and an admin member.

MCP tool
request_agreement_signature
Scopes
contracts:write
Members
admin
Approval
Runs after written confirmation in chat; queued when the credential asks for approval for contract_signature
Idempotency-Key
required
Rate weight
1
Untrusted fields
preview.signer.name

Input

Idempotency-Key header, requiredstring — Retry-safe key (1-255 printable ASCII; a UUID is recommended; an RFC 8941 quoted string is accepted). The same key with the same request within 24h replays the stored response byte for byte (Idempotent-Replayed: true) without running again; the replay still consumes the operation's rate weight.
creator_id body, requiredstring (uuid) — The roster creator who signs.
campaign_id bodystring (uuid) | null — One of this creator's campaigns, when the agreement belongs to one.
previous_file_id bodystring (uuid) | null — The agreement this one replaces (a published structured agreement for this creator).
agreement body, requiredobject
confirmation_token bodystring — Leave out on the first call: it answers status confirmation_required with the exact preview and this token, and sends nothing. Show the preview to the user; only after they confirm in writing, call again with the same arguments plus this token.

Responses

200Success
202pending_approval — queued for approval in TLNT (only when the credential asks for approval for this action class; it runs directly by default)
400invalid_input / invalid_json / invalid_id / idempotency_key_required
401missing_token / invalid_token / revoked_token / expired_token
403missing_scope / actor_unavailable / plan_upgrade_required / role_forbidden
404not_found (unknown, cross-workspace or not visible to the key's member)
409confirmation_invalid / confirmation_expired / confirmation_used / confirmation_stale / stale_target / idempotency_key_reused / idempotency_in_progress / idempotency_context_changed / idempotency_response_too_large
429rate_limited (honour Retry-After) / daily_send_cap_reached
500internal_error / idempotent_replay_of_failure
503service_unavailable