Docs

Atlas

The signing API for AI agents. Pass any PDF or DOCX as base64. Atlas detects signing fields automatically, emails the signer, and returns the signed document to your code. No templates. No setup. Live in under 5 minutes.

Base URL: https://atlaswork.ai

Quickstart

Get your API key from the Dashboard. Encode any PDF or DOCX and send it.

Send any PDF or DOCX. Zero setup.

PDF_B64=$(base64 -i contract.pdf)

curl -X POST https://atlaswork.ai/api/envelope \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document":     "'"$PDF_B64"'",
    "signer_email": "alice@example.com"
  }'
# {
#   "sign_url":        "https://atlaswork.ai/sign/env_abc123",
#   "envelope_id":     "env_abc123",
#   "detected_fields": [{ "label": "Signature", "type": "signature", "page": 1 }, ...]
# }

# Retrieve the signed PDF once complete
curl -L https://atlaswork.ai/api/envelope/env_abc123/pdf \
  -H "Authorization: Bearer YOUR_API_KEY" > signed.pdf

Production-ready version

Add webhook, agent identity, and prefill when you're ready.

curl -X POST https://atlaswork.ai/api/envelope \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document":       "'"$PDF_B64"'",
    "signer_email":   "alice@example.com",
    "agent_identity": "my-agent/v1",
    "webhook_url":    "https://your-app.com/webhook",
    "prefill": { "Client Name": "Acme Corp", "Deal Amount": "$50,000" }
  }'

Authentication

All requests require a Bearer token. Get both keys from the Dashboard.

Authorization: Bearer atlas_live_xxxx   # live key — legally binding
Authorization: Bearer test_xxxx          # test key — sign page shows TEST banner, not legally binding

{ "sandbox": true }  // anonymous sandbox — no key needed, for prototyping only

Test keys fire real webhooks and emails but envelopes are marked non-binding. Useful for CI or staging environments.

Errors

StatusMeaning
400Missing required field, invalid body, or constraint violation
401Missing or invalid API key
403Invalid signer token or incorrect access code
404Envelope or template not found
409Action not allowed in current status
413File too large (max 20 MB)
415Unsupported file type (PDF and DOCX only)
422Required sender fields missing. missing_fields in response lists which labels were absent from prefill.
429Rate limit exceeded. 100 envelopes/hour. Headers: X-RateLimit-Limit / -Remaining / -Reset
500Internal server error

All errors return { "success": false, "error": "..." }.

Send contract

POST/api/envelope

Pass a PDF or DOCX, text contract, or a saved template. Returns the signing link immediately, or needs_info if no signer was provided.

Contract source (one of)

documentstring

Base64-encoded PDF or DOCX. Atlas detects fields automatically. No template needed. For multipart upload use POST /api/envelope/upload with -F file=@contract.pdf.

base_templatestring

Plain text contract. Pass the same value as both base_template and proposed_markdown for a plain contract, or different values to show the signer a word-level diff of what changed.

proposed_markdownstring

Revised text. Diffs against base_template word-by-word.

template_idstring

UUID of a saved PDF template. Skips field inference on every send. Cannot be combined with document.

Delivery

signer_emailstring

Email of the signer. Must be a valid email address. If omitted, Atlas creates the envelope and returns needs_info. Send later via POST /api/envelope/:id/send.

webhook_urlstring

POST envelope events to this URL. Signed with X-Atlas-Signature. See Webhooks.

expires_in_daysnumber

Signing link validity in days. Default 7. Signer gets 24h and 72h reminders; envelope auto-voids at expiry. Draft envelopes (no signer_email) expire in 24h regardless.

Optional

agent_identitystring

Your agent name + version, e.g. “my-agent/v1”. HMAC-attested in audit trail. Establishes that an AI, not a human, initiated the request.

prefillobject

{ "Field Label": "value" }. Pre-fills text or date fields before the signer sees the document. Any field you omit is editable by the signer during signing. Keys must match labels in detected_fields exactly. Values must be strings. Response includes prefill_applied and prefill_unmatched.

prefill_mapobject

