TypeScript SDK
The official TypeScript SDK provides typed functions for every API endpoint with full autocomplete and compile-time type checking.Installation
Published on npm —@journeybee/sdk:
Quick start
Authentication
Pass your API key toclient.setConfig(). The SDK sends it as a Bearer token on every request automatically.
Request patterns
Every SDK function accepts an options object with typedpath, query, and body fields depending on the endpoint.
List with pagination and filters
Get by UUID
Create
Update
Delete
Sub-resources
Error handling
SDK functions return{ data, error, response }. Check error for failures:
Available functions
The SDK exports one function per API endpoint. Function names match theoperationId in the API Reference:
| Domain | Functions |
|---|---|
| Partners | listPartners, getPartner, createPartner, updatePartner |
| Leads | listLeads, getLead, createLead, updateLead, deleteLead |
| Deals | listDeals, getDeal, createDeal, updateDeal, deleteDeal |
| Tasks | listTasks, getTask, createTask, updateTask, deleteTask |
| Products | listProducts, getProduct, createProduct, updateProduct, deleteProduct |
| Contacts | listContacts, getContact |
| Commissions | listCommissions, getCommission, createCommission, updateCommission, deleteCommission |
| Resources | listResources, getResource, createResource, updateResource, deleteResource |
| Certifications | listCertifications, getCertification, createCertification, enrollInCertification |
| Rooms | listRooms, getRoom, createRoom, updateRoom, deleteRoom |
| Folders | listFolders, getFolder, createFolder, updateFolder, deleteFolder |
| Configuration | listPartnerStages, listDealStages, listTiers, listCategories, listTags, listCustomFields |
addLeadTag, listLeadNotes, createPartnerContact, getDealCommission, addResourceBlock, addRoomBlock, addRoomTier, and more. See the API Reference for the complete list.