Integration Steps
Follow these steps to integrate your application with Lawmatics through LawLink.ai.
Create Organization Admin & Login
First, a Superuser or Admin creates an Organization Admin (ORG_ADMIN) account for your law firm. The ORG_ADMIN will manage attorneys and API tokens for the organization.
💡 Tip: Login to LawLink at
https://app.lawlink.ai using your ORG_ADMIN credentials.
Create API Access Token
Navigate to API Tokens page and create a new API access token for integration. Set an appropriate expiration period (e.g., 1 year). Copy the token immediately — it's only shown once!
⚠️ Important: Store your API token securely. It grants access to all attorneys in your organization via the attorney_email parameter.
Add Attorney Users
As an ORG_ADMIN, navigate to the Organization page and add user accounts for each attorney. Each attorney will have their own Lawmatics connection and data.
📋 Fields Required: Email, Full Name, Password. Users are automatically assigned the USER role.
Authentication
Attorney Authorizes Lawmatics Access
Each attorney must authorize LawLink to access their Lawmatics account. An admin can initiate the request, or the attorney can login and connect directly.
🔐 OAuth Flow: The attorney will be redirected to Lawmatics to grant access, then returned to LawLink upon success.
API Usage
Call APIs with Token & Attorney Email
Use your API token in the Authorization header as a Bearer token.
Specify which attorney's Lawmatics account to access using the attorney_email query
parameter.
API Request Structure
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json
# Query Parameter (for ORG_ADMIN tokens)
attorney_email=attorney@lawfirm.com
Example: Get Contacts
# Get contacts for a specific attorney
curl.exe -X GET \
"https://app.lawlink.ai/api/v1/lawmatics/contacts?attorney_email=attorney@lawfirm.com&limit=10" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-H "Content-Type: application/json"
Example: Create Matter (Prospect)
# Create a new prospect in attorney's Lawmatics account
curl.exe -X POST \
"https://app.lawlink.ai/api/v1/lawmatics/matters?attorney_email=attorney@lawfirm.com" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"first_name": "Jane",
"last_name": "Doe",
"email": "jane.doe@example.com",
"case_title": "Personal Injury Intake"
}'
🔑 Key Points:
- The
attorney_emailparameter identifies which attorney's Lawmatics account to use - All API calls affect the specified attorney's Lawmatics data
- ORG_ADMIN tokens can access any attorney in their organization
Contact Conflict Check
Implement Contact Conflict Check
Before creating a new contact, use the /api/v1/lawmatics/contacts/check endpoint
to detect potential duplicates.
🔍 Detection Logic: matches by Email, Phone, or Name.
POST /api/v1/lawmatics/contacts/check
{
"first_name": "Jane",
"last_name": "Doe",
"email": "jane@example.com",
"phone": "+15551234567"
}