{ "fuzzy label": "value" }. Fuzzy alternative to prefill. Keys are matched against field labels using normalized substring matching, so you don't need to know exact label names. Supports checkbox fields: pass "true" to check, anything else to uncheck. Example: { "Corporation": "true", "Active NFFE": "true" } pre-checks those entity-type checkboxes on a W-8BEN-E. Response includes prefill_applied and prefill_warning for unmatched keys.

access_codestring

Optional passphrase the signer must enter before seeing the document.

require_otpboolean

Send a one-time verification code to the signer before they can sign. Default: false. Delivered to signer_email unless otp_channel: "sms" is set.

otp_channelstring

"email" (default) or "sms". SMS requires signer_phone.

signer_phonestring

E.164 phone number. Required when otp_channel: "sms".

legal_frameworkstring

"esign_ueta" (default, US), "eidas_ses" (EU), "uk_esign" (UK), "ueca_canada". Use the signer's jurisdiction.

skip_disclosureboolean

Suppress the electronic consent screen. Use for embedded or kiosk flows.

embedboolean

Returns embed_url for iframe embedding. See Embedded signing.

signersarray

[{ email, name?, order? }]. Multiple signers. Without sequential: one independent envelope per signer (bulk). With sequential: true: one envelope, signed in order. See Bulk send and Multi-signer.

sequentialboolean

Pass with signers to route through sequential signing in a single call. Signer 2 gets their link only after Signer 1 completes. Works with document or template_id. No two-turn flow required.

metadataobject

Arbitrary JSON attached to the envelope, returned in GET and webhooks.

brand_name / brand_color / brand_logo_urlstring

White-label the signing page header.

email_subject / email_bodystring

Custom signing email copy.

# Primary path — PDF with AI field detection
PDF_B64=$(base64 -i contract.pdf)
curl -X POST https://atlaswork.ai/api/envelope \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document":       "'"$PDF_B64"'",
    "signer_email":   "alice@example.com",
    "agent_identity": "my-agent/v1",
    "webhook_url":    "https://your-app.com/webhook",
    "prefill": { "Client Name": "Acme Corp", "Deal Amount": "$50,000" }
  }'

# {
#   "success":           true,
#   "sign_url":          "https://atlaswork.ai/sign/env_abc123",
#   "envelope_id":       "env_abc123",
#   "fields_detected":   true,
#   "detected_fields":   [{ "label": "Signature", "type": "signature", "page": 1 }, ...],
#   "prefill_applied":   ["Client Name", "Deal Amount"],
#   "prefill_unmatched": []   // ← any keys here were silently ignored; fix label spelling
# }
# Add Idempotency-Key header to prevent duplicate envelopes on retry → X-Idempotent-Replayed: true

Get envelope

GET/api/envelope/{id}

Full envelope: status, diff, signature data, document hash, metadata. For PDF envelopes, includes a 1-hour signed pdf_url. Draft and pending envelopes include review_url for field verification. Public endpoint. The UUID is the access token.

GET/api/envelopes

All envelopes for the authenticated user. Params: ?status= ?signer_email= ?from= ?to= ?limit= ?offset=

POST/api/envelope/{id}/resend

Resend the signing email to the current active signer. Pending envelopes only.

Download signed PDF

GET/api/envelope/{id}/pdf

Returns the completed document once signed. For PDF envelopes (document or template_id): returns the original PDF with all signed field values embedded in-place and a SHA-256 hash computed over the result. For text contracts (base_template): generates a certificate PDF containing the contract, signature, and a Certificate of Completion. Responds with a 302 redirect for PDF envelopes.

curl -L "https://atlaswork.ai/api/envelope/ENVELOPE_ID/pdf" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -o signed.pdf

Audit trail

GET/api/envelope/{id}/audit

Returns the full cryptographic record for a signed envelope. legal_framework reflects the signer's jurisdiction, auto-detected from their IP when not set explicitly. consent_at records when the signer accepted the electronic consent disclosure.

