# Lawmatics

> Run your law firm's intake in Lawmatics: add and update contacts and matters, move matters through your pipeline, book appointments, add tasks, notes and tags, record time and expenses, and start workflows when a contact or matter is added or changes stage.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/lawmatics

## Actions

### Add company

Add a company, such as a business client. Its name must be new to the firm.

**Inputs**

- Name (`name`, text, required): The company's name.
- Email (`email`, text): Its main email address.
- Phone (`phone`, text): Its main phone number.
- Street (`street`, text): The first line of the street address.
- Street line 2 (`street2`, text): Apartment, suite or unit.
- City (`city`, text): The city.
- State (`state`, text): The state or region.
- ZIP code (`zipcode`, text): The ZIP or postal code.
- Country (`country`, text): The country.

**Outputs**

- `company` (object): The company

**Example output**

```json
{
  "company": {
    "address": "128 White Water, Way, Elk Grove, CA 23422, United States",
    "city": "Elk Grove",
    "country": "United States",
    "created_at": "2026-11-02T10:32:50.009-08:00",
    "created_by_id": "2",
    "email": "info@example.com",
    "id": "28",
    "name": "Lawmatics Company",
    "phone_number": "619-555-2855",
    "state": "CA",
    "updated_at": "2026-11-03T09:12:41.198-08:00",
    "zipcode": "23422"
  }
}
```

### Add contact

Add a person to Lawmatics. If your firm matches contacts by email and the email is already on a contact, that contact is updated instead.

**Inputs**

- First name (`first_name`, text, required): Their first name.
- Last name (`last_name`, text): Their last name.
- Middle name (`middle_name`, text): Their middle name.
- Email (`email`, text): Their email address.
- Phone (`phone`, text): Their phone number.
- Date of birth (`birthdate`, date): Their date of birth.
- Employer (`employer`, text): Where they work.
- Occupation (`occupation`, text): What they do.
- Title (`title`, text): A title, such as Esq. or Dr.
- Street (`street`, text): The first line of the street address.
- Street line 2 (`street2`, text): Apartment, suite or unit.
- City (`city`, text): The city.
- State (`state`, text): The state or region.
- ZIP code (`zipcode`, text): The ZIP or postal code.
- Country (`country`, text): The country.
- Tags (`tags`, list): Tags to add. Pick existing tags or type new ones; a new name makes a new tag.
- Custom fields (`custom_fields`, object): Values for the firm's custom contact fields. Leave a field empty to leave it as it is.

**Outputs**

- `contact` (object): The contact

**Example output**

```json
{
  "contact": {
    "birthdate": null,
    "company_id": null,
    "contact_type": "PNC",
    "created_at": "2026-11-02T10:32:50.009-08:00",
    "created_by_id": "15",
    "custom_fields": [
      {
        "field_type": "string",
        "formatted_value": "Met at conference",
        "id": 4788,
        "name": "Referral notes",
        "value": "Met at conference"
      }
    ],
    "date_of_last_contact": "2026-11-02T10:32:50.009-08:00",
    "email": "gregor@clegane.com",
    "employer": null,
    "first_name": "Gregor",
    "gender": null,
    "id": "161257",
    "last_name": "Clegane",
    "marital_status": null,
    "middle_name": null,
    "occupation": null,
    "phone": "520-730-1042",
    "prospects_ids": [
      "6446448"
    ],
    "timezone": null,
    "title": null,
    "updated_at": "2026-11-03T09:12:41.198-08:00"
  }
}
```

### Add event

Put an event, such as a consultation, on the firm's calendar, optionally for a matter or contact and with invites sent.

**Inputs**

- Name (`name`, text, required): The event's name.
- Event type (`event_type_id`, text, required): The kind of event, such as Initial Consultation.
- Starts (`start`, date and time, required): When it starts.
- Ends (`end`, date and time): When it ends. Leave blank to use the event type's length.
- All day (`all_day`, true/false): Turn on for an all-day event.
- Description (`description`, text): Details of the event.
- Location (`location_id`, text): Where it takes place.
- Matter ID (`matter_id`, text): Put it on this matter (its id in Lawmatics). Fill in a matter or a contact, not both.
- Contact ID (`contact_id`, text): Put it on this contact (its id in Lawmatics). Fill in a matter or a contact, not both.
- Hosts (`user_ids`, list): The users hosting it.
- Send invites (`send_invites`, true/false): Turn on to email invites to the attendees.

**Outputs**

- `event` (object): The event

**Example output**

