Skip to main content
Official Node.js (TypeScript) SDK for Relaybase.

GitHub Repository

Source, issues, and releases for the Relaybase Node SDK.

Requirements

  • Node.js 18+

Installation

Authentication

Get your API key from the Relaybase dashboard and pass it to the constructor:
By default the client talks to https://api.tryrelaybase.com/v1.

Quick start

Verifying an email

The second argument is the validation mode. If omitted, the API uses its default mode.

Validation modes

See Validation Results for how these map to the API’s mode field.

Response fields

verifySingle() returns a Promise<VerifyEmailResponse>. The useful payload is in result.data: Example:

Error handling

Errors from the API are thrown as RelaybaseAPIError, which carries the HTTP status code:

Common status codes

TypeScript

This SDK is written in TypeScript and exports full type definitions:

Roadmap

Bulk validation support for validating multiple emails in a single call is in progress and will be added in a future release.