{
  "status":                   "signed",
  "legally_binding":          true,
  "legal_framework":          "esign_ueta",
  "document_hash":            "sha256:abc123...",
  "agent_identity":           "claude-opus-4-6 / LangChain v0.2",
  "agent_identity_attested":  true,
  "signer_ip":                "203.0.113.42",
  "signer_user_agent":        "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)...",
  "time_to_sign_seconds":     154,
  "viewed_at":                "2026-03-25T10:05:00Z",
  "consent_at":               "2026-03-25T10:06:12Z",   // null if skip_disclosure: true was set
  "events": [
    { "type": "created",       "at": "2026-03-25T10:00:00Z" },
    { "type": "viewed",        "at": "2026-03-25T10:05:00Z" },
    { "type": "consent_given", "at": "2026-03-25T10:06:12Z" },
    { "type": "signed",        "at": "2026-03-25T10:07:34Z", "document_hash": "sha256:abc123..." }
  ]
}

Public verification

Any signed envelope can be publicly verified at https://atlaswork.ai/verify/{envelope_id}. No login required. Shows status, redacted signer email, signed timestamp, legal framework, and audit timeline. Useful for counterparties who need to confirm a document was executed.

The document_hash in the audit trail can be independently verified by computing SHA-256 over the original document bytes and comparing.

# Verify directly in browser or programmatically
curl https://atlaswork.ai/verify/ENVELOPE_ID

Webhooks

Atlas POSTs to your webhook_url for these events. Every request is signed with X-Atlas-Signature: sha256=HMAC(payload, api_key).

envelope.createdEnvelope was created
envelope.sentDraft envelope was sent after two-turn flow (POST /api/envelope/:id/send called)
envelope.viewedSigner opened the signing page
envelope.signedSigner completed the signature
envelope.declinedSigner declined. Includes structured reason.
envelope.voidedSender cancelled or link expired
signer.activatedNext signer in a sequential flow was notified it is their turn
// Verify signature server-side
import { createHmac } from 'crypto';
const expected = 'sha256=' + createHmac('sha256', apiKey).update(rawBody).digest('hex');
const valid = expected === req.headers['x-atlas-signature'];

Reliability + testing

Failed deliveries retry with exponential backoff (1m → 5m → 30m → 2h → give up). View all attempts in the Dashboard.

Testing locally? Use webhook.site for a free public URL. Inspect every delivery in the browser.

Need real-time status instead? Poll GET /api/envelope/:id/events for an SSE stream that closes on signed/declined/voided or after 10 minutes.

Void / decline

POST/api/envelope/{id}/void

Sender-side cancellation. Requires Bearer auth + ownership. Fires envelope.voided.

POST/api/envelope/{id}/decline

Signer-side decline. The sign page shows structured reasons. Your webhook receives the exact string so your agent can act on it.

# Decline reasons the signer picks from:
# "Terms are not acceptable" | "Price / cost is too high"
# "Need more time to review" | "Wrong document or version"
# "Not authorized to sign"   | "Other"

# Webhook payload:
{ "event": "envelope.declined", "envelope_id": "...",
  "reason": "Price / cost is too high",
  "reason_code": "price_too_high",
  "declined_at": "2026-03-25T14:22:10Z" }

Government forms and checkboxes

Atlas handles government forms alongside standard contracts. Pass a W-9, W-8BEN-E, I-9, 1099, or any other PDF and Atlas detects the fields automatically. Use prefill_map to fill text and checkbox fields from your structured data before the signer sees the document.

Checkbox fields are returned in detected_fields with type: "checkbox". Each checkbox also carries a classification:

entity_selectclassification

Mutually exclusive group. Selecting one via prefill_map automatically de-selects all others in the same group. Examples: entity type (Corporation / Partnership / Individual), FATCA chapter, residency status.

conditional_certclassification

“I certify” statement that applies only when a specific entity type is selected. Pre-filled automatically when the related entity_select is set.

independent_flagclassification

Standalone yes/no checkbox. Examples: “Exempt payee”, “Foreign person”.

Use prefill_map to fill checkboxes from structured data:

