LeanLaw · Authentication Profile

Leanlaw Authentication

Authentication

LeanLaw secures its APIs with http and oauth2 across 2 declared security schemes, as derived from its OpenAPI definitions.

LegalLegal BillingLaw FirmsTime TrackingBillingInvoicingAccountingTrust AccountingPractice ManagementQuickBooksPaymentsLegal TechSoftware-as-a-Service
Methods: http, oauth2 Schemes: 2 OAuth flows: API key in:

Security Schemes

BearerAuth http
scheme: bearer · in: header ()
OAuth2 oauth2
· flows:

Source

Authentication Profile

Raw ↑
generated: '2026-08-25'
method: searched
source: https://platform.leanlaw.io/auth
docs: https://platform.leanlaw.io/auth
also_derived_from: openapi/leanlaw-api-openapi.json
summary:
  types:
  - http
  - oauth2
  primary: API key presented as an HTTP bearer token
  note: >-
    The published OpenAPI declares exactly one scheme (BearerAuth, http/bearer) applied globally to
    all 35 operations. The docs additionally document two request headers that are NOT in the spec
    (x-leanlaw-userid, x-leanlaw-partnerid), and a separate OAuth 2.1 authorization server used for
    the MCP/agent surface that is likewise absent from the spec.
schemes:
- name: BearerAuth
  type: http
  scheme: bearer
  in: header
  header: Authorization
  format: 'Authorization: Bearer {apikey}'
  applied: global
  operations_covered: 35
  sources:
  - openapi/leanlaw-api-openapi.json
  - https://platform.leanlaw.io/auth
  description: >-
    A LeanLaw API key presented as a bearer token. The key represents the ACCOUNT (the firm), not an
    individual user, and acts on behalf of the firm with the scopes selected when the key was created.
  provisioning:
    ui_path: Settings > API
    action: Generate API Key
    scope_selection: read or write permissions chosen per key at creation time
    display: shown once at creation; must be stored by the caller
    requires: firm setup / administrator access
  transport: HTTPS required
- name: OAuth2
  type: oauth2
  applied: MCP / agent surface only
  in_openapi: false
  sources:
  - https://api.leanlaw.io/.well-known/oauth-protected-resource
  - https://api.myleanlaw.co/.well-known/openid-configuration
  - https://platform.leanlaw.io/agents
  description: >-
    OAuth 2.1 authorization-code + PKCE against https://auth.myleanlaw.co/, used to authorize AI
    assistants against the MCP server. Unlike the firm-wide API key this is per USER — the connection
    carries only that person's access. Documented as private beta.
  flows:
    authorizationCode:
      authorizationUrl: https://api.myleanlaw.co/oauth/authorize
      tokenUrl: https://api.myleanlaw.co/oauth/token
      refreshUrl: https://api.myleanlaw.co/oauth/token
      revocationUrl: https://api.myleanlaw.co/oauth/revoke
  scopes: scopes/leanlaw-scopes.yml
supplemental_headers:
- name: x-leanlaw-userid
  required: false
  in_openapi: false
  description: >-
    Identifies the acting user for calls that otherwise operate at firm scope. Documented as the
    recommended approach for time-tracking use cases so matter and time-entry lists are scoped to one
    user. The userId comes from the ListUsers endpoint.
  source: https://platform.leanlaw.io/auth
- name: x-leanlaw-partnerid
  required: false
  in_openapi: false
  description: LeanLaw partners must send their partner id on all requests.
  source: https://platform.leanlaw.io/auth
gaps:
- The API key is firm-scoped rather than user-scoped, so per-user attribution depends on the caller
  voluntarily sending x-leanlaw-userid.
- Neither x-leanlaw-userid nor x-leanlaw-partnerid appears in the OpenAPI, so a generated client will
  not expose them.
- The OAuth 2.1 surface is fully discoverable at runtime but is not represented in the OpenAPI
  securitySchemes, so spec-driven tooling sees only the bearer API key.

Work with this as data

Every security artifact here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for security posture

4 MCP tools reach this
  • find_securityBrowse and filter every security artifact in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This security artifact
curl "https://apis.io/api/v1/security/leanlaw-authentication"
All security posture
curl "https://apis.io/api/v1/security?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.