ContractRabbit Docs
API Reference

API Reference

ContractRabbit REST API documentation.

Overview

The ContractRabbit API provides programmatic access to contract analysis features. You can upload documents, query extracted data, and search across your corpus using simple REST endpoints.

Authentication

ContractRabbit supports two authentication methods:

Create an API key from Settings > API Keys in the ContractRabbit dashboard. Include it in the Authorization header:

curl -H "Authorization: Bearer cr_live_abc123..." \
  https://app.contractrabbit.com/api/files

ContractRabbit supports two types of API keys:

Key typeScopeHow to create
User API KeyAccess documents in your personal workspaceSettings > API Keys (in your user profile)
Organization API KeyAccess documents across the entire organizationOrganization Settings > API Keys (requires admin)

User keys authenticate as you and resolve to your personal team. Organization keys authenticate in the context of the organization, giving access to all documents shared with the org. Organization keys are ideal for CI/CD pipelines, internal tools, and team-wide integrations where access shouldn't be tied to a single person's account.

Session Tokens

Browser-based sessions use Clerk session cookies automatically. This is used by the ContractRabbit web application and does not require manual configuration.

API Key Eligible Endpoints

The following endpoints accept API key authentication:

EndpointMethodsDescription
/api/filesGET, POSTList and upload files
/api/files/:fileIdGET, PUT, DELETEFile CRUD operations
/api/files/:fileId/statusGETCheck file processing status
/api/files/:fileId/documentsGETGet document segments
/api/files/:fileId/downloadGETDownload original file
/api/searchGETUnified search across documents
/api/files/search-indexGETFull-text search

Rate Limiting

API key requests are rate-limited to 100 requests per 60 seconds. User keys are rate-limited per user; organization keys are rate-limited per organization. Rate limit information is included in response headers:

HeaderDescription
X-RateLimit-LimitMaximum requests per window
X-RateLimit-RemainingRemaining requests in current window
X-RateLimit-ResetUnix timestamp when the window resets

When the rate limit is exceeded, the API returns 429 Too Many Requests with a Retry-After header indicating how many seconds to wait.

Error Responses

All error responses return JSON:

{
  "error": "Description of the error"
}
Status CodeDescription
401Invalid or missing API key
403Endpoint not available via API key auth
429Rate limit exceeded

Quick Start

# List your files
curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://app.contractrabbit.com/api/files

# Search across documents
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://app.contractrabbit.com/api/search?q=termination+clause"

# Get file processing status
curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://app.contractrabbit.com/api/files/FILE_ID/status

Endpoints

Browse endpoint documentation by category using the sidebar navigation.

On this page