Contracts AI

SpotDraft integration

Connect SpotDraft with API credentials, import contracts in bulk or selectively, and optionally enable webhooks to import fully executed contracts automatically.

Contracts.ai can import contract PDFs from SpotDraft, run AI analysis on them, and optionally receive new fully executed contracts via webhook.

Open AdminIntegrations tab → SpotDraft to configure the connection.

Safe to connect first: Connecting verifies your API credentials and builds a local search index. It does not bulk-import contracts until you click Import contracts or Import selected.


Prerequisites

  • A SpotDraft account with permission to create API credentials (Developer Settings)
  • A Contracts.ai organization administrator
  • Network access from Contracts.ai to your SpotDraft regional API endpoint

How to connect

Step 1 — Create API credentials in SpotDraft

  1. Log in to SpotDraft.
  2. Go to Settings → Developer Settings.
  3. Click Generate API Credential and give it a name (e.g. Contracts.ai).
  4. Copy the Client ID and Client Secret.
    • The secret is shown only once in SpotDraft — store it securely before leaving the page.

Step 2 — Connect in Contracts.ai

  1. Open AdminIntegrationsSpotDraft.
  2. Enter:
    • Client ID (required)
    • Client Secret (required)
    • User Email (optional) — if provided, API calls are made on behalf of this SpotDraft user
    • Region (required) — must match your SpotDraft instance:
Region optionAPI host
Default (India)api.in.spotdraft.com
Indiaapi.in.spotdraft.com
United Statesapi.us.spotdraft.com
European Unionapi.eu.spotdraft.com
Middle Eastapi.me.spotdraft.com
  1. Click Connect SpotDraft.

Contracts.ai verifies the credentials against the SpotDraft API. On success you’ll see SpotDraft connected with connection details (user email if set, region).

On first connect, a background index sync starts automatically so contract search can be faster later.


After connecting — import options

The SpotDraft panel has a single connection view (no separate field-mapping tabs). Use the sections below to control what gets imported.

Bulk import

Click Import contracts in the panel footer to start a background bulk import.

Optional filters (set before importing):

ControlBehavior
Import limitMaximum number of contracts to import (e.g. 500). Leave blank to import all matching contracts.
Filter by contract typeCheck one or more contract types to limit the import. Leave all unchecked to include every type.

What happens during bulk import:

  1. Contracts.ai lists contracts from SpotDraft (paginated).
  2. Contracts already linked via spotdraft://<id> are skipped.
  3. For each new contract, the PDF is downloaded from SpotDraft.
  4. Duplicate files (same hash) may be skipped.
  5. New contracts are staged and queued for AI analysis.

Imports run asynchronously. Contracts appear in your list after processing completes (often a few minutes; large imports take longer).

Note: Bulk import attempts to download PDFs for listed contracts. Contracts without a downloadable file are skipped. Webhook import (below) only handles fully executed contracts.

Browse & import specific contracts

Use Browse contracts to cherry-pick individual contracts:

  1. Open the browse dialog (initial load may list contracts when the search box is empty).
  2. Search by contract name, type, or ID.
  3. Paste multiple IDs — one per line or comma-separated — to look up specific contracts.
  4. Select checkboxes for the contracts you want.
  5. Click Import selected.

Search index (faster browsing)

The browse dialog shows index status:

StatusMeaning
Index not builtSearch queries SpotDraft live (slow for large repositories).
Indexing…Background sync in progress.
N contracts indexedLocal index ready; search is fast.
  • Click Build Index to start indexing.
  • Click Re-sync to refresh the index after large changes in SpotDraft.
  • Index sync also starts automatically when you first connect.

Automatic sync (webhook)

Enable webhooks to import contracts automatically when they are fully executed (signed) in SpotDraft.

  1. In the Automatic sync (webhook) section, click Enable automatic sync.
  2. Contracts.ai registers a webhook with SpotDraft for the CONTRACT_EXECUTED event.
  3. When active, the panel shows Active and displays the webhook URL.

Webhook behavior:

  • SpotDraft calls Contracts.ai when a contract is executed.
  • Contracts.ai downloads the contract PDF and queues it for analysis.
  • Contracts already imported (same SpotDraft contract ID) are skipped.
  • Payloads are verified with HMAC-SHA512 when SpotDraft provides an HMAC key.

To disable automatic import, click Remove webhook.

Webhook import is execution-only. Bulk and selective import can include contracts in other states if a PDF is available.


What users see after import

Imported contracts are linked to SpotDraft via:

  • Source unique ID: spotdraft://<contract_id>
  • Source URL: https://app.spotdraft.com/contracts/<contract_id>

They appear in the main contracts list like any other imported contract and go through standard AI analysis (metadata extraction, risks, obligations, etc.).

There is currently no admin UI to map SpotDraft fields to Contracts.ai fields, and no push sync back to SpotDraft from the contract page.


Disconnecting

Click Disconnect in the panel footer to remove the SpotDraft connection from Contracts.ai.

  • Already-imported contracts remain in Contracts.ai.
  • Stored API credentials are removed.
  • If a webhook was configured, remove it in the UI before disconnecting if you want to stop SpotDraft callbacks cleanly.

Typical workflows

Test with a small batch

  1. Connect SpotDraft.
  2. Set Import limit to 10 (or use Browse contracts and import a few).
  3. Click Import contracts and confirm contracts analyze correctly.
  4. Enable Automatic sync for ongoing executed contracts.

Large repository

  1. Connect and wait for (or manually run) Build Index.
  2. Use Browse contracts with search or pasted IDs for targeted imports, or
  3. Use bulk import with contract type filters to narrow scope.

Ongoing executed-contract intake

  1. Connect SpotDraft.
  2. Enable Automatic sync (webhook).
  3. New fully executed contracts in SpotDraft flow into Contracts.ai without manual import.

Troubleshooting

IssueWhat to check
Connect fails (401)Client ID and Client Secret; credential not revoked in SpotDraft
Connect fails (403)API credential lacks permission to list contracts
Wrong regionRegion must match your SpotDraft tenant (US vs EU vs India, etc.)
No contract types in filterConnection valid but SpotDraft returned no types; try import without filter
Import started, nothing appearsBackground job still running; check Celery/worker logs for org
Contract skipped in bulk importAlready imported (spotdraft:// match) or PDF download unavailable
Slow browse/searchBuild or re-sync the local index
Webhook not importingWebhook shows Active; contract reached executed state; contract not already imported
Duplicate skipped on webhookSame SpotDraft contract ID already exists in Contracts.ai

  • Organization Settings — e.g. import-only-fully-executed and analysis language (apply to all imports, not SpotDraft-specific).
  • Custom Fields — store org-specific metadata on imported contracts (populated by AI, not SpotDraft field mapping).
  • Roles & Permissions — control who can view and edit imported contracts after intake.

Summary

SpotDraft integration is a straight path: connect with API credentials, import contracts in bulk or by selection, optionally index your repository for fast search, and enable webhooks to automatically pull fully executed contracts into Contracts.ai for analysis.

Did this answer your question?