npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@vybit/api-sdk

v1.1.1

Published

Developer API SDK for Vybit notification platform

Readme

@vybit/api-sdk

✅ Developer API SDK for programmatic access to the Vybit notification platform.

Overview

The @vybit/api-sdk provides a complete TypeScript/JavaScript SDK for the Vybit Developer API, enabling you to build custom integrations, automation workflows, and notification management tools.

Use this SDK to:

  • Manage vybits (notifications) - create, update, delete
  • Handle vybit subscriptions (follows)
  • Search and manage sounds
  • Retrieve notification logs
  • Manage access permissions (peeps)
  • Monitor API usage and metrics

Installation

npm install @vybit/api-sdk

Quick Start

1. Get Your API Key

  1. Create a Vybit developer account
  2. Generate an API key from your developer dashboard
  3. Store your API key securely (use environment variables)

2. Initialize the Client

import { VybitAPIClient } from '@vybit/api-sdk';

const client = new VybitAPIClient({
  apiKey: process.env.VYBIT_API_KEY
});

3. Make API Calls

// Check API status
const status = await client.getStatus();
console.log('API Status:', status.status);

// Get your profile
const profile = await client.getProfile();
console.log('Account:', profile.name, profile.email);

// List your vybits
const vybits = await client.listVybits({ limit: 10 });
console.log(`You have ${vybits.length} vybits`);

// Create a new vybit (only name is required)
const vybit = await client.createVybit({
  name: 'Server Alert',
  description: 'Notifications for server errors',
  soundKey: 'sound123abc',  // Optional - defaults to system sound
  triggerType: 'webhook',     // Optional - defaults to 'webhook'
  access: 'private'           // Optional - defaults to 'private'
});
console.log('Created vybit:', vybit.key);

// Search for sounds
const sounds = await client.searchSounds({ search: 'notification', limit: 5 });
sounds.forEach(sound => {
  console.log(`${sound.name} - ${sound.key}`);
});

Core Features

Vybit Management

// List vybits with pagination and search
const vybits = await client.listVybits({
  offset: 0,
  limit: 20,
  search: 'alert'
});

// Get specific vybit
const vybit = await client.getVybit('vybit123abc');

// Update vybit
await client.updateVybit('vybit123abc', {
  name: 'Updated Alert Name',
  status: 'on'
});

// Delete vybit
await client.deleteVybit('vybit123abc');

Subscription Management

// Browse public vybits
const publicVybits = await client.listPublicVybits({ limit: 10 });

// Subscribe to a vybit
const follow = await client.createVybitFollow({
  subscriptionKey: 'sub123abc456'
});

// List your subscriptions
const follows = await client.listVybitFollows();

// Disable a subscription
await client.updateVybitFollow(follow.followingKey, { status: 'off' });

// Unsubscribe
await client.deleteVybitFollow(follow.followingKey);

Sound Search

// Search for sounds
const sounds = await client.searchSounds({
  search: 'bell',
  limit: 10
});

// Get sound details
const sound = await client.getSound('sound123abc');

// Get playback URL (unauthenticated endpoint)
const playUrl = client.getSoundPlayUrl('sound123abc');
console.log('Play sound at:', playUrl);

Notification Logs

// List all logs
const logs = await client.listLogs({ limit: 50 });

// Get specific log
const log = await client.getLog('log123abc');

// List logs for a specific vybit
const vybitLogs = await client.listVybitLogs('vybit123abc', {
  search: 'error',
  limit: 20
});

// List logs for a subscription
const followLogs = await client.listVybitFollowLogs('follow123abc');

Access Control (Peeps)

// Invite someone to a private vybit
const peep = await client.createPeep({
  vybKey: 'vybit123abc',
  email: '[email protected]'
});

// List peeps for a vybit
const peeps = await client.listVybitPeeps('vybit123abc');

// Accept a peep invitation
await client.acceptPeep('peep123abc');

// Remove access
await client.deletePeep('peep123abc');

Monitoring & Metrics

