https://github.com/trycourier/courier-ruby
A Ruby Gem for communicating with the Courier REST API.
https://github.com/trycourier/courier-ruby
Last synced: about 1 month ago
JSON representation
A Ruby Gem for communicating with the Courier REST API.
- Host: GitHub
- URL: https://github.com/trycourier/courier-ruby
- Owner: trycourier
- License: apache-2.0
- Created: 2020-03-03T22:53:40.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2026-06-23T22:01:32.000Z (about 1 month ago)
- Last Synced: 2026-06-23T22:06:03.468Z (about 1 month ago)
- Language: Ruby
- Homepage: https://rubygems.org/gems/trycourier
- Size: 1.8 MB
- Stars: 17
- Watchers: 15
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Security: SECURITY.md
- Agents: AGENTS.md
Awesome Lists containing this project
README
# Courier Ruby SDK
The Courier Ruby SDK provides typed access to the Courier REST API from any Ruby 3.2+ application. It ships with Yard docstrings, RBS and RBI type definitions for Sorbet, and uses `net/http` with connection pooling.
## Installation
Add to your `Gemfile`:
```ruby
gem "trycourier"
```
Then run `bundle install`.
## Quick Start
```ruby
require "bundler/setup"
require "courier"
client = Courier::Client.new
response = client.send_.message(
message: {
to: { email: "you@example.com" },
content: {
title: "Hello from Courier!",
body: "Your first notification, sent with the Ruby SDK."
}
}
)
puts response.request_id
```
The client reads `COURIER_API_KEY` from your environment automatically. You can also pass it explicitly: `Courier::Client.new(api_key: "your-key")`.
> **Note**: The method is `send_` (with trailing underscore) because `send` is a reserved method in Ruby.
## Documentation
Full documentation: **[courier.com/docs/sdk-libraries/ruby](https://www.courier.com/docs/sdk-libraries/ruby/)**
- [Quickstart](https://www.courier.com/docs/getting-started/quickstart/)
- [Send API](https://www.courier.com/docs/platform/sending/send-message/)
- [API Reference](https://www.courier.com/docs/reference/get-started/)
- [RubyDoc](https://gemdocs.org/gems/trycourier)