SmartAdvocate Integration Guide

Complete guide to integrating SmartAdvocate through LawLink.ai

âš–ī¸ SmartAdvocate CaseSync API
🚀

Integration Setup

SmartAdvocate uses credential-based authentication (username + password). Each user connects their own SmartAdvocate account through LawLink. No OAuth redirect is required.

Create Organization Admin & Login

A Superuser or Admin creates an Organization Admin (ORG_ADMIN) account for your law firm. The ORG_ADMIN manages users and API tokens.

💡 Tip: Login to LawLink at https://app.lawlink.ai using your ORG_ADMIN credentials.

Create API Access Token

Navigate to API Tokens and create a new access token. Set an appropriate expiration period. Copy the token immediately — it is only shown once.

âš ī¸ Important: Store your API token securely. It grants access to all users in your organization.

Add User Accounts

As an ORG_ADMIN, navigate to the Organization page and add user accounts. Each user will connect their own SmartAdvocate credentials.

📋 Fields Required: Email, Full Name, Password. Users are automatically assigned the USER role.

Connect SmartAdvocate Credentials

Each user connects their SmartAdvocate account by providing their credentials via the LawLink Integrations page (or via API). LawLink validates the credentials against the SmartAdvocate CaseSync API and stores the session token securely.

🔄 Auto-refresh: LawLink automatically re-authenticates using stored credentials when the session token expires — no action required by the user.

📁

Cases

Retrieve, search, and create cases. Cases can be looked up by case number (string) or internal numeric case ID.

GET /api/v1/smartadvocate/cases List cases, optionally filtering by case number
Query Parameters
ParameterTypeDescription
case_numberstringCase number or prefix to search
attorney_emailstringORG_ADMIN: act on behalf of this user
# List all cases curl.exe -X GET \ "https://app.lawlink.ai/api/v1/smartadvocate/cases" \ -H "Authorization: Bearer ACCESS_TOKEN" # Filter by case number prefix curl.exe -X GET \ "https://app.lawlink.ai/api/v1/smartadvocate/cases?case_number=2024-001" \ -H "Authorization: Bearer ACCESS_TOKEN"
GET /api/v1/smartadvocate/cases/{case_number} Get a single case by its case number
Path Parameters
ParameterTypeDescription
case_numberstringThe SmartAdvocate case number *
GET /api/v1/smartadvocate/cases/by-id/{case_id} Get a single case by its numeric case ID
Path Parameters
ParameterTypeDescription
case_idintegerNumeric SmartAdvocate case ID *
GET /api/v1/smartadvocate/cases/active List active cases with optional staff filter
Query Parameters
ParameterTypeDescription
staff_contact_idintegerFilter by staff member contact ID
pageintegerPage index (default 0)
page_sizeintegerResults per page (default 50, max 200)
POST /api/v1/smartadvocate/cases Create a new case

Send a JSON body matching the SmartAdvocate CaseSync API case creation schema. Required fields vary by case type — refer to your SmartAdvocate instance configuration.

âš ī¸ Note: The request body is passed through as-is to the SmartAdvocate CaseSync API. Consult your SmartAdvocate administrator for the required fields.

GET /api/v1/smartadvocate/cases/{case_id}/contacts List all contacts associated with a case
Path Parameters
ParameterTypeDescription
case_idintegerNumeric case ID *
GET /api/v1/smartadvocate/cases/{case_id}/staff Get staff assigned to a case by case ID
Also available by case number
GET /api/v1/smartadvocate/staff/by-case-number?case_number=2024-001
GET /api/v1/smartadvocate/cases/{case_id}/statuses List status history for a case
Query Parameters
ParameterTypeDescription
pageintegerPage index (default 0)
page_sizeintegerResults per page (default 200, max 500)
# Also available by case number GET /api/v1/smartadvocate/statuses/by-case-number?case_number=2024-001
GET /api/v1/smartadvocate/cases/{case_id}/incident Get incident details for a case
# Also available by case number GET /api/v1/smartadvocate/incident/by-case-number?case_number=2024-001
📝

Notes

GET /api/v1/smartadvocate/notes List notes for a case
Query Parameters
ParameterTypeDescription
case_numberstringCase number * (one required)
case_idintegerNumeric case ID * (one required)

â„šī¸ Note: Provide either case_number or case_id — at least one is required.

GET /api/v1/smartadvocate/notes/types List all available note type IDs and descriptions

