Skip to content
Developer

API Documentation

Complete REST API reference for building custom integrations with Regure. Manage documents, claims, workflows, users, and subscribe to real-time events via webhooks.

Build custom integrations with Regure's REST API

Regure's REST API provides programmatic access to all platform capabilities — document processing, claims management, workflow orchestration, and user administration. Use the API to integrate Regure with custom applications, internal systems, data warehouses, or any third-party platform not covered by pre-built integrations.

The API is designed for insurance operations teams and developers building insurance technology. Authentication uses OAuth 2.0 or API keys. All endpoints return JSON. Rate limits are generous (10,000 requests/hour for production accounts). Webhooks provide real-time event notifications for document processing, claim updates, and workflow completions.

API access is included with all Regure plans. Developer sandbox environments are available for testing without affecting production data. Comprehensive code examples in JavaScript, Python, and curl are provided for common operations.

RESTful APIStandard REST endpoints with JSON request/response format
OAuth 2.0 & API KeysSecure authentication with token refresh and API key support
10,000 req/hourGenerous rate limits for production accounts, higher limits available

OAuth 2.0 and API key authentication

Regure supports OAuth 2.0 for user-scoped access and API keys for server-to-server integration.

OAuth 2.0 (Recommended)

Use OAuth 2.0 for integrations where user context is required (e.g., mobile apps, web apps, third-party integrations). OAuth tokens are scoped to specific users and expire after 24 hours. Refresh tokens allow continuous access without re-authentication.

Request an access token:

curl -X POST https://api.regure.com/oauth/token \
  -H "Content-Type: application/json" \
  -d '{
    "client_id": "your_client_id",
    "client_secret": "your_client_secret",
    "grant_type": "authorization_code",
    "code": "authorization_code_from_callback"
  }'

Response:

{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "token_type": "Bearer",
  "expires_in": 86400
}

API Keys (Server-to-Server)

Use API keys for server-to-server integrations where user context is not required (e.g., automated document processing, batch uploads, data sync). API keys do not expire and are scoped to your organization account.

Authenticate with API key:

curl -X GET https://api.regure.com/v1/claims \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

API keys are generated in your Regure account settings under API Access. Store API keys securely — they provide full access to your organization's data. Rotate keys regularly and revoke compromised keys immediately.

API endpoints for documents, claims, workflows, and users

All endpoints are versioned (currently v1). Base URL: https://api.regure.com/v1/

Documents API

Upload, classify, extract, retrieve, and search documents. Supports multi-file uploads, classification confidence scores, and full-text search.

  • POST /documents — Upload document(s)
  • GET /documents/:id — Retrieve document
  • GET /documents/search — Search documents
  • POST /documents/:id/classify — Trigger classification
  • GET /documents/:id/extracted-data — Get extracted fields

Claims API

Create claims, update status, add notes, retrieve claim data, and search claims by various criteria.

  • POST /claims — Create new claim
  • GET /claims/:id — Retrieve claim details
  • PATCH /claims/:id — Update claim status/data
  • POST /claims/:id/notes — Add note to claim
  • GET /claims/search — Search claims

Workflows API

Trigger workflows, update workflow steps, query workflow state, and retrieve workflow history.

  • POST /workflows/:id/trigger — Start workflow
  • GET /workflows/:id/status — Get workflow status
  • PATCH /workflows/:id/steps/:stepId — Update step
  • GET /workflows/:id/history — Get workflow history

Users API

Manage users, roles, permissions, and team assignments. Admin access required.

  • POST /users — Create new user
  • GET /users/:id — Retrieve user details
  • PATCH /users/:id — Update user data
  • POST /users/:id/roles — Assign role to user
  • GET /users — List all users

Common API operations with code examples

Examples in JavaScript (Node.js), Python, and curl for the most common integration tasks.

Example 1: Upload a document and trigger classification

Upload a PDF document and immediately trigger AI classification to identify document type.

curl:

curl -X POST https://api.regure.com/v1/documents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@/path/to/document.pdf" \
  -F "claim_id=CLM-2024-001" \
  -F "auto_classify=true"

JavaScript (Node.js):

const FormData = require('form-data');
const fs = require('fs');
const fetch = require('node-fetch');

const formData = new FormData();
formData.append('file', fs.createReadStream('/path/to/document.pdf'));
formData.append('claim_id', 'CLM-2024-001');
formData.append('auto_classify', 'true');

const response = await fetch('https://api.regure.com/v1/documents', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
  },
  body: formData
});

const data = await response.json();
console.log(data);
// { "document_id": "doc_abc123", "classification": "police_report", "confidence": 0.987 }

Python:

import requests

url = "https://api.regure.com/v1/documents"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
files = {"file": open("/path/to/document.pdf", "rb")}
data = {"claim_id": "CLM-2024-001", "auto_classify": "true"}

response = requests.post(url, headers=headers, files=files, data=data)
print(response.json())
# { "document_id": "doc_abc123", "classification": "police_report", "confidence": 0.987 }

Example 2: Create a claim via API

Create a new claim record with claimant details and loss information.

curl:

curl -X POST https://api.regure.com/v1/claims \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "policy_number": "POL-2024-5678",
    "claimant_name": "John Smith",
    "claimant_email": "john@example.com",
    "loss_date": "2024-02-15",
    "loss_type": "auto_accident",
    "loss_description": "Rear-end collision at intersection",
    "estimated_damage": 5500
  }'

Response:

{
  "claim_id": "CLM-2024-001",
  "status": "open",
  "created_at": "2024-02-18T14:30:00Z",
  "assigned_adjuster": null,
  "policy_number": "POL-2024-5678",
  "claimant_name": "John Smith"
}

Example 3: Search documents by claim ID

Retrieve all documents associated with a specific claim.

curl:

curl -X GET "https://api.regure.com/v1/documents/search?claim_id=CLM-2024-001" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response:

{
  "results": [
    {
      "document_id": "doc_abc123",
      "filename": "police_report.pdf",
      "classification": "police_report",
      "uploaded_at": "2024-02-18T10:15:00Z",
      "confidence": 0.987
    },
    {
      "document_id": "doc_def456",
      "filename": "damage_photo_1.jpg",
      "classification": "photo",
      "uploaded_at": "2024-02-18T10:18:00Z",
      "confidence": 0.995
    }
  ],
  "total": 2
}

Rate limits, quotas, and webhook event types

Rate Limits

Production accounts have a default rate limit of 10,000 requests per hour per API key. Rate limits reset at the top of each hour. Higher limits are available for enterprise accounts.

Rate limit headers are included in all API responses:

  • X-RateLimit-Limit: 10000
  • X-RateLimit-Remaining: 9847
  • X-RateLimit-Reset: 1708272000

When rate limit is exceeded, API returns HTTP 429 with a Retry-After header indicating when to retry.

Webhook Event Types

Subscribe to real-time events via webhooks. See Webhooks documentation for complete details.

  • document.uploaded
  • document.classified
  • document.extracted
  • claim.created
  • claim.updated
  • workflow.completed

Ready to start building with Regure's API?

Request API access and get your credentials. We'll provide sandbox access for testing and full documentation for all endpoints.