bannerify-js to call the Bannerify API from JavaScript and TypeScript without writing raw HTTP requests.
Install
- npm
- pnpm
- yarn
- bun
Instantiate
You need a project API key before using the SDK. Create one in Dashboard → API Keys and keep it server-side. Afterwards you need to provide it to the client:Response format
The SDK returns errors explicitly so your code can handle failed requests without relying on thrown errors. TypeScript narrows the response after you check theerror field.
Every method returns either an error or a result field, never both and never none.
Checking for errors
To check for errors you use theerror property, our errors are easy to read and provide a link to our documentation for more information.
Options
The constructor accepts some options to customize the behavior:API key
Your project’s API key