Use returned IDs in the note_type_id field when creating notes.

GET /api/v1/smartadvocate/notes/{note_id} Get a single note by its ID
POST /api/v1/smartadvocate/notes Create a new note on a case
Request Body
FieldTypeDescription
case_idintegerSmartAdvocate case ID *
note_type_idintegerNote type ID (see GET /notes/types) *
note_textstringNote body — HTML is allowed *
prioritystringNormal | High | Low (default: Normal)
unique_contact_idintegerContact ID to associate
note_datestringISO 8601 datetime, defaults to now
subjectstringNote subject line
is_shared_in_cpbooleanShare in client portal (default false)
is_shared_with_allbooleanShare with all staff (default false)
curl.exe -X POST \ "https://app.lawlink.ai/api/v1/smartadvocate/notes" \ -H "Authorization: Bearer ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "case_id": 12345, "note_type_id": 3, "note_text": "Client called to confirm hearing date.", "priority": "Normal" }'
PUT /api/v1/smartadvocate/notes Update an existing note
Request Body
FieldTypeDescription
note_idintegerID of the note to update *
note_type_idintegerNew note type ID
note_textstringReplacement note body
is_shared_in_cpbooleanUpdate client portal sharing
is_shared_with_allbooleanUpdate staff sharing
POST /api/v1/smartadvocate/notes/filtered Fetch notes modified within a date range, optionally filtered by case numbers
Request Body
FieldTypeDescription
modified_fromstringISO 8601 start datetime *
modified_tostringISO 8601 end datetime *
case_numbersstring[]Optional list of case numbers to restrict results
pageintegerPage index (default 0)
page_sizeintegerResults per page (default 50, max 200)
✅

Tasks

GET /api/v1/smartadvocate/tasks List tasks for a case
Query Parameters
ParameterTypeDescription
case_numberstringCase number * (one required)
case_idintegerNumeric case ID * (one required)
pageintegerPage index (default 0)
page_sizeintegerResults per page (default 200, max 500)
GET /api/v1/smartadvocate/tasks/types List valid task type descriptions
GET /api/v1/smartadvocate/tasks/statuses List valid task status descriptions
GET /api/v1/smartadvocate/tasks/priorities List valid task priority descriptions
GET /api/v1/smartadvocate/tasks/{task_id} Get a single task by its ID
POST /api/v1/smartadvocate/tasks Create a new task on a case
Request Body
FieldTypeDescription
case_idintegerSmartAdvocate case ID *
summarystringTask summary / title *
case_numberstringCase number (optional, for reference)
descriptionstringDetailed description
due_datestringISO 8601 due date
start_datestringISO 8601 start date
type_descriptionstringType, e.g. "Call" (see GET /tasks/types)
status_descriptionstringStatus, e.g. "Not Started"
priority_descriptionstringPriority, e.g. "Normal"
assignee_idintegerSmartAdvocate user ID of the assignee
curl.exe -X POST \ "https://app.lawlink.ai/api/v1/smartadvocate/tasks" \ -H "Authorization: Bearer ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "case_id": 12345, "summary": "Follow up with client", "due_date": "2026-06-01", "type_description": "Call", "status_description": "Not Started", "priority_description": "Normal" }'
PUT /api/v1/smartadvocate/tasks Update an existing task
Request Body
FieldTypeDescription
idintegerTask ID to update *
case_idintegerReassign to a different case
summarystringUpdated summary
descriptionstringUpdated description
due_datestringUpdated due date
type_descriptionstringUpdated type
status_descriptionstringUpdated status
priority_descriptionstringUpdated priority
assignee_idintegerUpdated assignee
DELETE /api/v1/smartadvocate/tasks/{task_id} Permanently delete a task
{ "deleted": true }
👤

Contacts