```json
{
  "event": {
    "all_day": false,
    "attendee_email": "jennifer1@gmail.com",
    "attendee_name": "Jennifer Lee",
    "canceled_at": null,
    "created_at": "2026-11-02T10:32:50.009-08:00",
    "description": "API Appointment",
    "end_date": "2026-11-20T15:30:00.000-08:00",
    "event_type_id": "3",
    "eventable_id": "6446448",
    "eventable_type": "prospect",
    "id": "13918",
    "location_address": "1234 Miami, Miami, FL 12345, United States",
    "location_name": "Miami Location",
    "name": "Initial Consultation",
    "send_invites": true,
    "start_date": "2026-11-20T15:00:00.000-08:00",
    "time_zone": "America/Los_Angeles",
    "updated_at": "2026-11-03T09:12:41.198-08:00",
    "users_ids": [
      "2"
    ]
  }
}
```

### Add matter

Open a matter (a prospect) for an existing contact or company, or for a new contact made from the name, email and phone given.

**Inputs**

- Contact ID (`contact_id`, text): An existing contact it is for. Leave blank to use a company or add a new contact.
- Company ID (`company_id`, text): An existing company it is for, instead of a contact.
- First name (`first_name`, text): For a new contact: their first name. Needed when no contact or company is given.
- Last name (`last_name`, text): For a new contact: their last name.
- Email (`email`, text): For a new contact: their email address.
- Phone (`phone`, text): For a new contact: their phone number.
- Case title (`case_title`, text): The matter's title, such as Smith v. Jones.
- Case number (`case_number`, text): The firm's number for it. It must be unique in the firm.
- Description (`case_blurb`, text): What the matter is about.
- Practice area (`practice_area_id`, text): The practice area, such as Estate Planning.
- Stage (`stage_id`, text): The pipeline stage it is in.
- Marketing source (`source_id`, text): Where the client came from.
- Status (`sub_status_id`, text): Its sub status, which also sets whether it is hired, a potential new client (PNC) or lost.
- Lead attorney (`lead_attorney_id`, text): Its lead attorney.
- Originating attorney (`originating_attorney_id`, text): The attorney who brought it in.
- Owner (`owned_by_id`, text): The user who owns it.
- Assigned staff (`assigned_staff_ids`, list): Staff working on it.
- Estimated value (`estimated_value`, number): What it is expected to be worth, in dollars. At least 0.
- Actual value (`actual_value`, number): What it is worth, in dollars. At least 0.
- Tags (`tags`, list): Tags to add. Pick existing tags or type new ones; a new name makes a new tag.
- Custom fields (`custom_fields`, object): Values for the firm's custom matter fields. Leave a field empty to leave it as it is.

**Outputs**

- `matter` (object): The matter

**Example output**

```json
{
  "matter": {
    "actual_value_cents": 0,
    "campaign_id": null,
    "case_blurb": "Client drank a glass of wine and it made him sick",
    "case_number": "2026-CV-001",
    "case_title": "Drank bad wine",
    "company_id": null,
    "contact_id": "161257",
    "converted_date": null,
    "created_at": "2026-11-02T10:32:50.009-08:00",
    "custom_fields": [],
    "email": "tyrion@small.com",
    "estimated_value_cents": 250000,
    "first_name": "Tyrion",
    "id": "6446448",
    "last_name": "Lannister",
    "lead_attorney_id": "17",
    "lead_cost_cents": 0,
    "originating_attorney_id": null,
    "owned_by_id": null,
    "phone": "123-123-1234",
    "practice_area_id": "3",
    "source_id": "6",
    "stage_id": "2",
    "status": "pnc",
    "statute_of_limitations": null,
    "sub_status": "Pnc",
    "tags_ids": [
      "4"
    ],
    "updated_at": "2026-11-03T09:12:41.198-08:00"
  }
}
```

### Add note

Add a note to a matter, contact or company.

**Inputs**

- Title (`name`, text, required): The note's title.
- Note (`body`, text, required): What the note says.
- Matter ID (`matter_id`, text): Put it on this matter. Fill in one of matter, contact or company.
- Contact ID (`contact_id`, text): Put it on this contact. Fill in one of matter, contact or company.
- Company ID (`company_id`, text): Put it on this company. Fill in one of matter, contact or company.

**Outputs**

- `note` (object): The note

**Example output**

```json
{
  "note": {
    "body": "An important thing to remember",
    "created_at": "2026-11-02T10:32:50.009-08:00",
    "id": "109",
    "name": "Intake Note",
    "updated_at": "2026-11-03T09:12:41.198-08:00"
  }
}
```

### Add tags

Tag a matter, contact, company or task. A tag name that doesn't exist yet is created.

**Inputs**

