Integration Examples

Choose the guide that matches your integration needs.


🎯 Overview

📌 TL;DR

Find your use case below and follow the corresponding guide. Each guide is self-contained with everything you need to implement that specific integration pattern.

These guides cover the most common integration patterns with the Lexamica API. Each is designed for a specific use case, so you only need to read what's relevant to you.


📖 Find Your Guide

What role does your firm play?

Are you SENDING cases to other firms?

├─► YES: You're an ORIGINATOR
│   │
│   ├─► Just sending leads from a form?
│   │   └─► Lead Form Submission (simplest)
│   │
│   ├─► Sending cases + want updates back?
│   │   ├─► Can receive webhooks? → Originator: Full Integration (Webhooks)
│   │   └─► Need to poll instead? → Originator: Full Integration (Polling)
│   │
│   └─► Importing existing cases with known handlers?
│       ├─► Can receive webhooks? → Import Existing Cases (Webhooks)
│       └─► Need to poll instead? → Import Existing Cases (Polling)

└─► NO: You're a HANDLER (receiving cases)

    ├─► Just want to know when cases arrive?
    │   ├─► Can receive webhooks? → Receive Cases (Webhooks)
    │   └─► Need to poll instead? → Receive Cases (Polling)

    └─► Want to respond to invitations + send updates via API?
        ├─► Can receive webhooks? → Handler Firm: Full Integration (Webhooks)
        └─► Need to poll instead? → Handler Firm: Full Integration (Polling)

📋 All Guides at a Glance

Originator Guides (Sending Cases)

Guide
Use Case
Complexity
Data Flow

Send cases from a web form

Minimal

Outbound only

Send cases + receive all updates in real-time

Medium-High

Bidirectional

Send cases + poll for updates

Medium-High

Bidirectional

Import cases with known handlers + track via webhooks

Medium

Outbound + Inbound

Import cases with known handlers + poll for updates

Medium

Outbound + Inbound

Handler Guides (Receiving Cases)

Guide
Use Case
Complexity
Data Flow

Get notified of new cases via webhook

Low

Inbound only

Poll for new cases (firewall-friendly)

Low

Inbound only

Receive invitations + respond via API + webhooks

High

Bidirectional

Receive invitations + respond via API + polling

High

Bidirectional

Appendix

Guide
Use Case

Upload, download, and manage case files (works with any integration)


⚙️ Prerequisites (All Guides)

Before starting any integration, ensure you have:

1. Credentials

2. Foundational Docs (read these first)

Doc
Required For

Sending cases, responding to invitations, uploading files

Receiving events via webhooks

Receiving events via polling

3. Infrastructure


💡 Choosing Between Webhooks and 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

Complexity

Need to handle signatures

Simpler request/response

Best for

Real-time notifications

Batch processing, restricted networks

💡 Tip: If you're unsure, start with webhooks for real-time updates. Switch to polling if your infrastructure doesn't support inbound connections.


🔧 Quick Reference

Base URL

Common Endpoints

Purpose
Endpoint

Send case to Relay

POST /organization/{orgId}/inbound-webhooks/case/{mapId}/send

Create existing case

POST /organization/{orgId}/inbound-webhooks/case/{mapId}/create-existing

Accept invitation

POST /organization/{orgId}/inbound-webhooks/case-invitation/{mapId}/accept

Create mapping

POST /organization/{orgId}/mapping/create

Create webhook subscription

POST /organization/{orgId}/webhook-subscriptions/create

Create stored event subscription

POST /organization/{orgId}/stored-event-subscriptions/create

Query stored events

GET /organization/{orgId}/stored-events

Key Events

Event
Triggered When

Case Created

A new case is created

Case Received

Your firm receives a case (as handler)

Case Relay Matched

Relay Engine finds a partner

Case Invitation Sent

An invitation is sent to a firm

Case Invitation Accepted

A firm accepts an invitation

Case Invitation Declined

A firm declines an invitation

Case Update Made

A status update is posted

Case Settlement

Settlement process begins

Case File Uploaded

A file is uploaded to a case


Last updated: January 2026

Last updated