@docut/nodejs-sdk
v1.0.4
Published
Docut SDK
Maintainers
Readme
Docut SDK
Official Node.js SDK for Docut API integration
The Docut SDK is a TypeScript/JavaScript library that simplifies integration with the Docut API, allowing you to manage links quickly and efficiently in your Node.js applications.
🚀 Features
- Authentication: Simple integration with API keys
- TypeScript: Full TypeScript type support
- HTTP Client: HTTP client optimized for the Docut API
📦 Installation
npm install @docut/nodejs-sdk
yarn add @docut/nodejs-sdk
bun add @docut/nodejs-sdk
pnpm add @docut/nodejs-sdk🔧 Basic Usage
import { DocutSDK } from '@docut/nodejs-sdk';
// Initialize the SDK
const sdk = new DocutSDK('https://docut.xyz/api', 'your-api-key');
// Create a new link
const newLink = await sdk.link.create({
url: 'https://example.com',
seo: {
title: 'My Link',
description: 'Link description',
}
});🔑 Authentication
The SDK uses API key authentication (x-api-key header). Make sure to:
- Get your API key from the Docut platform
- Pass the key as the second parameter when initializing the SDK
- Keep your key secure and don't share it publicly
📋 Requirements
- Node.js 18+ or Bun
- TypeScript 5.9+ (recommended)
🛠️ Development
# Install dependencies
npm install
# Check TypeScript types
npm run check-ts
# Run linting
npm run lint
# Build the project
npm run build📚 API Documentation
For more details about available endpoints and parameters, see the official Docut API documentation.
🤝 Contributing
Contributions are welcome! Please read the contribution guidelines before submitting a pull request.
📄 License
This project is licensed under the MIT License.
🔗 Useful Links
📞 Support
If you encounter any issues or have questions:
- Open a GitHub issue
- Contact us: [email protected]
Docut SDK - Simplifying integration with the Docut API 🚀