- Record type (`record_type`, text, required): The kind of record to tag. One of: `matter`, `contact`, `company`, `task`.
- Record ID (`record_id`, text, required): The record's id in Lawmatics.
- Tags (`tags`, list, required): The tags to add. Pick existing ones or type new names.

**Outputs**

- `record_id` (text): The record's id
- `record_type` (text): The kind of record
- `tags` (list): The tag names

**Example output**

```json
{
  "record_id": "6446448",
  "record_type": "matter",
  "tags": [
    "VIP"
  ]
}
```

### Add task

Add a task with a due date, optionally on a matter or contact and assigned to users.

**Inputs**

- Name (`name`, text, required): What the task is.
- Due date (`due_date`, date, required): When it is due.
- Description (`description`, text): What needs doing.
- Priority (`priority`, text): How urgent it is. One of: `low`, `medium`, `high`.
- Task status (`task_status_id`, text): Its status, such as In Progress.
- Assigned to (`user_ids`, list): The users it is assigned to.
- Matter ID (`matter_id`, text): Put it on this matter (its id in Lawmatics). Fill in a matter or a contact, not both.
- Contact ID (`contact_id`, text): Put it on this contact (its id in Lawmatics). Fill in a matter or a contact, not both.

**Outputs**

- `task` (object): The task

**Example output**

```json
{
  "task": {
    "created_at": "2026-11-02T10:32:50.009-08:00",
    "description": "Check on document status",
    "done": false,
    "due_date": "2026-11-25T00:00:00.000-08:00",
    "id": "117",
    "name": "Follow up with client",
    "priority": "medium",
    "status": "No Status",
    "taskable_id": "6446448",
    "taskable_type": "prospect",
    "updated_at": "2026-11-03T09:12:41.198-08:00",
    "users_ids": [
      "2"
    ]
  }
}
```

### Cancel event

Cancel an event, optionally telling its attendees.

**Inputs**

- Event ID (`event_id`, text, required): The event's id in Lawmatics.
- Notify attendees (`notify_attendees`, true/false): Turn on to send the attendees a cancellation notice.

**Outputs**

- `canceled` (true/false): True once it is canceled
- `event` (object): The canceled event

**Example output**

```json
{
  "canceled": true,
  "event": {
    "all_day": false,
    "attendee_email": "jennifer1@gmail.com",
    "attendee_name": "Jennifer Lee",
    "canceled_at": "2026-11-04T10:00:00.000-08:00",
    "created_at": "2026-11-02T10:32:50.009-08:00",
    "description": "API Appointment",
    "end_date": "2026-11-20T15:30:00.000-08:00",
    "event_type_id": "3",
    "eventable_id": "6446448",
    "eventable_type": "prospect",
    "id": "13918",
    "location_address": "1234 Miami, Miami, FL 12345, United States",
    "location_name": "Miami Location",
    "name": "Initial Consultation",
    "send_invites": true,
    "start_date": "2026-11-20T15:00:00.000-08:00",
    "time_zone": "America/Los_Angeles",
    "updated_at": "2026-11-03T09:12:41.198-08:00",
    "users_ids": [
      "2"
    ]
  }
}
```

### Delete record

Delete a contact, matter, company, task, note, time entry or expense. Deleting a contact or company also deletes its matters. This can't be undone.

**Inputs**

- Record type (`record_type`, text, required): The kind of record to delete. One of: `contact`, `matter`, `company`, `task`, `note`, `time_entry` (Time entry), `expense`.
- Record ID (`record_id`, text, required): The record's id in Lawmatics.

**Outputs**

- `deleted` (true/false): True once it is deleted
- `record_id` (text): The deleted record's id
- `record_type` (text): The kind of record

**Example output**

```json
{
  "deleted": true,
  "record_id": "117",
  "record_type": "task"
}
```

### Find company

Look up a company by name, email address or phone number. Says whether one was found rather than failing when none is.

**Inputs**

- Find by (`find_by`, text, required): What to look them up by. One of: `email` (Email address), `phone` (Phone number), `name`.
- Value (`value`, text, required): The email address, phone number or name to look for.

**Outputs**

- `company` (object): The company, or empty when none was found
- `found` (true/false): Whether a company was found

**Example output**

```json
{
  "company": {
    "address": "128 White Water, Way, Elk Grove, CA 23422, United States",
    "city": "Elk Grove",
    "country": "United States",
    "created_at": "2026-11-02T10:32:50.009-08:00",
    "created_by_id": "2",
    "email": "info@example.com",
    "id": "28",
    "name": "Lawmatics Company",
    "phone_number": "619-555-2855",
    "state": "CA",
    "updated_at": "2026-11-03T09:12:41.198-08:00",
    "zipcode": "23422"
  },
  "found": true
}
```