PDF_B64=$(base64 -i fw8bene.pdf)
curl -X POST https://atlaswork.ai/api/envelope \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document":     "'"$PDF_B64"'",
    "signer_email": "contractor@example.com",
    "prefill_map": {
      "Name of organization":       "Acme Technologies Pvt Ltd",
      "Country of incorporation":   "India",
      "Permanent residence address":"42 MG Road, Bangalore",
      "Corporation":                "true",
      "Active NFFE":                "true"
    }
  }'

Checkbox values: "true", "yes", "checked", or "x" checks the box. Anything else unchecks it.

Smart send

POST the document without a signer email. Atlas returns a field_prompt that categorizes every blank field: sender fills, signer fills, or ambiguous. Then call POST /api/envelope/:id/send with the signer email and prefill values.

# Step 1: POST just the document — no signer_email yet
PDF_B64=$(base64 -i contract.pdf)
curl -X POST https://atlaswork.ai/api/envelope \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "document": "'"$PDF_B64"'", "document_filename": "contract.pdf" }'

# → {
#   "status":      "needs_info",
#   "envelope_id": "env_abc123",
#   "field_prompt": {
#     "sender_fills": [
#       { "label": "Client Name",    "type": "text", "reason": "text field — sender usually provides this" },
#       { "label": "Deal Amount",    "type": "text", "reason": "text field — sender usually provides this" },
#       { "label": "Effective Date", "type": "date", "reason": "date field — sender usually provides this" }
#     ],
#     "signer_fills": [
#       { "label": "Signature", "type": "signature", "reason": "signature field — always completed by the signer" }
#     ],
#     "ambiguous": []
#   },
#   "detected_fields": [...],
#   "needs":       { "signer_email": "Required — at least one signer email must be provided." },
#   "review_url":  "https://atlaswork.ai/review/env_abc123",
#   "next_action": "Call POST /api/envelope/env_abc123/send with signer_email. Review field placement at: https://atlaswork.ai/review/env_abc123"
# }

# Step 2: fill sender fields, provide signer email → envelope goes out
curl -X POST https://atlaswork.ai/api/envelope/env_abc123/send \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "signer_email": "alice@company.com",
    "prefill": {
      "Client Name":    "Acme Corp",
      "Deal Amount":    "$50,000",
      "Effective Date": "March 1, 2026"
    }
  }'

# → {
#   "success":        true,
#   "sign_url":       "https://atlaswork.ai/sign/env_abc123",
#   "envelope_id":    "env_abc123",
#   "prefill_applied": ["Client Name", "Deal Amount", "Effective Date"]
# }

One-call shortcut

If you already know the field values, skip the two-turn flow and send everything in one call:

curl -X POST https://atlaswork.ai/api/envelope \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document":     "'"$PDF_B64"'",
    "signer_email": "alice@company.com",
    "prefill": { "Client Name": "Acme Corp", "Deal Amount": "$50,000" }
  }'
# → { "success": true, "sign_url": "...", "field_prompt": {...} }

Send endpoint (two-turn)

POST/api/envelope/{id}/send

This is the API equivalent of the fill_and_send MCP tool.

Complete a draft envelope created by POST /api/envelope without signer_email. Takes the envelope_id from the needs_info response, adds the signer, and sends it.

Params

signer_emailstring

Signer email. Required for single-signer flows.

signersarray

[{email, name?, order?, fields?, prefill?}]. Single entry for single-signer with field assignment. Multiple entries for sequential or bulk.

prefillobject

{"Field Label": "value"}. Applied to all signers. Use sender_fills labels from field_prompt.

required_sender_fieldsstring[]

Labels that must be in prefill or the call returns 422. Useful as a guard if your agent sometimes misses sender fields.

sequentialboolean

If true and signers has multiple entries: one envelope, signed in order. Signer 2 gets their link only after Signer 1 completes. Works with any envelope created from a raw document or template.

bulkboolean

If true and a signers array is provided: creates one independent envelope per signer reusing the document. Each gets their own sign URL and audit trail.

webhook_urlstring

Overrides the envelope's webhook_url.

email_subject / email_bodystring

Override signing email copy.

Mode 1: single signer

