Skip to content

Agents API

Base URL: https://api.doctransit.com/v1
OpenAPI: GET /v1/openapi.json

Endpoints

MethodPathDescription
GET/meKey, scopes, plan, signing_mandate, flags
GET/flagsDeploy-time feature flags
GET/mandatesSigning mandates granted to this key
GET/mandates/:idMandate detail
GET/POST/contactsList or invite Agent Contacts
GET/contacts/:idContact detail
POST/contacts/:id/acceptAccept an inbound invite
POST/contacts/:id/revokeRevoke a contact (both sides)
GET/offersInbound and outbound offers
GET/offers/:idOffer detail
POST/documents/:id/offerspropose_contract to an active contact
POST/offers/:id/ackAcknowledge an inbound offer
POST/offers/:id/acceptAccept (L2 signs, L1 escalates)
POST/offers/:id/declineDecline
POST/offers/:id/escalateForce L1 confirm
POST/documents/:id/signL2 sign_as_principal (in-policy auto-sign + notify)
POST/documents/:id/sign-requestsL1 request_sign (principal must confirm)
GET/documents/:id/sign-requestsList sign requests for this key
GET/sign-requests/:idSign request status
GET/templatesList templates
GET/templates/:idTemplate detail
POST/documentsCreate (optional send: true)
GET/documentsList
GET/documents/:idStatus + sign links
POST/documents/:id/signersAdd signers (draft only)
POST/documents/:id/sendSend (confirm: true)
GET/documents/:id/downloadSigned PDF URL
GET/POST/webhooksManage webhooks
DELETE/webhooks/:idDelete webhook
POST/assetsUpload a Drive file (zip, office, images, pdf)
GET/driveList Drive items
POST/transfersCreate a package from drive_file_ids
GET/transfersList sent or received packages
GET/transfers/:idPackage detail
POST/transfers/:id/offerOffer (confirm: true) and mint claim links
POST/transfers/claimClaim with this API key ({ token })
POST/transfers/acceptAccept-to-unlock ({ token })
POST/public/transfers/:token/acceptGuest accept, no account
POST/transfers/:id/downloadsMint download URLs (sender or bound recipient)
POST/transfers/:id/cancelCancel and revoke claim links
GET/public/transfers/:tokenGuest claim metadata (no file URLs)
POST/public/transfers/:token/downloadsGuest download mint after release
POST/public/transfers/:token/bindBind a matching logged-in session

Create + send example

bash
curl -s https://api.doctransit.com/v1/documents \
  -H "Authorization: Bearer $DOCTRANSIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "template_id": "TEMPLATE_ID",
    "name": "NDA — Acme",
    "signers": [{"name":"Ada","email":"ada@example.com"}],
    "send": true
  }'

Responses include document_id, status, signers[].sign_url, and next_actions.

Signing mandates

How L1, L2, widgets, flags, and apply work: Signing with an agent.

GET /me includes signing_mandate when this key has an active open mandate. GET /mandates lists mandates granted to this key (not every key on the account).

Grant and revoke happen in the app: Developer → Signing Mandates. The grant clickwrap + email OTP is the intent event. documents:sign is attached to the key only after grant, and removed when the last active mandate for that key is revoked.

bash
curl -s https://api.doctransit.com/v1/mandates \
  -H "Authorization: Bearer $DOCTRANSIT_API_KEY"

L1 request_sign

Propose a signature on a sent document where the principal is a signer. Returns confirm_url. The stored appearance is applied only after the principal confirms.

bash
curl -s https://api.doctransit.com/v1/documents/$DOC_ID/sign-requests \
  -H "Authorization: Bearer $DOCTRANSIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason":"NDA matches standing policy"}'

L2 sign_as_principal

Apply the stored appearance now on a sent, in-scope document. Emails the principal. Daily cap: 25. L1 keys get confirmation_required.

bash
curl -s https://api.doctransit.com/v1/documents/$DOC_ID/sign \
  -H "Authorization: Bearer $DOCTRANSIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason":"in-policy NDA"}'

GET /documents/:id also works for inbound documents where the principal is a signer.

The offer/accept message set is specified as DASP.

Feature flags

See Signing with an agent — Feature flags. GET /v1/flags and GET /v1/me return the snapshot. Bulk override: DOCTRANSIT_FF={"l2_signing":true,"agent_editor":false}. Per-flag env wins over the JSON blob.

Agent Contacts and offers

Invite by email (POST /contacts). The counterparty accepts in Developer → Agent Contacts or POST /contacts/:id/accept. Status is invitedactiverevoked. Optional inbox_url (https) receives offer events for that relationship, in addition to tenant webhooks (contact.invited, contact.accepted, offer.received, offer.accepted, offer.declined, offer.escalated).

bash
curl -s https://api.doctransit.com/v1/contacts \
  -H "Authorization: Bearer $DOCTRANSIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email":"beau@example.com","name":"Beau"}'

POST /documents/:id/offers with contact_id proposes a sent document. The counterparty must already be a signer. accept uses their mandate: L2 calls sign_as_principal; L1 or human_signature_required: true creates a confirm link.

bash
curl -s https://api.doctransit.com/v1/documents/$DOC_ID/offers \
  -H "Authorization: Bearer $DOCTRANSIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contact_id":"CONTACT_ID","terms":"Standard NDA"}'

Errors

json
{
  "error": {
    "code": "feature_disabled",
    "message": "l2_signing is not enabled on this deployment.",
    "docs_url": "https://docs.doctransit.com/agents/signing"
  }
}

Signing codes (confirmation_required, missing_appearance, unfilled_fields, …) are listed on Signing with an agent.