Skip to navigation

Getting started

Authentication, access, rate limits, includes, pagination, and errors.

Getting started

  1. Get an API key (access token) by contacting support@modex.com or your Modex Account Executive.
  2. Send it as a bearer token on every request (see Authentication).
  3. Call GET /v1/ping to confirm the API is reachable, then call GET /v1/resources/nmls/{nmls_id} with any NMLS ID.
  4. Browse every endpoint in the API Reference, or download the OpenAPI spec to generate a client or import the API into your own tools.

Base URL

https://api.modex.com/v1

All requests and responses are JSON. Every response is JSON, including errors, regardless of the Accept header you send.

Authentication

Send your token as a bearer token on every request except Ping:

Authorization: Bearer <access_token>

Tokens are issued per user. The token’s user must belong to an active Modex client.

SituationStatus
Missing, malformed, revoked, or unknown token401 authentication_error
Token is valid but not enabled for the API403 permission_error (“Invalid ability provided.”)
Token’s user has no active Modex client403 permission_error

What your token can see

  • Active records only. Inactive records return 404, as if they didn’t exist.
  • State restrictions. If your account is limited to certain states, loan officers, branches, real estate agents, and real estate offices outside those states return 404, and rosters leave them out. Companies and lender beneficiaries aren’t state-restricted.
  • Feature access. Lender beneficiary data, real estate data, and contact access are enabled per account. When one isn’t enabled, its endpoints (and the lender_beneficiaries include) return 403.

Rate limits

600 requests per minute per token. Every response carries:

HeaderMeaning
X-RateLimit-LimitRequests allowed per minute (600)
X-RateLimit-RemainingRequests left in the current minute

Going over returns 429 rate_limit_error with Retry-After (seconds to wait) and X-RateLimit-Reset (Unix time the window resets).

IDs

Every record is identified by a Modex UUID. Detail, workforce, and roster endpoints take the UUID, not the NMLS ID. To start from an NMLS ID, call Resolve NMLS ID and follow the returned uri.

Includes

Detail and roster endpoints return a small base record. Add sections with include, comma-separated:

GET /v1/resources/loan-officers/{id}?include=mortgage,licenses,employment
IncludeCompanyBranchLoan officerLender beneficiaryRE agentRE office
mortgage✓✓✓✓✓ *✓ *
non_qm✓✓✓
lender_beneficiaries✓✓✓
census✓✓✓✓✓✓
licenses✓✓✓
trade_names✓✓
federal_registrations✓✓ (with history)
employment✓
real_estate✓✓
contacts✓✓

* For agents and offices, mortgage has a different shape (see Real estate mortgage below).

Roster endpoints accept the same includes as the matching single-record endpoint. Asking for an include a record type doesn’t support returns 400 The include [name] is not supported.

Field-by-field definitions for every include are on Includes and field reference.

Data windows

  • mortgage, non_qm, lender_beneficiaries, census, real_estate cover a rolling 12 months: from the first day of the month 11 months before Modex’s latest data refresh, through the refresh date. They don’t take a timeframe parameter.
  • Workforce endpoints take a timeframe parameter: 3, 6, 9, or 12 (months), ytd, or a calendar year from 2019 to 2025. Default is 12.
  • Dollar amounts (volume, sum, average, average_monthly) are whole US dollars. units and count are numbers of transactions.
  • A record with no activity in the window returns null totals and empty lists, not zeros. Treat that as “no production in the window.”
  • Dates are YYYY-MM-DD. Timestamps are ISO 8601 with an offset.

Pagination

Roster and list endpoints are cursor-paginated:

ParameterDescription
limitPage size. Default 25, maximum 100 (larger values are capped at 100).
cursorThe next_cursor (or prev_cursor) from the previous page. Omit it for the first page.
{
"data": [ ... ],
"pagination": {
"per_page": 25,
"next_cursor": "eyJsb2Fu...",
"next_page_url": "https://api.modex.com/v1/...&cursor=eyJsb2Fu...",
"prev_cursor": null,
"prev_page_url": null
}
}

Keep requesting next_page_url until next_cursor is null. Rosters are ordered by record ID, so pages are stable while you walk them.

Errors

Every error uses the same envelope:

{
"error": {
"type": "invalid_request",
"code": "validation_error",
"message": "The ids field is required.",
"details": { "ids": ["The ids field is required."] }
}
}

details appears only on validation errors and maps each field to its messages.

StatustypecodeWhen
400invalid_requestinvalid_requestUnsupported include, invalid timeframe, limit below 1, or a malformed cursor
401authentication_errorauthentication_errorMissing or invalid token
403permission_errorpermission_errorToken not enabled for the API, no active client, feature not enabled for your account, or a client you don’t own
404not_foundnot_foundRecord doesn’t exist, is inactive, or is outside your state restrictions; unknown path; a non-UUID ID
422invalid_requestvalidation_errorRequest body failed validation; see details
429rate_limit_errorrate_limit_errorOver 600 requests per minute
500api_errorapi_errorUnexpected server error. Retry with backoff, and contact support if it persists.

Questions or issues: support@modex.com.