notiflowsDocs
SDKsServer-side

Ruby

Notiflows Ruby SDK for server-side integration

The Ruby SDK is coming soon. In the meantime, you can use the REST API directly.

Preview

The Ruby SDK will provide a simple interface for triggering notiflows and managing users:

require 'notiflows'

client = Notiflows.new('your-secret-key')

# Trigger a notiflow
client.notify(
  notiflow: 'welcome-email',
  recipients: [
    { external_id: 'user_123' }
  ],
  data: {
    name: 'Jane'
  }
)

# Manage users
client.users.upsert('user_123', {
  email: 'jane@example.com',
  first_name: 'Jane'
})

# Subscribe to topics
client.users.subscribe('user_123', 'product-updates')

Installation (Coming Soon)

gem install notiflows

Using the REST API

Until the SDK is available, you can interact with the API directly:

require 'net/http'
require 'json'

uri = URI('https://api.notiflows.com/admin/v1/notiflows/welcome-email/run')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Post.new(uri)
request['Authorization'] = 'Bearer your-secret-key'
request['Content-Type'] = 'application/json'
request.body = {
  recipients: [{ external_id: 'user_123' }],
  data: { name: 'Jane' }
}.to_json

response = http.request(request)

See the Admin API Reference for complete documentation.

On this page