In the API, each number is a line object, so the SDK lists your numbers with lines.list.
The client
- The package is
@bubbl3/sdk. Create a client with your API key:new Bubbl3({ apiKey }). - Every public call has a typed method, grouped by section, such as
messages.create,contacts.list,lines.listandwebhooks.create. - Writes take
{ idempotencyKey }as their last argument. Pass your own on every send, named after what you're doing. - Reads, and writes with an idempotency key, are retried twice after a network error, a
429or a5xx, unless the API asks to wait more than a minute. ARetry-Afterlonger than 60 seconds is thrown at once. - Lists return
{ data, next_cursor }.
Errors
A failed call throws a Bubbl3ApiError with its status, code, message and request id, with subclasses such as Bubbl3ValidationError and Bubbl3RateLimitError (with retryAfterSeconds). A call that never gets a response throws Bubbl3ConnectionError. All of them extend Bubbl3Error.
Webhooks
verifyWebhook(rawBody, header, secret) checks a delivery's bubbl3-signature header and returns true or false. It never throws, and a missing secret always fails.