Skip to main content
The Ruby SDK ships with Sorbet type signatures for every endpoint, so editors and srb tc can flag bad payloads before runtime. It is published as surge_api on RubyGems and requires Ruby 3.2 or newer. This page covers installing the gem, sending your first request, paginating list endpoints, rescuing typed errors, and verifying webhook signatures inside a Rails controller.

Install and authenticate

Add to your Gemfile:
Gemfile
Set your API key:
Sorbet type signatures are included for typed Ruby projects.

Your first request

Pagination

The SDK provides an auto-paginating enumerator:
For manual pagination:

Retries and timeouts

Error handling

Webhooks