Quickstart: Ruby
Standard library only — net/http, json, securerandom. Nothing to install.
send.rb
require "net/http"
require "json"
require "securerandom"
uri = URI("https://api.calder.click/v1/emails")
res = Net::HTTP.post(uri, , {
"Authorization" => "Bearer calder_sk_test_…",
"Idempotency-Key" => SecureRandom.uuid,
})
puts res.body # {"id": "em_9f2k41xq", …}Wrap the call with a short read timeout in production, and keep going to Idempotency.