As part of our initiatives to improve tooling around our developer platform, we are pleased to announce a new Node.js API SDK for Freshworks REST APIs. The API SDK supports only the Freshteam REST API with this initial release.
Our goal is to eventually support all public REST APIs for Freshworks products and provide a uniform DX across all those APIs.
Who is it for
Today, the API SDK will be useful for developers who:
- Want to build integrations with the Freshteam API from a Node.js application
- Want to call the Freshteam REST API from the serverless functions of a Freshworks app
- Want an idiomatic Node.js library to interact with the Freshteam REST API
- Do not want to worry about coding HTTP requests manually
- Want to do the above in TypeScript
As we add support for other products’ REST APIs in the SDK, developers will get similar DX and idiomatic Node.js APIs for those product APIs as well.
Where to find it
The API SDK is available on NPM as @freshworks/api-sdk
. The latest published version as of this writing is v0.2.1
.
Example usage
Here is a quick view of how the code looks:
const { Freshteam } = require("@freshworks/api-sdk");
const ft = new Freshteam(domain, apiKey);
Call the method to list all employees (who match search criteria):
const employees = await ft.employees.list({ first_name: "Arthur", last_name: "Dent" });
Documentation
For detailed documentation, including installation instructions, see the Node.js API SDK homepage. You can directly jump to the docs section on Freshteam. Plus, we have created a few sample apps to demonstrate how the API SDK works.
For those who prefer reference docs, see the generated documentation of the Freshteam
class.
The source code for the API SDK is available at freshworks/freshworks-api-sdk on GitHub.
Feedback and reporting issues
While we have tested the API SDK to work in production, we still anticipate issues and feature gaps to exist. If you encounter problems or have a feature request, please open a new topic on the developer community forum.
Please feel free to add a comment to this post for any clarifications.
P.S. We would have ideally asked you to file an issue or a P.R. on the GitHub repository itself, but alas, enterprise VPN controls don’t allow us to do that. Yet.