Lawfficient API

Pagination

List endpoints page with an opaque cursor.

List endpoints return a page of results plus an opaque cursor for the next page:

{
  "data": [ /* … */ ],
  "next_cursor": "eyJjcmVhdGVkQXQiOiIyMDI2…"
}

Parameters

Query paramDefaultNotes
limit50Page size, clamped to 1–200. Out-of-range or non-numeric values fall back to the default.
cursorThe next_cursor from the previous page. Omit it for the first page.

Walking the pages

next_cursor is null on the last page. Keep requesting with the returned cursor until it comes back null:

cursor=""
while :; do
  res=$(curl -s "https://app.lawfficient.com/api/leads?limit=100&cursor=$cursor" \
    -H "Authorization: Bearer $LAWFFICIENT_API_KEY")
  echo "$res" | jq '.data[]'
  cursor=$(echo "$res" | jq -r '.next_cursor // empty')
  [ -z "$cursor" ] && break
done

The cursor is opaque — don't parse or construct it. It encodes a stable ordering key (creation time + id), so new records arriving mid-pagination never shift a row across a page boundary. Results are ordered newest-created first.

On this page