> For the complete documentation index, see [llms.txt](https://integrate.lexamica.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://integrate.lexamica.com/readme.md).

# Lexamica Integration API Documentation

Build integrations that connect your systems with Lexamica's case management and referral platform.

***

## 🎯 What You Can Do

The Lexamica Integration API enables you to:

* **Send cases** from your CRM, intake forms, or case management system
* **Receive cases** when other firms refer work to you
* **Track case lifecycle** with real-time updates on relay matching, invitations, and status changes
* **Sync bidirectionally** between your systems and Lexamica
* **Manage files** by uploading and downloading case documents

***

## 📚 Documentation Overview

### Start Here

| Doc                                                                         | Description                                                        |
| --------------------------------------------------------------------------- | ------------------------------------------------------------------ |
| [Organizations and Authentication](/1.-organizations-and-authentication.md) | Get your API keys and understand the two-tier authentication model |
| [Mapping Engine](/2.-mapping-engine.md)                                     | Configure how your field names translate to Lexamica's fields      |
| [OpenAPI Spec (Redoc)](https://integration.lexamica.com/)                   | Ingest the OpenAPI spec directly                                   |

### Core Capabilities

| Doc                                                       | Description                                                |
| --------------------------------------------------------- | ---------------------------------------------------------- |
| [Inbound Webhooks](/3.-inbound-webhooks.md)               | Send data to Lexamica (cases, invitations, updates, files) |
| [Webhook Subscriptions](/4.-webhook-subscriptions.md)     | Receive real-time event notifications from Lexamica        |
| [Event Storage and Polling](/5.-event-storage-polling.md) | Poll for events when webhooks aren't an option             |

### Integration Examples

Step-by-step guides for common integration patterns:

| Guide                                                                                              | Use Case                                  |
| -------------------------------------------------------------------------------------------------- | ----------------------------------------- |
| [Integration Examples](/example-integrations.md)                                                   | Find the right guide for your integration |
| [Lead Form Submission](/example-integrations/1.-lead-form-submission.md)                           | Send cases from a web form (simplest)     |
| [Receive Cases via Webhook](/example-integrations/2a.-receive-cases-webhook.md)                    | Get notified when cases arrive            |
| [Receive Cases via Polling](/example-integrations/2b.-receive-cases-polling.md)                    | Poll for incoming cases                   |
| [Originator: Full Integration with Webhooks](/example-integrations/3a.-originator-full-webhook.md) | Send cases + receive all updates          |
| [Originator: Full Integration with Polling](/example-integrations/3b.-originator-full-polling.md)  | Send cases + poll for updates             |
| [Import Existing Cases with Webhooks](/example-integrations/5a.-import-existing-webhook.md)        | Import cases with known handlers          |
| [Import Existing Cases with Polling](/example-integrations/5b.-import-existing-polling.md)         | Import cases + poll for updates           |
| [Handler Firm: Full Integration with Webhooks](/example-integrations/4a.-handler-firm-webhook.md)  | Receive invitations + respond via API     |
| [Handler Firm: Full Integration with Polling](/example-integrations/4b.-handler-firm-polling.md)   | Receive invitations via polling           |
| [File Operations](/example-integrations/apx-1.-file-operations.md)                                 | Upload, download, and manage files        |

***

## 🚀 Quick Start

### 1. Get Your Credentials

Contact Lexamica to receive:

* **Organization ID** — identifies your firm
* **Public Key** — for sending data to Lexamica
* **Private Key** — for configuration and management operations

### 2. Choose Your Integration Pattern

```
Are you SENDING cases to other firms?
│
├─► YES: You're an ORIGINATOR
│   └─► Start with: Lead Form Submission or Originator guides
│
└─► NO: You're a HANDLER (receiving cases)
    └─► Start with: Receive Cases or Handler Firm guides
```

### 3. Read the Foundational Docs

Before diving into examples, understand the building blocks:

1. [Organizations and Authentication](/1.-organizations-and-authentication.md) — How API keys work
2. [Mapping Engine](/2.-mapping-engine.md) — How to configure field transformations
3. [Inbound Webhooks](/3.-inbound-webhooks.md) or [Webhook Subscriptions](/4.-webhook-subscriptions.md) — Depending on your data flow

### 4. Follow an Integration Example

Pick the [Integration Examples](/example-integrations.md) that matches your use case and follow it step-by-step.

***

## 🔧 Base URLs

| Environment    | URL                                     |
| -------------- | --------------------------------------- |
| **Production** | `https://integration.lexamica.com`      |
| **Sandbox**    | `https://integration-demo.lexamica.com` |

Use the sandbox environment for development and testing before going live.

***

## 💡 Webhooks vs. Polling

| Factor             | Webhooks                       | Polling                               |
| ------------------ | ------------------------------ | ------------------------------------- |
| **Latency**        | Real-time (seconds)            | Depends on poll frequency             |
| **Infrastructure** | Requires public HTTPS endpoint | Outbound requests only                |
| **Firewall**       | Needs inbound access           | Firewall-friendly                     |
| **Best for**       | Real-time sync                 | Batch processing, restricted networks |

Most integrations use **webhooks** for real-time updates. Use **polling** if your infrastructure doesn't support inbound connections.

***

## 📞 Support

* **Technical Issues**: Contact Lexamica integration support
* **API Access**: Request credentials through your Lexamica account manager

***

*Last updated: January 2026*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://integrate.lexamica.com/readme.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