curl -X POST https://atlaswork.ai/api/envelope/env_abc123/send \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "signer_email": "alice@company.com",
    "prefill": { "APR": "5.99%", "Loan Amount": "$250,000" }
  }'
# → { "success": true, "sign_url": "https://atlaswork.ai/sign/env_abc123", "envelope_id": "env_abc123",
#     "next_action": "Share sign_url with the signer. Poll GET /api/envelope/{id} to check when status changes to 'signed'." }

For sequential multi-signer: pass signers array with order and fields. See Multi-signer signing.
For bulk per-signer: pass bulk: true with signers array, each with their own prefill. See Bulk send.

Bulk send

Pass a signers array to create one independent envelope per signer in a single call. Each gets their own sign URL, email, and audit trail. Works with document (PDF) or template_id.

PDF_B64=$(base64 -i nda.pdf)
curl -X POST https://atlaswork.ai/api/envelope \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document": "'"$PDF_B64"'",
    "signers": [
      { "email": "alice@company.com", "name": "Alice" },
      { "email": "bob@company.com",   "name": "Bob" },
      { "email": "carol@company.com", "name": "Carol" }
    ]
  }'
# → { "envelopes": [
#     { "envelope_id": "...", "sign_url": "https://...", "signer_email": "alice@company.com" },
#     { "envelope_id": "...", "sign_url": "https://...", "signer_email": "bob@company.com" },
#     { "envelope_id": "...", "sign_url": "https://...", "signer_email": "carol@company.com" }
#   ] }

Use the smart-send two-turn flow to scan fields first, then call POST /api/envelope/:id/send with bulk: true and per-signer prefill values.

Multi-signer signing

One envelope, multiple signers in order. Assign different fields to each signer. Signer 1 sees only their fields. Signer 2 sees signer 1's values as read-only, then fills their own. Use the smart-send two-turn flow to scan fields first, then assign them.

# Fill sender fields, assign signers with specific field responsibility
curl -X POST https://atlaswork.ai/api/envelope/env_abc123/send \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prefill": {
      "Client Name":    "Acme Corp",
      "Effective Date": "April 1, 2026"
    },
    "signers": [
      {
        "email":  "alice@acme.com",
        "order":  1,
        "fields": ["Client Signature"]
      },
      {
        "email":  "bob@vendor.com",
        "order":  2,
        "fields": ["Vendor Signature"]
      }
    ]
  }'

# → {
#   "success":  true,
#   "sign_url": "https://atlaswork.ai/sign/env_abc123",
#   "signers": [
#     { "email": "alice@acme.com", "order": 1, "status": "pending",  "fields": ["Client Signature"] },
#     { "email": "bob@vendor.com", "order": 2, "status": "waiting",  "fields": ["Vendor Signature"] }
#   ]
# }
# Alice gets the link first. When she signs, Bob gets his link automatically.
# Bob sees Alice's field values read-only for context.

One-call shortcut

If you already have the signer list upfront, skip the two-turn flow. Pass sequential: true with signers in the initial POST. Works with a raw document or a saved template:

{
  "document":   "<base64-pdf>",
  "sequential": true,
  "signers": [
    { "email": "tenant@example.com",   "order": 1 },
    { "email": "landlord@example.com", "order": 2 }
  ],
  "webhook_url": "https://your-app.com/webhook"
}
# → single envelope_id. Tenant gets email immediately.
# After tenant signs → landlord gets email automatically.
# envelope.signed fires once all parties complete.

Embedded signing

Embed the signing experience in your own UI. No redirect. Pass embed: true to get an embed_url. Works with document, template_id, or text contracts. Render in an <iframe> and listen for postMessage events.

const pdfBase64 = Buffer.from(fs.readFileSync('contract.pdf')).toString('base64');

