Lead Form Submission

Send cases from a web form into Lexamica.


🎯 Overview

📌 TL;DR

This is the simplest integration: capture leads from a form, send them to Lexamica, and let the Relay Engine find a partner firm. No webhooks, no polling—just one API call per case.

This guide is for you if:

  • You have a web form that captures case/lead information

  • You want cases to automatically enter Lexamica's Relay Engine

  • You don't need real-time updates back (you'll check status in-platform)

What you'll build:

  • A Case mapping to translate your form fields

  • An API call that sends cases to Lexamica

What this does NOT cover:

  • Receiving notifications when cases are matched or accepted

  • Responding to invitations

  • Uploading files

For those features, see Originator: Full Integration with Webhooks.


📖 Key Terms

Term
Definition

Mapping

Configuration that translates your field names to Lexamica's field names

Relay Engine

Lexamica's automatic matching system that routes cases to partner firms

Public Key

API key used for sending data to Lexamica


⚙️ Architecture

🎯 Key Takeaway

One API call sends the case. Lexamica handles everything else—matching, invitations, and tracking.


📋 Prerequisites

Credentials:

Foundational Docs:


💡 Step-by-Step Implementation

Step 1: Create Your Case Mapping

First, create a mapping that translates your form fields to Lexamica's Case fields.

Request:

Response:

💡 Tip: Save the _id from the response—this is your Mapping ID that you'll use for every case submission.

Step 2: Send Cases to Lexamica

When your form is submitted, send the case to Lexamica.

Request:

Response:

Step 3: Store the Case ID

Always store the returned case_id in your system. This allows you to:

  • Look up the case in Lexamica later

  • Prevent duplicate submissions

  • Correlate if you add webhooks in the future


🔧 Complete Code Example

Node.js/Express Implementation

HTML Form Example


❓ FAQ

❓ "What fields are required?"

📝 Full Answer: For the /case/{mapId}/send endpoint, your mapping must provide:

  • client.firstName

  • client.lastName

  • client.phoneNumber

  • caseType

  • incident.date

  • incident.address.state

  • incident.synopsis

client.email is optional but recommended.


❓ "What happens after I submit?"

📝 Full Answer:

  1. The case enters Lexamica's Relay Engine

  2. Relay finds matching partner firms based on case type and location

  3. Invitations are sent to potential handlers

  4. You can check the case status by logging into the Lexamica platform

To get automated updates, see Originator: Full Integration with Webhooks


❓ "How do I prevent duplicate submissions?"

🔍 Quick Check:

  • Store the Lexamica case_id after successful submission

  • Check if you've already submitted this lead before sending

📝 Full Answer:


🔧 Troubleshooting

"400 Bad Request - Missing required field"

  • Check that your mapping includes all required fields

  • Verify the form data is being sent with the expected field names

"401 Unauthorized"

  • Verify your Public Key is correct

  • Check that it's being passed as ?Key=... or in the Authorization header

"404 Not Found"

  • Verify your Organization ID and Mapping ID are correct

  • Ensure the mapping exists (use GET /mapping to list mappings)


➡️ Next Steps

Once your basic form integration is working:


Last updated: January 2026

Last updated