Obtain API credentials (developer key + application key) from the Bill.com developer portal; production access requires a separate application and approval from Bill.com.
Authenticate by POSTing to https://api.bill.com/api/v2/Login.json with form-encoded body containing 'userName', 'password', 'orgId', 'devKey', and 'appkey'; the response returns a 'sessionId' used for all subsequent requests.
Include 'sessionId' and 'devKey' as form fields in every subsequent API request — Bill.com uses a session-based auth model, not bearer tokens.
Create a vendor first if one does not exist by POSTing to /api/v2/Crud/Create/Vendor.json with a JSON-encoded 'obj' field containing 'name', 'email', and 'address' fields.
Create a bill by POSTing to /api/v2/Crud/Create/Bill.json with 'obj' containing 'vendorId', 'invoiceDate', 'dueDate', 'billLineItems' array (each with 'chartOfAccountId' and 'amount'), and 'description'.
Sessions expire after a period of inactivity — implement session refresh or re-login logic rather than assuming a session remains valid across long-running batch processes.
Known gotchas
Bill.com uses a non-standard form-encoded API pattern (not REST+JSON) where each request body includes both authentication fields and a JSON-encoded 'obj' or 'data' field — mixing up content types or encoding causes silent failures or cryptic errors.
The organization ID ('orgId') is required at login and determines which Bill.com entity the session operates against; users with multi-entity access must start separate sessions per entity — there is no multi-entity context switching within a single session.
Bill.com's API has historically been labeled 'legacy' as they transition to Divvy/BILL Business Payments; check the current developer documentation for endpoint deprecations before building new integrations.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp