Key Takeaways
- The SDK replaces raw HTTP calls with typed function calls. Instead of constructing requests manually, you call functions and get typed objects back. Authentication, serialization, error handling, and retries are all handled internally.
- Complete type safety with Zod validation. Function parameters are fully typed DTOs that show all required and optional fields at a glance. Every response runs through a Zod schema, reducing the risk of unexpected data types reaching your application.
- Built-in autocompletion and IntelliSense. No need to reference the API documentation for every endpoint. Your IDE shows all available endpoints, parameters, and response shapes as you type.
- Integrated pagination. No manual offset or cursor logic. Pass page and limit directly in the request and let the SDK handle the rest.
- Automatic retries for transient errors. Requests that fail with 5xx status codes are retried automatically. No retry logic required on your side.
- Single client configuration per end user. Create one client instance and reuse it across all API calls for that connection.
Complete Type Safety
Working with a REST API in TypeScript usually means defining your own request and response types, keeping them updated as the API evolves, and hoping that the actual response matches what you expect. The Maesn SDK removes that guesswork.
Every function parameter is a typed DTO that explicitly lists all required and optional fields. When you create an invoice, your IDE shows you the full CreateInvoiceRequestDto with fields like invoiceDate, contactId, currency, lineAmountTypes, and every other parameter the endpoint accepts, each with its correct type.
On the response side, every object returned by the SDK runs through a Zod schema validation. If the response does not match the expected structure, the SDK catches it before your application logic ever sees it. This means fewer runtime surprises, fewer defensive null checks, and less time debugging serialization issues.
Autocompletion and IntelliSense
Switching between your IDE and API documentation for every call slows down development. With the SDK, that context switch disappears.
As you type maesnClient.accounting., your IDE lists every available endpoint. Select a method and the parameter signature appears immediately, showing which fields are required, which are optional, and what types they expect. This works in VS Code, WebStorm, and any editor with TypeScript language server support.
The result: you discover available functionality faster, you make fewer mistakes, and you spend less time reading documentation pages.
Integrated Pagination
Paginated endpoints are a common source of boilerplate. Parsing link headers, tracking cursors, building query strings: all of it adds code that has nothing to do with your actual product logic.
The Maesn SDK handles pagination as simple function parameters. To retrieve the second page of invoices with 10 results per page:
const invoices = await maesnClient.accounting.retrieveInvoices({limit: 10, page: 2})
No offset calculations. No cursor management. No manual query string construction. Just pass the page and limit you need.
Automatic Retries
Transient server errors happen. A 502 from an upstream accounting system, a brief 503 during a deployment window, a timeout on a slow connection. If your integration does not handle these cases, a single intermittent failure can break a sync workflow or surface an error to your end users.
The Maesn SDK retries GET requests that fail with 5xx status codes automatically. You do not need to implement exponential backoff, track attempt counts, or wrap every call in a retry loop. The SDK handles it internally, keeping your code focused on business logic.
Single Client Configuration
Every Maesn API call requires authentication context tied to a specific end-user connection. Without an SDK, you pass headers and tokens on every request. With the SDK, you configure a client once and use it across all subsequent calls for that connection.
One client instance. Multiple calls. No repeated configuration. This keeps your code clean, reduces the risk of misconfigured requests, and makes it straightforward to manage multiple connections in multi-tenant applications.
Currently Available for TypeScript and JavaScript
The SDK is available today for TypeScript and JavaScript projects. It is generated directly from the Maesn OpenAPI specification, which means every new endpoint, parameter, or response field is reflected in the SDK as soon as it ships.
How do I get started?Install the SDK directly from npm, then follow the setup guide in the SDK documentation to configure your first client instance and make your first typed API call.

.webp)


.webp)
