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.
| Parameter | Type | Description |
|---|---|---|
case_number | string | Case number or prefix to search |
attorney_email | string | ORG_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"
| Parameter | Type | Description |
|---|---|---|
case_number | string | The SmartAdvocate case number * |
| Parameter | Type | Description |
|---|---|---|
case_id | integer | Numeric SmartAdvocate case ID * |
| Parameter | Type | Description |
|---|---|---|
staff_contact_id | integer | Filter by staff member contact ID |
page | integer | Page index (default 0) |
page_size | integer | Results per page (default 50, max 200) |
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.
| Parameter | Type | Description |
|---|---|---|
case_id | integer | Numeric case ID * |
GET /api/v1/smartadvocate/staff/by-case-number?case_number=2024-001
| Parameter | Type | Description |
|---|---|---|
page | integer | Page index (default 0) |
page_size | integer | Results per page (default 200, max 500) |
# Also available by case number
GET /api/v1/smartadvocate/statuses/by-case-number?case_number=2024-001
# Also available by case number
GET /api/v1/smartadvocate/incident/by-case-number?case_number=2024-001
Notes
| Parameter | Type | Description |
|---|---|---|
case_number | string | Case number * (one required) |
case_id | integer | Numeric case ID * (one required) |
âšī¸ Note: Provide either case_number or case_id â at least one is required.
Use returned IDs in the note_type_id field when creating notes.
| Field | Type | Description |
|---|---|---|
case_id | integer | SmartAdvocate case ID * |
note_type_id | integer | Note type ID (see GET /notes/types) * |
note_text | string | Note body â HTML is allowed * |
priority | string | Normal | High | Low (default: Normal) |
unique_contact_id | integer | Contact ID to associate |
note_date | string | ISO 8601 datetime, defaults to now |
subject | string | Note subject line |
is_shared_in_cp | boolean | Share in client portal (default false) |
is_shared_with_all | boolean | Share 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"
}'
| Field | Type | Description |
|---|---|---|
note_id | integer | ID of the note to update * |
note_type_id | integer | New note type ID |
note_text | string | Replacement note body |
is_shared_in_cp | boolean | Update client portal sharing |
is_shared_with_all | boolean | Update staff sharing |
| Field | Type | Description |
|---|---|---|
modified_from | string | ISO 8601 start datetime * |
modified_to | string | ISO 8601 end datetime * |
case_numbers | string[] | Optional list of case numbers to restrict results |
page | integer | Page index (default 0) |
page_size | integer | Results per page (default 50, max 200) |
Tasks
| Parameter | Type | Description |
|---|---|---|
case_number | string | Case number * (one required) |
case_id | integer | Numeric case ID * (one required) |
page | integer | Page index (default 0) |
page_size | integer | Results per page (default 200, max 500) |
| Field | Type | Description |
|---|---|---|
case_id | integer | SmartAdvocate case ID * |
summary | string | Task summary / title * |
case_number | string | Case number (optional, for reference) |
description | string | Detailed description |
due_date | string | ISO 8601 due date |
start_date | string | ISO 8601 start date |
type_description | string | Type, e.g. "Call" (see GET /tasks/types) |
status_description | string | Status, e.g. "Not Started" |
priority_description | string | Priority, e.g. "Normal" |
assignee_id | integer | SmartAdvocate 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"
}'
| Field | Type | Description |
|---|---|---|
id | integer | Task ID to update * |
case_id | integer | Reassign to a different case |
summary | string | Updated summary |
description | string | Updated description |
due_date | string | Updated due date |
type_description | string | Updated type |
status_description | string | Updated status |
priority_description | string | Updated priority |
assignee_id | integer | Updated assignee |
{ "deleted": true }
Contacts
| Parameter | Type | Description |
|---|---|---|
full | boolean | Return full contact details including addresses, phones, emails (default false) |
| Parameter | Type | Description |
|---|---|---|
contact_ctg | integer | 1 = Individual, 2 = Company (default 1) |
| Parameter | Type | Description |
|---|---|---|
modified_from | string | ISO 8601 start datetime * |
modified_to | string | ISO 8601 end datetime * |
case_number | string | Restrict to a single case |
page | integer | Page index (default 0) |
page_size | integer | Results per page (default 50, max 200) |
| Field | Type | Description |
|---|---|---|
first_name | string | First name * |
last_name | string | Last name * |
contact_ctg | integer | 1 = Individual, 2 = Company (default 1) |
contact_type_id | integer | Type ID (see GET /contact-types) |
contact_sub_ctg_id | integer | Sub-category ID |
comments | string | Free-form notes |
date_of_birth | string | ISO 8601 date |
gender_id | integer | Gender ID from SmartAdvocate reference data |
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
# Also available by case number
GET /api/v1/smartadvocate/calendar/by-case-number?case_number=2024-001
| Field | Type | Description |
|---|---|---|
from_date | string | ISO 8601 start datetime * |
to_date | string | ISO 8601 end datetime * |
appointment_type_id | integer | Type ID (default 3 = Case-related No Court) |
subject | string | Appointment subject |
comments | string | Additional comments |
address | string | Location address (send empty string if none) |
status_id | integer | Status ID (see GET /calendar/statuses) |
activity_type_id | integer | Activity type ID |
staff_ids | integer[] | List of staff contact IDs to attend |
owner_user_id | integer | SmartAdvocate user ID for appointment owner |
document_ids | integer[] | 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
| Parameter | Type | Description |
|---|---|---|
page | integer | Page index (default 0) |
page_size | integer | Results per page (default 200, max 500) |
# Also available by case number
GET /api/v1/smartadvocate/documents/by-case-number?case_number=2024-001
Use returned IDs in the category_id and subcategory_id fields when uploading documents.
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
Send as multipart/form-data. Provide either case_id or case_number.
| Field | Type | Description |
|---|---|---|
file | file | The file to upload * |
case_id | integer | Target case ID * (one required) |
case_number | string | Target case number * (one required) |
category_id | integer | Document category ID (see GET /documents/categories) |
subcategory_id | integer | Document sub-category ID |
description | string | Document description |
document_date | string | ISO 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"
Search
| Parameter | Type | Description |
|---|---|---|
criteria | string | Search text * |
search_type | string | Search dimension (default CASESTATUS) |
top | integer | Maximum results (0 = no limit) |
curl.exe -X GET \
"https://app.lawlink.ai/api/v1/smartadvocate/search/cases?criteria=Smith&search_type=CASESTATUS&top=20" \
-H "Authorization: Bearer ACCESS_TOKEN"
| Parameter | Type | Description |
|---|---|---|
name | string | Full name search |
first_name | string | First name |
last_name | string | Last name |
phone | string | Phone number |
page | integer | Page number (1-based, default 1) |
limit | integer | Results per page (default 50, max 500) |
curl.exe -X GET \
"https://app.lawlink.ai/api/v1/smartadvocate/search/contacts?last_name=Johnson&phone=555" \
-H "Authorization: Bearer ACCESS_TOKEN"