// Get usage metrics
const meter = await client.getMeter();
console.log(`Daily usage: ${meter.count_daily} / ${meter.cap_daily}`);
console.log(`Monthly usage: ${meter.count_monthly} / ${meter.cap_monthly}`);
console.log(`Tier: ${meter.tier_id} (Free=0, Bronze=1, Silver=2, Gold=3)`);

Rate Limiting

The Developer API enforces the following rate limits per API key:

  • 10 requests per second
  • 300 requests per minute
  • 5,000 requests per hour

Rate limit errors throw a VybitAPIError with status code 429. The SDK automatically includes rate limit information in error messages.

Error Handling

import { VybitAPIError, VybitAuthError, VybitValidationError } from '@vybit/core';

try {
  const vybit = await client.createVybit({
    name: 'Test Vybit'  // Only name is required
  });
} catch (error) {
  if (error instanceof VybitAuthError) {
    console.error('Authentication failed - check your API key');
  } else if (error instanceof VybitValidationError) {
    console.error('Invalid parameters:', error.message);
  } else if (error instanceof VybitAPIError) {
    console.error(`API error (${error.statusCode}):`, error.message);
  } else {
    console.error('Unexpected error:', error);
  }
}

Environment Management

The SDK connects to the production Vybit API at https://api.vybit.net/v1.

For different environments (development, staging, production), create separate Vybit accounts with their own API keys. This provides better isolation and security.

// Development
const devClient = new VybitAPIClient({
  apiKey: process.env.VYBIT_DEV_API_KEY
});

// Production
const prodClient = new VybitAPIClient({
  apiKey: process.env.VYBIT_PROD_API_KEY
});

TypeScript Support

The SDK is written in TypeScript and includes comprehensive type definitions:

import {
  VybitAPIClient,
  Vybit,
  VybitCreateParams,
  VybitFollow,
  Sound,
  Log,
  Peep,
  SearchParams
} from '@vybit/api-sdk';

// Full type safety for all API operations
const params: VybitCreateParams = {
  name: 'My Vybit'  // Only name is required, all other fields are optional
};

const vybit: Vybit = await client.createVybit(params);

API Documentation

Complete OpenAPI 3.0 specification available:

The OpenAPI spec provides:

  • Complete endpoint documentation with examples
  • Request/response schemas
  • Code generation for multiple languages
  • Postman/Insomnia collection import

Complete API Reference

Status & Utility

  • getStatus() - Check API health
  • getMeter() - Get usage metrics

Profile

  • getProfile() - Get user profile

Vybits

  • listVybits(params?) - List vybits
  • getVybit(key) - Get vybit
  • createVybit(params) - Create vybit
  • updateVybit(key, params) - Update vybit (PUT)
  • patchVybit(key, params) - Update vybit (PATCH)
  • deleteVybit(key) - Delete vybit

Subscriptions

  • listPublicVybits(params?) - Browse public vybits
  • getPublicVybit(key) - Get public vybit by subscription key

Vybit Follows

  • listVybitFollows(params?) - List subscriptions
  • getVybitFollow(key) - Get subscription
  • createVybitFollow(params) - Subscribe to vybit
  • updateVybitFollow(key, params) - Update subscription
  • deleteVybitFollow(key) - Unsubscribe

Sounds

  • searchSounds(params?) - Search sounds
  • getSound(key) - Get sound details
  • getSoundPlayUrl(key) - Get sound playback URL

Logs

  • listLogs(params?) - List all logs
  • getLog(logKey) - Get log entry
  • listVybitLogs(vybKey, params?) - List logs for vybit
  • listVybitFollowLogs(vybFollowKey, params?) - List logs for subscription

Peeps

  • listPeeps(params?) - List peeps
  • getPeep(key) - Get peep
  • createPeep(params) - Create peep invitation
  • acceptPeep(key) - Accept invitation
  • deletePeep(key) - Remove peep

Vybit Peeps (Nested)

  • listVybitPeeps(vybKey) - List peeps for vybit
  • createVybitPeep(vybKey, params) - Add peep to vybit
  • updateVybitPeep(vybKey, key, params) - Update vybit peep
  • deleteVybitPeep(vybKey, key) - Remove peep from vybit

Related Packages

License

MIT