GET /api/v1/smartadvocate/contacts/{contact_id} Retrieve a contact record
Query Parameters
ParameterTypeDescription
fullbooleanReturn full contact details including addresses, phones, emails (default false)
GET /api/v1/smartadvocate/contacts/{contact_id}/related List contacts related to a given contact
GET /api/v1/smartadvocate/contact-types List contact type IDs for a given category
Query Parameters
ParameterTypeDescription
contact_ctginteger1 = Individual, 2 = Company (default 1)
POST /api/v1/smartadvocate/contacts/search Find contacts modified within a date range
Query Parameters
ParameterTypeDescription
modified_fromstringISO 8601 start datetime *
modified_tostringISO 8601 end datetime *
case_numberstringRestrict to a single case
pageintegerPage index (default 0)
page_sizeintegerResults per page (default 50, max 200)
POST /api/v1/smartadvocate/contacts Create a new contact record
Request Body
FieldTypeDescription
first_namestringFirst name *
last_namestringLast name *
contact_ctginteger1 = Individual, 2 = Company (default 1)
contact_type_idintegerType ID (see GET /contact-types)
contact_sub_ctg_idintegerSub-category ID
commentsstringFree-form notes
date_of_birthstringISO 8601 date
gender_idintegerGender ID from SmartAdvocate reference data
PATCH /api/v1/smartadvocate/contacts/{contact_id} Partially update a contact using JSON Patch operations

Send a JSON array of patch operations in the format used by the SmartAdvocate CaseSync API.

curl.exe -X PATCH \ "https://app.lawlink.ai/api/v1/smartadvocate/contacts/9876" \ -H "Authorization: Bearer ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '[ { "op": "replace", "path": "/firstName", "value": "Jane" } ]'
📅

Calendar & Appointments

GET /api/v1/smartadvocate/calendar/types List appointment type IDs and descriptions
GET /api/v1/smartadvocate/calendar/activity-types List appointment activity type IDs
GET /api/v1/smartadvocate/calendar/statuses List valid appointment status IDs
GET /api/v1/smartadvocate/cases/{case_id}/calendar List appointments for a case by case ID
# Also available by case number GET /api/v1/smartadvocate/calendar/by-case-number?case_number=2024-001
POST /api/v1/smartadvocate/cases/{case_id}/calendar Add an appointment to a case
Request Body
FieldTypeDescription
from_datestringISO 8601 start datetime *
to_datestringISO 8601 end datetime *
appointment_type_idintegerType ID (default 3 = Case-related No Court)
subjectstringAppointment subject
commentsstringAdditional comments
addressstringLocation address (send empty string if none)
status_idintegerStatus ID (see GET /calendar/statuses)
activity_type_idintegerActivity type ID
staff_idsinteger[]List of staff contact IDs to attend
owner_user_idintegerSmartAdvocate user ID for appointment owner
document_idsinteger[]Document IDs to attach
curl.exe -X POST \ "https://app.lawlink.ai/api/v1/smartadvocate/cases/12345/calendar" \ -H "Authorization: Bearer ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "from_date": "2026-06-15T10:00:00", "to_date": "2026-06-15T11:00:00", "subject": "Deposition - Smith v. Jones", "appointment_type_id": 3, "address": "123 Court St, New York, NY" }'
📄

Documents

GET /api/v1/smartadvocate/cases/{case_id}/documents List documents attached to a case (by case ID)
Query Parameters
ParameterTypeDescription
pageintegerPage index (default 0)
page_sizeintegerResults per page (default 200, max 500)
# Also available by case number GET /api/v1/smartadvocate/documents/by-case-number?case_number=2024-001
GET /api/v1/smartadvocate/documents/categories List document categories and sub-categories

Use returned IDs in the category_id and subcategory_id fields when uploading documents.

GET /api/v1/smartadvocate/documents/{document_id} Get document metadata by document ID
GET /api/v1/smartadvocate/documents/{document_id}/content Download a document's raw binary content

Returns the file as application/octet-stream. Use the metadata endpoint first to get the document name and content type.

curl.exe -X GET \ "https://app.lawlink.ai/api/v1/smartadvocate/documents/555/content" \ -H "Authorization: Bearer ACCESS_TOKEN" \ --output document.pdf
POST /api/v1/smartadvocate/documents/upload Upload a document to a case

Send as multipart/form-data. Provide either case_id or case_number.

Form Fields
FieldTypeDescription
filefileThe file to upload *
case_idintegerTarget case ID * (one required)
case_numberstringTarget case number * (one required)
category_idintegerDocument category ID (see GET /documents/categories)
subcategory_idintegerDocument sub-category ID
descriptionstringDocument description
document_datestringISO 8601 document date
curl.exe -X POST \ "https://app.lawlink.ai/api/v1/smartadvocate/documents/upload" \ -H "Authorization: Bearer ACCESS_TOKEN" \ -F "file=@MedicalRecord.pdf" \ -F "case_id=12345" \ -F "description=Initial medical evaluation"