Lender API
Read and write your Drawserv book from your own systems: projects, draws, inspections, budgets, documents and events. One key per lender, scoped to what your portal already shows.
What it covers
Six families of operations, each a group in the reference. Every one of them answers on production and the sandbox.
Projects
Every project in your view: lifecycle, intake stage, budget total, funded to date and percent complete, computed on the server.
ReferenceDraws
Each draw with its lines, stage timestamps, approvals, lien waivers and the reviewed inspections behind it.
ReferenceInspections and budgets
Reviewed site visits with progress per budget line. Budget lines, funding sources and totals.
ReferenceCreate projects
Create a project in intake from your LOS or core: address, borrower, builder and parties.
ReferenceDocuments
Download released risk reports, draw documents and inspection photos. Upload documents to a project.
ReferenceEvents
Poll an events ledger, or receive the same events at your endpoint as signed webhooks.
Reference
Scope
The API returns what your portal shows: the same lender, department and fields. Staff-only data appears in no schema. A record outside your view answers 404, never 403.
Field names match the Drawserv data model. Money is dollars to the cent, as JSON numbers.
Access
Keys
A key acts for your lender, optionally for one department, and never for a person. Drawserv staff issue it, show it once, store it hashed and can revoke it at any time. Send it as a bearer token.
Scopes
Scopes set what a key may do. A new key starts with the 5 read scopes below.
GET /melists a key’s scopes; one that no operation needs is reserved for a future operation. An IP allowlist and an expiry are optional.Request log
Every request is logged with its key, method, path, status, duration, address and request id.
Sandbox
dsk_test_keys run against a scrubbed copy of your book. Nothing done there reaches production.
Scopes
| Scope | Grants |
|---|---|
projects:readDefault | Read projects, parties, budgets and released risk reports |
draws:readDefault | Read draws, their lines, approvals and lien waivers |
inspections:readDefault | Read reviewed inspections and their progress lines |
documents:readDefault | Read document metadata and fetch short-lived download links |
events:readDefault | Read the events ledger |
projects:write | Create projects and update a pre-closing project's intake fields |
documents:write | Upload documents to a project |
webhooks:manage | Create, list and remove webhook endpoints |
First call
Three steps from a key to the book. Each request below works as written against production or, with a dsk_test_ key, the sandbox.
Hold a key
Drawserv staff issue a key for your lender and show it once. Store it, then send it as a bearer token on every request.
HeaderAuthorization: Bearer <key>Call
GET /meIt needs no scope and returns the lender, the department and the key, so a wrong key or scope shows up before anything else is built.
curl https://app.drawserv.com/api/v1/me \ -H "Authorization: Bearer <key>"Pull the book
GET /projectslists the book andGET /draws?scope=workinglists the draws in flight. Lists are paged withpageandper_page, up to 200 rows. Every response carries anX-Request-Idheader to quote to support.cURL# the book, newest first curl "https://app.drawserv.com/api/v1/projects?per_page=100" -H "Authorization: Bearer <key>" # draws in flight curl "https://app.drawserv.com/api/v1/draws?scope=working" -H "Authorization: Bearer <key>" # one draw: lines, approvals, lien waivers curl "https://app.drawserv.com/api/v1/draws/<drawId>" -H "Authorization: Bearer <key>"
Endpoints
Every operation in the reference, each served on production and the sandbox. The reference has parameters and schemas for each.
Account1 operation
Projects7 operations
- GET
/projectsList projects - POST
/projectsCreate a project - GET
/projects/{projectId}Get a project - PATCH
/projects/{projectId}/intakeUpdate a project's intake fields - GET
/projects/{projectId}/partiesList a project's parties - GET
/projects/{projectId}/budgetGet a project's budget - GET
/risk-reports/{projectId}Get a project's released risk report
Draws3 operations
Inspections2 operations
Documents3 operations
Events1 operation
Errors
Every non-2xx response carries one of a closed set of codes. The code is stable and the message is for a person.
{
"error": {
"code": "forbidden_scope",
"message": "This key does not carry draws:read.",
"requestId": "req_01jc4r9k2m"
}
}| Code | HTTP | Meaning |
|---|---|---|
unauthorized | 401 | The key is missing, malformed, revoked, expired, for the other environment, or a session token was sent |
forbidden_scope | 403 | The key lacks the scope the operation needs |
not_found | 404 | No such record in the key's view, which excludes records outside its lender or department |
validation_failed | 400 | A parameter or body field is missing or malformed |
rate_limited | 429 | The key's request budget is spent; Retry-After says when to retry |
conflict | 409 | The write conflicts with the record's current state, such as a project that is no longer pre-closing |
internal | 500 | Something failed on our side; quote the requestId to support |
Versioning
The version is in the path: /v1. Changes are additive. A field is never renamed or retyped, an enum value never changes meaning, and a retired value stays declared. A breaking change ships as /v2 beside /v1, with twelve months’ notice.
Wired into your systems. Ready for your auditors.
Your LOS, servicing and core on one scoped key, with every request logged and every webhook signed.