Middesk business verification (KYB) bindings for agentic onboarding:
create a business with the orders you need, wait for the
business.updated webhook, read the report, then approve or reject.
::middesk::businessescreates, reads, lists and updates businesses, sets their status, and reads the review, policy results, timeline and PDF report::middesk::ordersadds products to a business (liens, litigations, bankruptcies, website and industry, KYC, ...)::middesk::documentslists documents and downloads them as Bytes::middesk::monitoringturns ongoing monitoring on and off::middesk::webhooksverifiesX-Middesk-Signature-256, parses events, and manages webhook endpoints::middesk::decisionssummarizes a business report into a compact record of what passed, what failed, the review tasks and aneeds-reviewflag::middesk::apiholds the transport, page-number pagination and thecallescape hatch
Setup: context variables
middesk.api.key: a sandbox (mk_test_...) or production (mk_live_...) key. The key decides the host:mk_test_keys go toapi-sandbox.middesk.com,mk_live_keys toapi.middesk.com.middesk.env: optional,"sandbox"or"production", for keys without a recognizable prefix (a mismatch with the prefix is an Err)middesk.webhook.secret: the secret you set on the webhook endpoint
Quick start
::businesses ::middesk::businesses
biz ::businesses/create-business({
name: "Acme Robotics LLC",
tin: {tin: "123410000"},
addresses: [{address_line1: "123 Main St", city: "Austin", state: "TX", postal_code: "78701"}]
})
// ...wait for the business.updated webhook...
report ::businesses/get-business(biz.id)
::middesk::decisions/summarize(report)
Values
DEFAULT_ENV
DEFAULT_ENV: Str "sandbox"
DEFAULT_PER_PAGE
DEFAULT_PER_PAGE: Int 25
ENVIRONMENTS
ENVIRONMENTS: Map {
sandbox: "https://api-sandbox.middesk.com/v1",
production: "https://api.middesk.com/v1"
}
Middesk base URLs by environment (no trailing slash). Keys only work against their own environment's host.