### Find contact

Look up a contact by email address, phone number or name. Says whether one was found rather than failing when none is.

**Inputs**

- Find by (`find_by`, text, required): What to look them up by. One of: `email` (Email address), `phone` (Phone number), `name`.
- Value (`value`, text, required): The email address, phone number or name to look for.

**Outputs**

- `contact` (object): The contact, or empty when none was found
- `found` (true/false): Whether a contact was found

**Example output**

```json
{
  "contact": {
    "birthdate": null,
    "company_id": null,
    "contact_type": "PNC",
    "created_at": "2026-11-02T10:32:50.009-08:00",
    "created_by_id": "15",
    "custom_fields": [
      {
        "field_type": "string",
        "formatted_value": "Met at conference",
        "id": 4788,
        "name": "Referral notes",
        "value": "Met at conference"
      }
    ],
    "date_of_last_contact": "2026-11-02T10:32:50.009-08:00",
    "email": "gregor@clegane.com",
    "employer": null,
    "first_name": "Gregor",
    "gender": null,
    "id": "161257",
    "last_name": "Clegane",
    "marital_status": null,
    "middle_name": null,
    "occupation": null,
    "phone": "520-730-1042",
    "prospects_ids": [
      "6446448"
    ],
    "timezone": null,
    "title": null,
    "updated_at": "2026-11-03T09:12:41.198-08:00"
  },
  "found": true
}
```

### Find matter

Look up a matter by its contact's email address, phone number or name. Says whether one was found rather than failing when none is.

**Inputs**

- Find by (`find_by`, text, required): What to look them up by. One of: `email` (Email address), `phone` (Phone number), `name`.
- Value (`value`, text, required): The email address, phone number or name to look for.

**Outputs**

- `found` (true/false): Whether a matter was found
- `matter` (object): The matter, or empty when none was found

**Example output**

```json
{
  "found": true,
  "matter": {
    "actual_value_cents": 0,
    "campaign_id": null,
    "case_blurb": "Client drank a glass of wine and it made him sick",
    "case_number": "2026-CV-001",
    "case_title": "Drank bad wine",
    "company_id": null,
    "contact_id": "161257",
    "converted_date": null,
    "created_at": "2026-11-02T10:32:50.009-08:00",
    "custom_fields": [],
    "email": "tyrion@small.com",
    "estimated_value_cents": 250000,
    "first_name": "Tyrion",
    "id": "6446448",
    "last_name": "Lannister",
    "lead_attorney_id": "17",
    "lead_cost_cents": 0,
    "originating_attorney_id": null,
    "owned_by_id": null,
    "phone": "123-123-1234",
    "practice_area_id": "3",
    "source_id": "6",
    "stage_id": "2",
    "status": "pnc",
    "statute_of_limitations": null,
    "sub_status": "Pnc",
    "tags_ids": [
      "4"
    ],
    "updated_at": "2026-11-03T09:12:41.198-08:00"
  }
}
```

### Get contact

Get one contact's details, with their matters and custom fields.

**Inputs**

- Contact ID (`contact_id`, text, required): The contact's id in Lawmatics, from a trigger, 'Find contact' or another earlier step.

**Outputs**

- `contact` (object): The contact

**Example output**

```json
{
  "contact": {
    "birthdate": null,
    "company_id": null,
    "contact_type": "PNC",
    "created_at": "2026-11-02T10:32:50.009-08:00",
    "created_by_id": "15",
    "custom_fields": [
      {
        "field_type": "string",
        "formatted_value": "Met at conference",
        "id": 4788,
        "name": "Referral notes",
        "value": "Met at conference"
      }
    ],
    "date_of_last_contact": "2026-11-02T10:32:50.009-08:00",
    "email": "gregor@clegane.com",
    "employer": null,
    "first_name": "Gregor",
    "gender": null,
    "id": "161257",
    "last_name": "Clegane",
    "marital_status": null,
    "middle_name": null,
    "occupation": null,
    "phone": "520-730-1042",
    "prospects_ids": [
      "6446448"
    ],
    "timezone": null,
    "title": null,
    "updated_at": "2026-11-03T09:12:41.198-08:00"
  }
}
```

### Get matter

Get one matter's details: its contact, stage, practice area, status, values and custom fields.

**Inputs**

- Matter ID (`matter_id`, text, required): The matter's id in Lawmatics, from a trigger, 'Find matter' or another earlier step.

**Outputs**

- `matter` (object): The matter

**Example output**

