List entity mail
curl --request GET \
--url https://api.getlemma.com/v0/entities/{entity_id}/mail \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getlemma.com/v0/entities/{entity_id}/mail"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getlemma.com/v0/entities/{entity_id}/mail', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getlemma.com/v0/entities/{entity_id}/mail",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.getlemma.com/v0/entities/{entity_id}/mail"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.getlemma.com/v0/entities/{entity_id}/mail")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getlemma.com/v0/entities/{entity_id}/mail")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "inbound_mail_item_Kv7nWp3hTx9cBd5m",
"entity_id": "entity_k7mXp2vR9nTfBw4s",
"file_id": "file_Xt7nRv3hBw9pKm4s",
"amount": 372500,
"checks": [
{
"id": "check_deposit_Tm6bXn9hRw3pFk7c",
"amount": 100000,
"transaction_id": "transaction_Ab5cDx3nKv8bTh2d",
"status": "submitted",
"hold": {
"status": "held",
"automatically_releases_at": "2026-03-19T14:00:00Z",
"released_at": null
},
"micr": {
"routing_number": "021000021",
"account_number": "9876543210",
"auxiliary_on_us": null,
"serial_number": "00012345"
}
},
{
"id": "check_deposit_Jd4xVs8mBn2wYh5t",
"amount": 2000,
"transaction_id": null,
"status": "rejected",
"hold": null,
"micr": null
}
],
"received_at": "2026-03-14T14:00:00Z"
},
{
"id": "inbound_mail_item_Rs4bFj8wNm2yHt6x",
"entity_id": "entity_k7mXp2vR9nTfBw4s",
"file_id": "file_Hd5cWm8nTx2vFk7b",
"amount": 0,
"checks": [],
"received_at": "2026-03-13T10:45:00Z"
}
],
"has_next": false,
"cursor": null
}
Lockbox
List entity mail
Retrieve all lockbox mail for an entity.
GET
/
v0
/
entities
/
{entity_id}
/
mail
List entity mail
curl --request GET \
--url https://api.getlemma.com/v0/entities/{entity_id}/mail \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getlemma.com/v0/entities/{entity_id}/mail"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getlemma.com/v0/entities/{entity_id}/mail', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getlemma.com/v0/entities/{entity_id}/mail",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.getlemma.com/v0/entities/{entity_id}/mail"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.getlemma.com/v0/entities/{entity_id}/mail")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getlemma.com/v0/entities/{entity_id}/mail")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "inbound_mail_item_Kv7nWp3hTx9cBd5m",
"entity_id": "entity_k7mXp2vR9nTfBw4s",
"file_id": "file_Xt7nRv3hBw9pKm4s",
"amount": 372500,
"checks": [
{
"id": "check_deposit_Tm6bXn9hRw3pFk7c",
"amount": 100000,
"transaction_id": "transaction_Ab5cDx3nKv8bTh2d",
"status": "submitted",
"hold": {
"status": "held",
"automatically_releases_at": "2026-03-19T14:00:00Z",
"released_at": null
},
"micr": {
"routing_number": "021000021",
"account_number": "9876543210",
"auxiliary_on_us": null,
"serial_number": "00012345"
}
},
{
"id": "check_deposit_Jd4xVs8mBn2wYh5t",
"amount": 2000,
"transaction_id": null,
"status": "rejected",
"hold": null,
"micr": null
}
],
"received_at": "2026-03-14T14:00:00Z"
},
{
"id": "inbound_mail_item_Rs4bFj8wNm2yHt6x",
"entity_id": "entity_k7mXp2vR9nTfBw4s",
"file_id": "file_Hd5cWm8nTx2vFk7b",
"amount": 0,
"checks": [],
"received_at": "2026-03-13T10:45:00Z"
}
],
"has_next": false,
"cursor": null
}
Returns a list of all mail items received at the entity’s lockbox. Each item includes a
file_id for the scanned PDF and an amount representing the total value of any checks found in that piece of mail. If the mail contained checks, they are listed in the checks array.
Path parameters
string
required
The ID of the entity. You can find entity IDs using the List
entities endpoint.
Query parameters
integer
default:"10"
Maximum number of mail items to return per page. Default is 10, maximum is
100.
string
Pagination cursor for retrieving the next page of results. Returned as
cursor in the response. See pagination for
details.Response
boolean
Whether more mail items exist beyond this page. Use the
cursor field to
retrieve the next page.string | null
Cursor to retrieve the next page of results. Null if this is the last page.
Pass this value as the
cursor query parameter in a subsequent request. See
pagination for details.object[]
The list of mail objects.
Show Mail object
Show Mail object
string
Unique identifier for the lockbox mail item.
string
The ID of the entity whose lockbox received this mail.
string | null
The ID of the scanned PDF, prefixed with
file_. Use the Get
PDF endpoint to download it. Null if the mail
item has not been scanned yet.integer
The total value of all checks in this piece of mail, in cents. Zero if no
checks were found.
object[]
The checks found in this piece of mail. Empty array if no checks were
found.
Show Check object
Show Check object
string
Unique identifier for the check, prefixed with
check_deposit_.integer
The amount of the check in cents.
string | null
The ID for the transaction created by the check deposit. Null if the
check is pending manual intervention.
string
The processing status of the check. One of
pending, submitted, returned, or rejected.Pending means Lemma has not attempted to deposit the check yet.Submitted means the check has been submitted for deposit. There will be a hold on the funds for a few days.Returned checks are unlikely to happen to healthcare practices receiving funds from payers. Nevertheless, here are a few common reasons checks are returned:- Insufficient funds
- Stop payment instructions
- The check was drawn from a closed bank account
- The check was not authorized
object | null
Fund hold details. Present when deposited funds are held before becoming available. Null if there is no hold.
object | null
Fields read from the check’s MICR line. Null when we have not submitted the check for deposit.
Show MICR object
Show MICR object
string
The routing number printed on the check.
string
The account number printed on the check.
string | null
An additional identifier from the MICR line. Business checks typically encode the check number here rather than in
serial_number.string | null
The check number. For business checks, this may be null — look at
auxiliary_on_us instead.{
"data": [
{
"id": "inbound_mail_item_Kv7nWp3hTx9cBd5m",
"entity_id": "entity_k7mXp2vR9nTfBw4s",
"file_id": "file_Xt7nRv3hBw9pKm4s",
"amount": 372500,
"checks": [
{
"id": "check_deposit_Tm6bXn9hRw3pFk7c",
"amount": 100000,
"transaction_id": "transaction_Ab5cDx3nKv8bTh2d",
"status": "submitted",
"hold": {
"status": "held",
"automatically_releases_at": "2026-03-19T14:00:00Z",
"released_at": null
},
"micr": {
"routing_number": "021000021",
"account_number": "9876543210",
"auxiliary_on_us": null,
"serial_number": "00012345"
}
},
{
"id": "check_deposit_Jd4xVs8mBn2wYh5t",
"amount": 2000,
"transaction_id": null,
"status": "rejected",
"hold": null,
"micr": null
}
],
"received_at": "2026-03-14T14:00:00Z"
},
{
"id": "inbound_mail_item_Rs4bFj8wNm2yHt6x",
"entity_id": "entity_k7mXp2vR9nTfBw4s",
"file_id": "file_Hd5cWm8nTx2vFk7b",
"amount": 0,
"checks": [],
"received_at": "2026-03-13T10:45:00Z"
}
],
"has_next": false,
"cursor": null
}
⌘I