Skip to main content

Errors & Rate Limits

This article covers how the Lawmatics REST API reports errors and enforces rate limits.

Rate Limits

Lawmatics enforces a limit of 150 requests per minute per firm.

  • Exceeding the limit returns a 429 status with a Retry-After: 60 header — wait the indicated number of seconds before retrying.

  • The limit is per-firm (i.e. shared across all requests authenticated against the same Lawmatics account), not per-app or per-token.


Error Response Format

Errors are returned as a JSON:API-style envelope:

{     "errors": [         {             "status": 422,             "title": "Filter By Parameter Not Available",             "detail": "When applying filters, a valid 'filter_by' parameter is required."         }     ] }

Another example — requesting a resource that doesn't exist:

{     "errors": [         {             "status": 404,             "title": "Not found",             "detail": "File with id invalidId was not found."         }     ] }

errors is always an array — check status and detail on each entry for the specifics.


Common Status Codes

Status

Meaning

Common cause

200 / 201

Success

Request succeeded (201 for resource creation)

401

Unauthorized

Missing/invalid Authorization: Bearer token

404

Not Found

Record ID doesn't exist or isn't accessible to this firm

422

Unprocessable Entity

Validation failure — e.g. missing a required param like filter_by without filter_on

429

Too Many Requests

Rate limit exceeded — see Retry-After header


Best Practices for Integration Partners

  • Implement backoff/retry logic keyed off 429 + Retry-After, not a fixed request interval

  • Always check the errors array rather than assuming a non-2xx means the same thing every time — detail is usually specific enough to branch on

  • For filtering, remember only one filter_by/filter_on pair is supported per request — combine conditions client-side if you need more complex logic

Did this answer your question?