```json
{
  "matter": {
    "actual_value_cents": 0,
    "campaign_id": null,
    "case_blurb": "Client drank a glass of wine and it made him sick",
    "case_number": "2026-CV-001",
    "case_title": "Drank bad wine",
    "company_id": null,
    "contact_id": "161257",
    "converted_date": null,
    "created_at": "2026-11-02T10:32:50.009-08:00",
    "custom_fields": [],
    "email": "tyrion@small.com",
    "estimated_value_cents": 250000,
    "first_name": "Tyrion",
    "id": "6446448",
    "last_name": "Lannister",
    "lead_attorney_id": "17",
    "lead_cost_cents": 0,
    "originating_attorney_id": null,
    "owned_by_id": null,
    "phone": "123-123-1234",
    "practice_area_id": "3",
    "source_id": "6",
    "stage_id": "2",
    "status": "pnc",
    "statute_of_limitations": null,
    "sub_status": "Pnc",
    "tags_ids": [
      "4"
    ],
    "updated_at": "2026-11-03T09:12:41.198-08:00"
  }
}
```

### List contacts

List the firm's contacts, 25 at a time, optionally only those whose last name contains some text.

**Inputs**

- Last name contains (`last_name`, text): Only contacts whose last name contains this. Leave blank for all.
- Order (`sort`, text): The order to list them in. Leave blank for newest first. One of: `newest` (Newest added first), `recently_changed` (Recently changed first), `oldest` (Oldest added first).
- Page (`page`, number): Which page of 25 to get. Leave blank for the first. At least 1.

**Outputs**

- `contacts` (list): The contacts on this page
- `count` (number): How many are on this page
- `has_more` (true/false): Whether there is another page
- `page` (number): This page's number
- `total_entries` (number): How many there are in all
- `total_pages` (number): How many pages there are

**Example output**

```json
{
  "contacts": [
    {
      "birthdate": null,
      "company_id": null,
      "contact_type": "PNC",
      "created_at": "2026-11-02T10:32:50.009-08:00",
      "created_by_id": "15",
      "custom_fields": [
        {
          "field_type": "string",
          "formatted_value": "Met at conference",
          "id": 4788,
          "name": "Referral notes",
          "value": "Met at conference"
        }
      ],
      "date_of_last_contact": "2026-11-02T10:32:50.009-08:00",
      "email": "gregor@clegane.com",
      "employer": null,
      "first_name": "Gregor",
      "gender": null,
      "id": "161257",
      "last_name": "Clegane",
      "marital_status": null,
      "middle_name": null,
      "occupation": null,
      "phone": "520-730-1042",
      "prospects_ids": [
        "6446448"
      ],
      "timezone": null,
      "title": null,
      "updated_at": "2026-11-03T09:12:41.198-08:00"
    }
  ],
  "count": 1,
  "has_more": false,
  "page": 1,
  "total_entries": 1,
  "total_pages": 1
}
```

### List events

List events (appointments), newest first, 25 at a time, optionally for one matter, contact or event type. Use one filter at a time.

**Inputs**

- Matter ID (`matter_id`, text): Only events for this matter.
- Contact ID (`contact_id`, text): Only events for this contact.
- Event type (`event_type_id`, text): Only events of this type.
- Page (`page`, number): Which page of 25 to get. Leave blank for the first. At least 1.

**Outputs**

- `count` (number): How many are on this page
- `events` (list): The events on this page
- `has_more` (true/false): Whether there is another page
- `page` (number): This page's number
- `total_entries` (number): How many there are in all
- `total_pages` (number): How many pages there are

**Example output**

```json
{
  "count": 1,
  "events": [
    {
      "all_day": false,
      "attendee_email": "jennifer1@gmail.com",
      "attendee_name": "Jennifer Lee",
      "canceled_at": null,
      "created_at": "2026-11-02T10:32:50.009-08:00",
      "description": "API Appointment",
      "end_date": "2026-11-20T15:30:00.000-08:00",
      "event_type_id": "3",
      "eventable_id": "6446448",
      "eventable_type": "prospect",
      "id": "13918",
      "location_address": "1234 Miami, Miami, FL 12345, United States",
      "location_name": "Miami Location",
      "name": "Initial Consultation",
      "send_invites": true,
      "start_date": "2026-11-20T15:00:00.000-08:00",
      "time_zone": "America/Los_Angeles",
      "updated_at": "2026-11-03T09:12:41.198-08:00",
      "users_ids": [
        "2"
      ]
    }
  ],
  "has_more": false,
  "page": 1,
  "total_entries": 1,
  "total_pages": 1
}
```

### List invoices

