This backend SDK securely signs user data for Vortex components. Your API key stays on your server, while the signed token is passed to the frontend where Vortex components render the invitation UI.
Use this file to discover all available pages before exploring further.
Vortex handles the complete invitation lifecycle — sending invites via email/SMS/share links, tracking clicks and conversions, managing referral programs, and optimizing your invitation flows with A/B testing.
require 'vortex'client = Vortex::Client.new(ENV['VORTEX_API_KEY'])# Generate a token for the current usertoken = client.generate_token(user: { id: 'user-123', email: 'user@example.com' })# Pass the token to your frontend component
Vortex uses a split architecture: your backend signs tokens with the SDK, and your frontend renders components that use those tokens to securely interact with Vortex.
1
Install the backend SDK
Add this SDK to your Ruby project
gem 'vortex-ruby-sdk'
2
Initialize the client
Create a Vortex client with your API key (keep this on the server!)
Generate a signed token for use with Vortex widgets. This method generates a signed JWT token containing your payload data. The token can be passed to widgets via the token prop to authenticate and authorize the request.
Get autojoin domains configured for a specific scope
get_autojoin_domains(scope_type, scope)
Parameters:
Name
Type
Required
Description
scope_type
String
✓
The type of scope (e.g., “organization”, “team”, “project”)
scope
String
✓
The scope identifier (customer’s group ID)
Returns:String — Response with :autojoin_domains array and :invitation
Example
# result = client.get_autojoin_domains('organization', 'acme-org') # result['autojoinDomains'].each do |domain| # puts "Domain: #{domain['domain']}" # end
Configure autojoin domains for a specific scope This endpoint syncs autojoin domains - it will add new domains, remove domains not in the provided list, and deactivate the autojoin invitation if all domains are removed (empty array).
Complete invitation details as returned by the Vortex API
Field
Type
Required
Description
id
String
✓
Unique identifier for this invitation
account_id
String
✓
Your Vortex account ID
click_throughs
Integer
✓
Number of times the invitation link was clicked
form_submission_data
`Hash
nil`
Invitation form data submitted by the user, including invitee identifiers (such as email addresses, phone numbers, or internal IDs) and the values of any custom fields.
configuration_attributes
`Hash
nil`
Deprecated: Use form_submission_data instead. Contains the same data.
created_at
String
✓
ISO 8601 timestamp when the invitation was created
deactivated
Boolean
✓
Whether this invitation has been revoked or expired
delivery_count
Integer
✓
Number of times the invitation was sent (including reminders)
delivery_types
Array<String>
✓
Channels used to deliver: “email”, “phone”, “share”, “internal”
foreign_creator_id
String
✓
Your internal user ID for the person who created this invitation
invitation_type
String
✓
Type: “single_use”, “multi_use”, or “autojoin”
status
String
✓
Current status: queued, sending, sent, delivered, accepted, shared
target
Array<Hash>
✓
List of invitation recipients with their contact info and status
views
Integer
✓
Number of times the invitation page was viewed
groups
Array<Hash>
✓
Scopes (teams/orgs) this invitation grants access to
expired
Boolean
✓
Whether this invitation has passed its expiration date
Webhooks let your server receive real-time notifications when events happen in Vortex. Use them to sync invitation state with your database, trigger onboarding flows, update your CRM, or send internal notifications.
class WebhooksController < ApplicationController skip_before_action :verify_authenticity_token def vortex webhooks = Vortex::Webhooks.new(ENV['VORTEX_WEBHOOK_SECRET']) payload = request.raw_post signature = request.headers['X-Vortex-Signature'] # Verify the signature unless webhooks.verify_signature(payload, signature) return render json: { error: 'Invalid signature' }, status: 400 end # Parse the event event = webhooks.parse_event(payload) case event['type'] when 'invitation.accepted' # User accepted an invitation — activate their account Rails.logger.info "Accepted: #{event['data']}" when 'member.created' # New member joined via invitation Rails.logger.info "New member: #{event['data']}" end render json: { received: true } endend