# 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                                                        |
| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
| [1.-organizations-and-authentication](https://integrate.lexamica.com/1.-organizations-and-authentication "mention") | Get your API keys and understand the two-tier authentication model |
| [2.-mapping-engine](https://integrate.lexamica.com/2.-mapping-engine "mention")                                     | 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                                                |
| --------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| [3.-inbound-webhooks](https://integrate.lexamica.com/3.-inbound-webhooks "mention")           | Send data to Lexamica (cases, invitations, updates, files) |
| [4.-webhook-subscriptions](https://integrate.lexamica.com/4.-webhook-subscriptions "mention") | Receive real-time event notifications from Lexamica        |
| [5.-event-storage-polling](https://integrate.lexamica.com/5.-event-storage-polling "mention") | Poll for events when webhooks aren't an option             |

### Integration Examples

Step-by-step guides for common integration patterns:

| Guide                                                                                                                    | Use Case                                  |
| ------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------- |
| [example-integrations](https://integrate.lexamica.com/example-integrations "mention")                                    | Find the right guide for your integration |
| [1.-lead-form-submission](https://integrate.lexamica.com/example-integrations/1.-lead-form-submission "mention")         | Send cases from a web form (simplest)     |
| [2a.-receive-cases-webhook](https://integrate.lexamica.com/example-integrations/2a.-receive-cases-webhook "mention")     | Get notified when cases arrive            |
| [2b.-receive-cases-polling](https://integrate.lexamica.com/example-integrations/2b.-receive-cases-polling "mention")     | Poll for incoming cases                   |
| [3a.-originator-full-webhook](https://integrate.lexamica.com/example-integrations/3a.-originator-full-webhook "mention") | Send cases + receive all updates          |
| [3b.-originator-full-polling](https://integrate.lexamica.com/example-integrations/3b.-originator-full-polling "mention") | Send cases + poll for updates             |
| [5a.-import-existing-webhook](https://integrate.lexamica.com/example-integrations/5a.-import-existing-webhook "mention") | Import cases with known handlers          |
| [5b.-import-existing-polling](https://integrate.lexamica.com/example-integrations/5b.-import-existing-polling "mention") | Import cases + poll for updates           |
| [4a.-handler-firm-webhook](https://integrate.lexamica.com/example-integrations/4a.-handler-firm-webhook "mention")       | Receive invitations + respond via API     |
| [4b.-handler-firm-polling](https://integrate.lexamica.com/example-integrations/4b.-handler-firm-polling "mention")       | Receive invitations via polling           |
| [apx-1.-file-operations](https://integrate.lexamica.com/example-integrations/apx-1.-file-operations "mention")           | 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. [1.-organizations-and-authentication](https://integrate.lexamica.com/1.-organizations-and-authentication "mention") — How API keys work
2. [2.-mapping-engine](https://integrate.lexamica.com/2.-mapping-engine "mention") — How to configure field transformations
3. [3.-inbound-webhooks](https://integrate.lexamica.com/3.-inbound-webhooks "mention") or [4.-webhook-subscriptions](https://integrate.lexamica.com/4.-webhook-subscriptions "mention") — Depending on your data flow

### 4. Follow an Integration Example

Pick the [example-integrations](https://integrate.lexamica.com/example-integrations "mention") 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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