const { embed_url, envelope_id } = await fetch('https://atlaswork.ai/api/envelope', {
  method: 'POST',
  headers: { Authorization: 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' },
  body: JSON.stringify({
    document:     pdfBase64,
    signer_email: 'client@co.com',
    embed:        true,
  }),
}).then(r => r.json());

// Render: <iframe src={embed_url} width="100%" height="700" style="border:0" />

// Listen for completion
window.addEventListener('message', (e) => {
  if (e.data.type === 'atlas:signed')
    // { envelope_id, document_hash, signed_at }
  if (e.data.type === 'atlas:declined')
    // { envelope_id, reason }
});

Analytics

GET/api/analytics

Signing metrics for your account. Excludes test envelopes.

curl https://atlaswork.ai/api/analytics \
  -H "Authorization: Bearer YOUR_API_KEY"
# {
#   "total": 42,
#   "by_status": { "signed": 35, "pending": 4, "declined": 2, "voided": 1 },
#   "completion_rate": 95,           // % of resolved envelopes that were signed
#   "decline_rate": 5,
#   "avg_time_to_sign_seconds": 154,
#   "top_decline_reasons": [{ "reason": "Terms are not acceptable", "count": 2 }],
#   "volume_by_month": [{ "month": "2026-03", "sent": 18, "signed": 16 }, ...]
# }

Atlas Context

Atlas Context is a contract memory layer. Ingest your historical agreements and authority documents. Atlas extracts parties, signatories, and key terms. When you send a new envelope, Atlas suggests values for detected fields based on what it already knows. No more typing the same company name and signatory on every contract.

Works with PDF and DOCX. Accepts up to 20 documents per ingestion request.

How it connects to envelope creation

After ingestion, field_prompt.sender_fills entries include a prefill_suggestion, source, and confidence when Atlas has a match. Fields without a match get a source_hint telling you where to look.

Ingest documents

POST/api/context/documents

Upload historical or executed PDF or DOCX agreements. Atlas extracts counterparty details, signatories, key terms, and execution dates. Builds counterparty profiles automatically.

documentsarrayrequired

Array of documents to ingest. Max 20 per request.

documents[].documentstringrequired

Base64-encoded PDF or DOCX.

documents[].filenamestring

Filename hint (e.g. “acme-nda-2024.pdf”).

documents[].document_typestring

executed_agreement (default) or authority_document.

curl -X POST https://atlaswork.ai/api/context/documents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "documents": [
      {
        "document": "<base64-encoded PDF or DOCX>",
        "filename": "acme-nda-2024.pdf"
      }
    ]
  }'
# {
#   "success": true,
#   "processed": 1,
#   "extracted": [{
#     "id": "uuid...",
#     "filename": "acme-nda-2024.pdf",
#     "classification": "nda",
#     "counterparty": "Acme Corp",
#     "our_signatory": { "name": "Jane Smith", "title": "CEO" },
#     "their_signatory": { "name": "Bob Jones", "title": "VP Legal", "email": "bob@acme.com" },
#     "executed_at": "2024-01-15T00:00:00Z",
#     "key_terms": { "governing_law": "Delaware", "duration": "2 years" }
#   }]
# }

Signing authority

POST/api/context/authority
GET/api/context/authority

Upload a board resolution, articles of organization, or operating agreement. Atlas extracts your entity name, authorized signatories, and their titles. This data auto-populates sender fields on future envelopes. Each new upload supersedes the previous one.

documentstringrequired

Base64-encoded PDF of the authority document.

filenamestring

Filename hint.

# Upload authority document
curl -X POST https://atlaswork.ai/api/context/authority \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document": "<base64-encoded PDF>",
    "filename": "board-resolution-2025.pdf"
  }'
# {
#   "success": true,
#   "entity_name": "Atlas Technologies Inc.",
#   "entity_type": "Corporation",
#   "authorized_signatories": [
#     { "name": "Jane Smith", "title": "CEO", "authority_scope": "all contracts" }
#   ],
#   "effective_date": "2025-01-01",
#   "source_summary": "Board Resolution dated January 1, 2025 authorizing Jane Smith as CEO"
# }

# Get current authority
curl https://atlaswork.ai/api/context/authority \
  -H "Authorization: Bearer YOUR_API_KEY"

Context summary

GET/api/context/summary

Returns a full picture of what Atlas knows about your organization: signing authority, number of documents ingested, counterparty list, and agreements expiring in the next 30 days.