List invoices, 25 at a time, with their status and what is still owed, optionally by status or for one matter. Use one filter at a time.

**Inputs**

- Status (`status`, text): Only invoices with this status. One of: `draft`, `sending`, `sent`, `paid`, `partially_paid` (Partially paid), `past_due` (Past due), `forwarded`, `processing`.
- Matter ID (`matter_id`, text): Only invoices for this matter.
- Page (`page`, number): Which page of 25 to get. Leave blank for the first. At least 1.

**Outputs**

- `count` (number): How many are on this page
- `has_more` (true/false): Whether there is another page
- `invoices` (list): The invoices on this page
- `page` (number): This page's number
- `total_entries` (number): How many there are in all
- `total_pages` (number): How many pages there are

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "invoices": [
    {
      "amount_cents": 125000,
      "amount_paid_cents": 0,
      "contactable_name": "Roey Tester",
      "created_at": "2026-11-02T10:32:50.009-08:00",
      "due_at": "2026-11-16",
      "id": "1",
      "invoiced_at": "2026-11-02",
      "note": "Thank you for your business.",
      "number": 1,
      "outstanding_amount_cents": 125000,
      "payment_terms": "due_date",
      "pdf_url": "https://lm.lawmatics.com/attachments/invoice-1.pdf",
      "prospect_id": "6446448",
      "status": "sent",
      "updated_at": "2026-11-03T09:12:41.198-08:00"
    }
  ],
  "page": 1,
  "total_entries": 1,
  "total_pages": 1
}
```

### List matters

List the firm's matters, 25 at a time, optionally in one stage, practice area, marketing source or status. Use one filter at a time.

**Inputs**

- Stage (`stage_id`, text): Only matters in this stage.
- Practice area (`practice_area_id`, text): Only matters in this practice area.
- Marketing source (`source_id`, text): Only matters from this source.
- Status (`status`, text): Only matters with this status. One of: `hired`, `pnc` (Potential new client (PNC)), `lost`.
- Order (`sort`, text): The order to list them in. Leave blank for newest first. One of: `newest` (Newest added first), `recently_changed` (Recently changed first), `oldest` (Oldest added first).
- Page (`page`, number): Which page of 25 to get. Leave blank for the first. At least 1.

**Outputs**

- `count` (number): How many are on this page
- `has_more` (true/false): Whether there is another page
- `matters` (list): The matters on this page
- `page` (number): This page's number
- `total_entries` (number): How many there are in all
- `total_pages` (number): How many pages there are

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "matters": [
    {
      "actual_value_cents": 0,
      "campaign_id": null,
      "case_blurb": "Client drank a glass of wine and it made him sick",
      "case_number": "2026-CV-001",
      "case_title": "Drank bad wine",
      "company_id": null,
      "contact_id": "161257",
      "converted_date": null,
      "created_at": "2026-11-02T10:32:50.009-08:00",
      "custom_fields": [],
      "email": "tyrion@small.com",
      "estimated_value_cents": 250000,
      "first_name": "Tyrion",
      "id": "6446448",
      "last_name": "Lannister",
      "lead_attorney_id": "17",
      "lead_cost_cents": 0,
      "originating_attorney_id": null,
      "owned_by_id": null,
      "phone": "123-123-1234",
      "practice_area_id": "3",
      "source_id": "6",
      "stage_id": "2",
      "status": "pnc",
      "statute_of_limitations": null,
      "sub_status": "Pnc",
      "tags_ids": [
        "4"
      ],
      "updated_at": "2026-11-03T09:12:41.198-08:00"
    }
  ],
  "page": 1,
  "total_entries": 1,
  "total_pages": 1
}
```

### List tasks

List tasks, 25 at a time, optionally for one matter, contact or assignee, or only done or not done ones. Use one filter at a time.

**Inputs**

- Matter ID (`matter_id`, text): Only tasks on this matter.
- Contact ID (`contact_id`, text): Only tasks on this contact.
- Assigned to (`assignee_id`, text): Only tasks assigned to this user.
- Done (`state`, text): Only tasks that are done, or only those that aren't. One of: `open` (Not done), `done`.
- Page (`page`, number): Which page of 25 to get. Leave blank for the first. At least 1.

**Outputs**

