This is an unofficial, light-weight and type-safe HTTP client for the Yousign API for JavaScript.
Types are generated automatically using openapi-typescript.
Important
This is an unofficial library DO NOT contact Yousign if you have have any issues using this library.
Install the package using your favorite package manager.
npm install yousignOptionally, add the following to your tsconfig.json to boost type safety:
{
"compilerOptions": {
"noUncheckedIndexedAccess": true
}
}import { createYousignClient } from "yousign";
const client = createYousignClient({ apiKey: process.env.YOUSIGN_API_KEY });
const { data, error } = await client.POST("/signature_requests", {
body: {
name: "Signature request example",
delivery_mode: "email",
timezone: "Europe/Paris",
},
});Tip
You can refer to the openapi-fetch documentation for more information (middlewares, options, testing, etc).