curl https://atlaswork.ai/api/context/summary \
  -H "Authorization: Bearer YOUR_API_KEY"
# {
#   "organization": {
#     "entity_name": "Atlas Technologies Inc.",
#     "entity_type": "Corporation",
#     "primary_signatory": { "name": "Jane Smith", "title": "CEO" },
#     "all_signatories": [...],
#     "authority_source": "Board Resolution dated January 1, 2025...",
#     "authority_effective": "2025-01-01"
#   },
#   "context_documents": 14,
#   "counterparties": 6,
#   "top_counterparties": [{ "name": "Acme Corp", "documents_count": 3 }, ...],
#   "expiring_soon": [{ "counterparty_name": "Acme Corp", "expires_at": "2026-04-10T..." }]
# }

Counterparties

GET/api/context/counterparties
GET/api/context/counterparty/:id

Atlas builds a counterparty profile from every document you ingest. Each profile includes the standard signatory, preferred jurisdiction, and recent agreements. Query by name, domain, or UUID.

# List all counterparties
curl "https://atlaswork.ai/api/context/counterparties?limit=20" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Search by name
curl "https://atlaswork.ai/api/context/counterparties?search=Acme" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Get one counterparty (name, domain, or UUID)
curl "https://atlaswork.ai/api/context/counterparty/acme" \
  -H "Authorization: Bearer YOUR_API_KEY"
# {
#   "success": true,
#   "counterparty": {
#     "id": "uuid...",
#     "name": "Acme Corp",
#     "domain": "acme.com",
#     "standard_signatory_name": "Bob Jones",
#     "standard_signatory_title": "VP Legal",
#     "preferred_jurisdiction": "Delaware",
#     "documents_count": 3,
#     "recent_agreements": [
#       { "classification": "nda", "executed_at": "2024-01-15T..." }
#     ]
#   }
# }

Cloud storage sync

POST/api/context/storage/connect
POST/api/context/storage/sync
GET/api/context/storage/status
DELETE/api/context/storage/{id}

Connect Google Drive, Dropbox, Box, or OneDrive to sync your PDF and DOCX files. Two steps: get an OAuth URL, then trigger the sync. Atlas processes up to 500 documents, skips files already ingested, and builds your counterparty graph.

# Step 1: get OAuth URL, redirect user to it
curl -X POST https://atlaswork.ai/api/context/storage/connect \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "provider": "google_drive" }'
# { "oauth_url": "https://accounts.google.com/o/oauth2/v2/auth?..." }

# Step 2: after user authorizes, trigger sync (long-running, up to 5 min)
curl -X POST https://atlaswork.ai/api/context/storage/sync \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "provider": "google_drive" }'
# { "success": true, "documents_found": 48, "documents_processed": 48, "new_this_sync": 48 }

# Check status at any time
curl https://atlaswork.ai/api/context/storage/status \
  -H "Authorization: Bearer YOUR_API_KEY"
# { "connections": [{ "provider": "google_drive", "status": "synced", "documents_processed": 48 }] }

# Disconnect
curl -X DELETE https://atlaswork.ai/api/context/storage/CONNECTION_ID \
  -H "Authorization: Bearer YOUR_API_KEY"

Auto prefill from context

After ingestion, every POST /api/envelope response with detected fields includes context-enriched field_prompt entries.

Fields in sender_fills that match known context get three extra properties: prefill_suggestion, source, and confidence. Fields without a context match get a source_hint pointing to where you might find the value.

# field_prompt.sender_fills entry with context match:
{
  "label": "Authorized Signatory",
  "type": "text",
  "page": 1,
  "reason": "text field — sender usually provides this",
  "prefill_suggestion": "Jane Smith",
  "source": "Board Resolution dated January 1, 2025 authorizing Jane Smith as CEO",
  "confidence": "high"
}

# field_prompt.sender_fills entry without context (source_hint only):
{
  "label": "EIN",
  "type": "text",
  "page": 1,
  "reason": "text field — sender usually provides this",
  "source_hint": "Found on IRS SS-4 confirmation letter"
}