- `count` (number): How many are on this page
- `has_more` (true/false): Whether there is another page
- `page` (number): This page's number
- `tasks` (list): The tasks on this page
- `total_entries` (number): How many there are in all
- `total_pages` (number): How many pages there are

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "page": 1,
  "tasks": [
    {
      "created_at": "2026-11-02T10:32:50.009-08:00",
      "description": "Check on document status",
      "done": false,
      "due_date": "2026-11-25T00:00:00.000-08:00",
      "id": "117",
      "name": "Follow up with client",
      "priority": "medium",
      "status": "No Status",
      "taskable_id": "6446448",
      "taskable_type": "prospect",
      "updated_at": "2026-11-03T09:12:41.198-08:00",
      "users_ids": [
        "2"
      ]
    }
  ],
  "total_entries": 1,
  "total_pages": 1
}
```

### Record expense

Record an expense, such as a filing fee, on a matter.

**Inputs**

- Matter ID (`matter_id`, text, required): The matter's id in Lawmatics, from a trigger, 'Find matter' or another earlier step.
- Staff member (`staff_id`, text, required): Who the expense is for.
- Date (`expensed_on`, date, required): The day of the expense.
- Cost (`cost`, number, required): What it cost, in dollars. At least 0.
- Quantity (`quantity`, number): How many, such as 2 copies. Leave blank for Lawmatics' default. At least 0.
- Description (`description`, text): What it was for.
- Billable (`billable`, true/false): Whether the client is billed for it.

**Outputs**

- `expense` (object): The expense

**Example output**

```json
{
  "expense": {
    "activity_type_id": null,
    "contactable_id": "6446448",
    "contactable_type": "prospect",
    "description": "Filing fee",
    "duration": 0,
    "id": "35",
    "invoice_id": null,
    "is_billable": true,
    "is_flat_fee": false,
    "staff_id": "2"
  }
}
```

### Record time

Record time worked on a matter, finished so it can go on an invoice.

**Inputs**

- Matter ID (`matter_id`, text, required): The matter's id in Lawmatics, from a trigger, 'Find matter' or another earlier step.
- Staff member (`staff_id`, text, required): Who did the work.
- Hours (`hours`, number, required): How long it took, in hours, such as 1.5. At least 0.
- Started (`worked_at`, date and time): When the work started. Leave blank for now.
- Description (`description`, text): What was done.
- Hourly rate (`hourly_rate`, number): The rate in dollars an hour. Leave blank for the staff member's own rate. At least 0.
- Billable (`billable`, true/false): Whether the client is billed for it.

**Outputs**

- `time_entry` (object): The time entry

**Example output**

```json
{
  "time_entry": {
    "activity_type_id": null,
    "contactable_id": "6446448",
    "contactable_type": "prospect",
    "description": "Research Hours Billed",
    "duration": 1.5,
    "id": "34",
    "invoice_id": null,
    "is_billable": true,
    "is_flat_fee": false,
    "staff_id": "2"
  }
}
```

### Remove tags

Take tags off a matter, contact, company or task. Tags it doesn't have are ignored.

**Inputs**

- Record type (`record_type`, text, required): The kind of record to untag. One of: `matter`, `contact`, `company`, `task`.
- Record ID (`record_id`, text, required): The record's id in Lawmatics.
- Tags (`tags`, list, required): The tags to take off.

**Outputs**

- `record_id` (text): The record's id
- `record_type` (text): The kind of record
- `tags` (list): The tag names

**Example output**

```json
{
  "record_id": "6446448",
  "record_type": "matter",
  "tags": [
    "VIP"
  ]
}
```

### Update contact

Change a contact's details. Fields left blank keep their values.

**Inputs**

- Contact ID (`contact_id`, text, required): The contact's id in Lawmatics, from a trigger, 'Find contact' or another earlier step.
- First name (`first_name`, text): A new first name.
- Last name (`last_name`, text): Their last name.
- Middle name (`middle_name`, text): Their middle name.
- Email (`email`, text): Their email address.
- Phone (`phone`, text): Their phone number.
- Date of birth (`birthdate`, date): Their date of birth.
- Employer (`employer`, text): Where they work.
- Occupation (`occupation`, text): What they do.
- Title (`title`, text): A title, such as Esq. or Dr.
- Street (`street`, text): The first line of the street address.
- Street line 2 (`street2`, text): Apartment, suite or unit.
- City (`city`, text): The city.
- State (`state`, text): The state or region.
- ZIP code (`zipcode`, text): The ZIP or postal code.
- Country (`country`, text): The country.
- Tags (`tags`, list): Tags to add. Pick existing tags or type new ones; a new name makes a new tag.
- Custom fields (`custom_fields`, object): Values for the firm's custom contact fields. Leave a field empty to leave it as it is.

**Outputs**

- `contact` (object): The contact

**Example output**

```json
{
  "contact": {
    "birthdate": null,
    "company_id": null,
    "contact_type": "PNC",
    "created_at": "2026-11-02T10:32:50.009-08:00",
    "created_by_id": "15",
    "custom_fields": [
      {
        "field_type": "string",
        "formatted_value": "Met at conference",
        "id": 4788,
        "name": "Referral notes",
        "value": "Met at conference"
      }
    ],
    "date_of_last_contact": "2026-11-02T10:32:50.009-08:00",
    "email": "gregor@clegane.com",
    "employer": null,
    "first_name": "Gregor",
    "gender": null,
    "id": "161257",
    "last_name": "Clegane",
    "marital_status": null,
    "middle_name": null,
    "occupation": null,
    "phone": "520-730-1042",
    "prospects_ids": [
      "6446448"
    ],
    "timezone": null,
    "title": null,
    "updated_at": "2026-11-03T09:12:41.198-08:00"
  }
}
```

### Update matter

Change a matter, such as moving it to another stage or setting its status. Fields left blank keep their values.

**Inputs**

- Matter ID (`matter_id`, text, required): The matter's id in Lawmatics, from a trigger, 'Find matter' or another earlier step.
- Case title (`case_title`, text): The matter's title, such as Smith v. Jones.
- Case number (`case_number`, text): The firm's number for it. It must be unique in the firm.
- Description (`case_blurb`, text): What the matter is about.
- Practice area (`practice_area_id`, text): The practice area, such as Estate Planning.
- Stage (`stage_id`, text): The pipeline stage it is in.
- Marketing source (`source_id`, text): Where the client came from.
- Status (`sub_status_id`, text): Its sub status, which also sets whether it is hired, a potential new client (PNC) or lost.
- Lead attorney (`lead_attorney_id`, text): Its lead attorney.
- Originating attorney (`originating_attorney_id`, text): The attorney who brought it in.
- Owner (`owned_by_id`, text): The user who owns it.
- Assigned staff (`assigned_staff_ids`, list): Staff working on it.
- Estimated value (`estimated_value`, number): What it is expected to be worth, in dollars. At least 0.
- Actual value (`actual_value`, number): What it is worth, in dollars. At least 0.
- Tags (`tags`, list): Tags to add. Pick existing tags or type new ones; a new name makes a new tag.
- Custom fields (`custom_fields`, object): Values for the firm's custom matter fields. Leave a field empty to leave it as it is.

**Outputs**

- `matter` (object): The matter

**Example output**

```json
{
  "matter": {
    "actual_value_cents": 0,
    "campaign_id": null,
    "case_blurb": "Client drank a glass of wine and it made him sick",
    "case_number": "2026-CV-001",
    "case_title": "Drank bad wine",
    "company_id": null,
    "contact_id": "161257",
    "converted_date": null,
    "created_at": "2026-11-02T10:32:50.009-08:00",
    "custom_fields": [],
    "email": "tyrion@small.com",
    "estimated_value_cents": 250000,
    "first_name": "Tyrion",
    "id": "6446448",
    "last_name": "Lannister",
    "lead_attorney_id": "17",
    "lead_cost_cents": 0,
    "originating_attorney_id": null,
    "owned_by_id": null,
    "phone": "123-123-1234",
    "practice_area_id": "3",
    "source_id": "6",
    "stage_id": "2",
    "status": "pnc",
    "statute_of_limitations": null,
    "sub_status": "Pnc",
    "tags_ids": [
      "4"
    ],
    "updated_at": "2026-11-03T09:12:41.198-08:00"
  }
}
```

### Update task

Change a task or mark it done. Fields left blank keep their values.

**Inputs**

- Task ID (`task_id`, text, required): The task's id in Lawmatics.
- Done (`state`, text): Mark it done or not done. Leave blank to keep it as it is. One of: `open` (Not done), `done`.
- Name (`name`, text): A new name for the task.
- Due date (`due_date`, date): A new due date.
- Description (`description`, text): What needs doing.
- Priority (`priority`, text): How urgent it is. One of: `low`, `medium`, `high`.
- Task status (`task_status_id`, text): Its status, such as In Progress.
- Assigned to (`user_ids`, list): The users it is assigned to.

**Outputs**

- `task` (object): The task

**Example output**

```json
{
  "task": {
    "created_at": "2026-11-02T10:32:50.009-08:00",
    "description": "Check on document status",
    "done": true,
    "due_date": "2026-11-25T00:00:00.000-08:00",
    "id": "117",
    "name": "Follow up with client",
    "priority": "medium",
    "status": "No Status",
    "taskable_id": "6446448",
    "taskable_type": "prospect",
    "updated_at": "2026-11-03T09:12:41.198-08:00",
    "users_ids": [
      "2"
    ]
  }
}
```
