> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baselayer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction of Lien Filing API

> Jul 11, 2024

We've launched a new Lien Filing API, enabling programmatic creation and management of lien filings through Baselayer. This API supports both machine-to-machine (M2M) communication and can drive user interfaces with its document-like behavior.

## What are Lien Filings?

A lien is a legal claim or right against a property, typically used as security for a debt or obligation. The Lien Filing API facilitates the process of creating, managing, and submitting these legal documents.

## Key Features of the Lien Filing API

1. **Draft-Like Workflow**: Create and gradually populate lien filings over time, mimicking the behavior of working with draft documents.
2. **Flexible Updates**: Add or modify information in multiple steps, supporting both automated systems and user-driven interfaces.
3. **Secure Party Masking**: Option to protect the identity of secured parties when required.
4. **Attachment Management**: Programmatically upload, retrieve, and manage attachments associated with lien filings.
5. **Comprehensive Validation**: Built-in checks to ensure all required information is present and correctly formatted before submission.

## API Endpoints

The API introduces the following new endpoints:

* `POST /businesses/{business_id}/lien_submissions`: Create a new lien filing submission
* `GET /lien_submissions`: Retrieve a list of lien filing submissions
* `GET /lien_submissions/{filing_id}`: Get details of a specific lien filing submission
* `PUT /lien_submissions/{filing_id}`: Update a lien filing submission
* `POST /lien_submissions/{filing_id}/submit`: Submit a completed lien filing
* `POST /lien_submissions/{filing_id}/cancel`: Cancel a lien filing in "Needs Attention" status
* `DELETE /lien_submissions/{filing_id}`: Delete a draft lien filing submission

Additional endpoints are available for attachment management and secured party masking operations.

## Implementation Notes

* The API supports both full payload submissions and gradual population of lien filings, accommodating various integration scenarios.
* The draft-like behavior makes it suitable for driving user interfaces where users might save work in progress and return later.
* For M2M integrations, the API can be used to automate the creation and submission of lien filings based on predefined triggers or data flows.
* Proper error handling should be implemented to manage validation responses effectively.

For detailed information on using the Lien Filing API, including request/response formats and best practices, please refer to our updated [Lien Filing](https://docs.baselayer.com/docs/lien-filing-1.md) documentation.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.