buchida is the official Ruby SDK for buchida — an email API built for AI agents. buchida ships a CLI, an MCP server, and SDKs in 5 languages (Node, Python, Go, Ruby, Java), all sharing the same REST API surface. @buchida/email templates render Korean, Japanese, and Chinese natively.
Install
gem install buchidaSend your first email
require 'buchida'
client = Buchida::Client.new(ENV['BUCHIDA_API_KEY'])
result = client.emails.send(
from: 'hello@yourapp.com',
from_name: 'Your App',
to: 'user@example.com',
subject: 'Hello',
html: '<h1>Welcome</h1>'
)
puts result['id'], result['status'] # unwrapped payload (Hash with String keys)
# Lists are Arrays with #cursor / #has_more
page = client.emails.list(limit: 20)
page.each { |e| puts e['id'] }
next_page = client.emails.list(cursor: page.cursor) if page.has_more
# from:/to: are sender/recipient ADDRESSES; from_date:/to_date: are ISO 8601 dates
client.emails.list(from: "hello@yourapp.com", from_date: "2026-01-01", direction: "outbound")
client.templates.list(status: "published", search: "welcome")
# Batch: one result per input, each with "data" or "error"
client.emails.send_batch([
{ from: 'hello@yourapp.com', to: 'a@example.com', subject: 'A', text: 'hi' }
]).each { |r| puts(r['data'] || r['error']) }Upgrading to 0.2
- The API wraps responses in
{ "data" => ... }; the SDK now returns the unwrapped payload.emails.send/get,domains.create/get/verify,api_keys.create,webhooks.create,templates.getandmetrics.getreturn the object Hash (result['id']);emails.list,emails.send_batchand the otherlistmethods return an Array (#cursor/#has_moreon paged lists; batch entries are Hashes with'data'or'error'). - Backwards compatible:
result['data']/result[:data]on objects, andpage['data'],page['cursor'],page['hasMore']on lists still work, but print a one-time deprecation warning. Migrate to the unwrapped form; the shim will be removed in a future major version. - Request bodies now use snake_case (
reply_to,scheduled_at) andfrom_nameis supported. API errors with a nested{ "error": { "code", "message" } }body are surfaced correctly.
Documentation
Full docs: buchida.com/docs
- API reference: https://buchida.com/docs/api-reference
- Quickstart guide: https://buchida.com/docs/quickstart
- CJK email templates: https://buchida.com/docs/templates
- MCP server setup: https://buchida.com/docs/mcp
- CLI reference: https://buchida.com/docs/cli
Links
- Website: buchida.com
- Documentation: buchida.com/docs
- Pricing: buchida.com/pricing
- GitHub: https://github.com/Vyblor/buchida-ruby
License
MIT