API document template

Developers search "api document template" when they need repeat sends from a stored document shape without re-uploading every time. Atlas templates capture fields, parties, and signing order so POST /api/templates/{id}/send replaces manual review on trusted workflows.

When templates beat ad-hoc create

FlowRouteHuman review
First-time documentPOST /api/envelopereview_url required before send
Trusted repeat documentPOST /api/templates/{id}/sendOptional auto_send
Agent one-off from chatMCP send_contract_from_templateauto_send unless false

Ad-hoc create always returns review_url so ops can confirm detection on new PDFs or DOCX files. Templates reward proven workflows with one API call.

Create a template

Save an envelope as template from dashboard after a successful send, or use template create API paths documented in OpenAPI.

Template row stores:

  • Stored PDF reference
  • fields array with stable field ids
  • party role names for send-time binding
  • Optional prefill key definitions

Send from template

curl -X POST "https://atlaswork.ai/api/templates/$TEMPLATE_ID/send" \
  -H "Authorization: Bearer $ATLAS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "parties": [
      { "email": "signer@example.com", "name": "Jane Signer", "role": "Customer" }
    ],
    "prefill": {
      "company_name": "Acme Corp"
    },
    "auto_send": true
  }'

Set auto_send false to receive review_url again when you want eyes on a variant.

MCP template send

MCP tool send_contract_from_template accepts template_id and parties. Call get_template first for parties_for_send, prefill keys, and example_create payload.

Agents should list_templates before first send to pick the correct template_id.

Prefill keys

Templates expose prefill keys for text fields filled at send time without editing the PDF. Map CRM properties or form posts to prefill object keys.

Missing prefill leaves fields empty for signers unless defaults were saved on the template.

Idempotency

Pass Idempotency-Key header on template send to dedupe retries within 24 hours. Same pattern as POST /api/envelope.

Compare to competitor template APIs

DocuSign uses templateId and templateRoles in envelope create. Adobe Sign uses libraryDocuments. PandaDoc combines doc gen and templates in one product.

Atlas separates template send from ad-hoc create so detection and review stay on new documents only.

Webhooks on template sends

Template sends fire the same lifecycle webhooks as ad-hoc sends: envelope.sent, envelope.signed, envelope.voided, etc.

Configure webhook_url on send body or account defaults.

Trust ladder framing

  1. First NDA: POST /api/envelope, human review, send
  2. Save template after successful send
  3. Repeat NDAs: POST /api/templates/{id}/send with auto_send true
  4. Agents: send_contract_from_template in MCP

Further reading

API document template FAQ

Can templates use DOCX? Templates store PDF. Create path accepts DOCX and converts at ingest for new templates.

Update template fields? Edit via dashboard or PATCH flows on template resources per OpenAPI.

Multiple signers? parties array order defines sequential signing order. Atlas does not support simultaneous signing.

Extract after sign? MCP extract_contract_data or contract.extracted webhook on signed envelopes.

Version drift? If source PDF changes, create a new template or re-save from a fresh envelope. Old template_id may reference stale field positions.

Template governance

Assign an owner for template library updates. Orphan templates cause wrong field placement when legal updates PDF without telling engineering.

Version templates in git by exporting PDF source files alongside template_id registry in your database.

CRM field mapping

HubSpot, Salesforce, and custom CRMs expose properties for prefill. Map once in middleware config, not hardcoded per send.

Validate required prefill keys at send time to fail fast before signers open broken documents.

Bulk repeat sends

Loop POST /api/templates/{id}/send with rate limiting for onboarding cohorts. Use Idempotency-Key per recipient to dedupe retries.

Monitor credits consumption during bulk jobs. Atlas charges per send, not per draft.

Agent template discovery

MCP list_templates returns template ids and signer role names. Agents should call get_template before first send_contract_from_template.

Cache template metadata in agent session to reduce round trips.

Partial auto_send

auto_send true skips review email gate. Use only when template PDF and fields are legally approved for unattended dispatch.

Keep auto_send false for variants that change party list or prefill substantially.

Testing templates

Send test template to internal inboxes before client-facing automation. Verify sequential order and field visibility per party.

Compare signed PDF to golden file in CI if template is business-critical.

Deprecation policy

When retiring template_id, block sends in your app layer and archive PDF. Do not delete active template until in-flight envelopes complete.

Analytics on template sends

Track template_id, send latency, and completion rate per template in your warehouse.

Retire templates with high void or decline rates before they damage client relationships.

Cross-team review

Legal approves template PDF. Engineering owns template_id registry. Ops owns review page training for senders.

Document RACI so template updates do not ship without legal eyes on changed clauses.