SDK Reference
Full API reference forzerodrop-client.
Installation
ZeroDrop class
Parameters
| Parameter | Type | Description |
|---|---|---|
apiKey | string (optional) | API key for Workspaces tier |
options.baseUrl | string (optional) | Custom base URL for self-hosted instances |
generateInbox()
waitForLatest()
ZeroDropTimeoutError if no email arrives within the timeout.
Options
| Option | Type | Default | Description |
|---|---|---|---|
timeout | number | 10000 | Milliseconds to wait |
pollInterval | number | 2000 | Milliseconds between polls (fallback mode) |
sse | boolean | true | Use SSE for delivery |
fetchLatest()
null if the inbox is empty.
ZeroDropEmail type
otp
4-8 digit numeric code extracted from the email body. Detected near labels likecode, otp, pin, verification. null if not detected.
magicLink
Verification or reset URL extracted from the email body. Detected for URLs containingverify, confirm, reset, token, activate, or auth. null if not detected.
Error types
ZeroDropTimeoutError
Thrown when no email arrives within the timeout.ZeroDropNetworkError
Thrown when the API is unreachable. Includes a link to the status page.ZeroDropAuthError
Thrown when an invalid API key is provided.Zero telemetry
The SDK does not send analytics, usage metrics, or environment data to any server. The only network requests made are explicit inbox polls tozerodrop.dev/api/inbox/{name}.
Your CI pipeline is your business.