Operator Guide · 2026
VAR Operator Documentation

THE COMPLETE
OPERATOR
GUIDE

Everything you need to provision your node, connect your clients, and build a live product on the RGX wholesale software integration substrate. From your first API call to production scale.

$2k
Base fee / mo
$30
Per seat / month
50+
API endpoints
1k
Req / hr per key
1
Overview

WHAT IS RGX

RGX Systems is a wholesale software integration substrate for Value-Added Resellers. You are not reselling RGX — you are building your own product on top of it. Your clients never know RGX exists.

The platform gives you a single authenticated API surface that connects to every tool your clients use — CRM, email, calendar, messaging channels, file storage, and calling — and exposes them through a consistent set of REST endpoints scoped to your VAR node.

The model in one sentence: You provision a VAR node, register your clients under it, connect their tools, and expose whatever features you want through your own UI. RGX handles the pipeline orchestration, scoped token key generation, data validation, and encrypted storage. You handle the relationship.

How Your Node Works

Every VAR operator receives a VAR node — an isolated multi-tenant container that holds all your client records, credentials, usage events, and billing data. Nothing from your node is visible to other operators. Nothing from other operators is visible to yours.

Your Master API Key

  • Format: rgx_live_… (48-char hex)
  • Shown exactly once at provisioning — store it securely
  • Never stored in plaintext — SHA-256 hashed immediately
  • Authenticate every request via X-Api-Key header
  • Self-serve key rotation via the VAR Portal

Your Node Identity

  • All clients, usage, and billing roll up under your node
  • Rate limit: 1,000 requests/hr across all keys
  • Rate headers returned on every response
  • Sub-keys can be issued to clients (scoped to your node)
  • Usage queryable at any time via /usage

Architecture at a Glance

01

You call the API — authenticated with your Master API Key. Every request is validated against your node, rate-checked, and logged.

02

The platform resolves the client — requests scoped to a client_ref route to that client's isolated credential store and configuration.

03

The integration layer executes — credentials are decrypted in memory, the third-party API is called, and the result is normalized and returned.

04

Usage is recorded — request metadata (endpoint, payload size, processing units, status code) written to your node's usage log for billing.

2
Quick Start

GETTING STARTED

Once you have your Master API Key, you can have your first client registered and connected within minutes. All endpoints are under https://rgxsystems.com/api/v1/.

Step 1 — Verify Your Node

Confirm your key is active and your node is live before building anything.

Health check
GET /api/v1/health
X-Api-Key: rgx_live_your_key_here

// Response
{
  "ok": true,
  "node": "Acme MSP",
  "plan": "standard",
  "timestamp": "2026-05-22T09:00:00Z"
}

Step 2 — Register a Client

Every client gets a client_ref — a unique identifier you define. Use whatever makes sense in your system (account ID, slug, etc.).

Register client
POST /api/v1/clients
X-Api-Key: rgx_live_your_key_here

{
  "client_ref": "contoso-ltd",
  "name": "Contoso Ltd",
  "email": "ops@contoso.com"
}

// Response
{ "ok": true, "client_ref": "contoso-ltd", "id": "cli_…" }

Step 3 — Connect an Integration

Credentials are encrypted with AES-256-GCM immediately on write and never returned in plaintext. Only one integration per type per client.

Connect HubSpot CRM
POST /api/v1/clients/contoso-ltd/connect
X-Api-Key: rgx_live_your_key_here

{
  "type": "hubspot",
  "config": { "api_key": "their_hubspot_key" }
}

Step 4 — Use the Data

Fetch pipeline deals
GET /api/v1/clients/contoso-ltd/crm/deals
X-Api-Key: rgx_live_your_key_here

// Response
{
  "ok": true,
  "deals": [ { "id": "deal_001", "name": "Q2 Renewal", "stage": "Proposal", "value": 24000 } ],
  "count": 1
}

Rate limit headers are returned on every response: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset. Check these in production to avoid 429s.

3
Client Management

MANAGING CLIENTS

Clients are the core tenant unit under your VAR node. Each client has isolated credential storage, configuration, channel history, and call logs. A client maps to one of your end customers.

Client CRUD Endpoints

MethodEndpointDescription
POST/clientsRegister a new client on your node
GET/clientsList all clients with cursor pagination
GET/clients/:refGet a single client by reference ID
PATCH/clients/:refUpdate name, email, or metadata
DELETE/clients/:refRemove client and all associated data

Cursor Pagination

The GET /clients endpoint and all list endpoints return a next_cursor token when more records exist. Pass it back as ?cursor=… on the next request. No offset arithmetic, no missed records.

Paginated client list
GET /api/v1/clients?limit=25
// Response
{ "clients": [...], "next_cursor": "eyIyMDI2..." }

GET /api/v1/clients?limit=25&cursor=eyIyMDI2...
// Next page

Connecting Integrations

Each client can have one integration per type. Credentials are encrypted on write and decrypted in-memory only at runtime.

TypeAuth MethodNotes
hubspotAPI KeyDeals, contacts, activity logging, deal creation
salesforceAccess Token + Instance URLFull CRM access via REST API
pipedriveAPI KeyDeals, contacts, activity
gohighlevelAPI Key + Location IDGHL CRM + pipeline access
vtigerUsername + Access Key + URLvTiger CRM REST API
gmailOAuth tokensInbox, send, calendar, Drive (shared OAuth scope)
outlookOAuth tokensInbox, send, calendar, OneDrive, Teams
imapHost, port, user, passwordAny IMAP/SMTP provider
slackBot TokenRead channels, post messages
teamsOAuth tokensRead/post via Microsoft Graph
twilioAccount SID + Auth Token + FromSend/receive SMS

Disconnecting: DELETE /clients/:ref/integrations/:type removes the integration and purges the encrypted credentials. The integration slot is then available for reconnection.

4
Messaging & Calls

CHANNELS & CALL LOGS

Ingest Pipeline

The /ingest endpoint is your primary payload logging endpoint. Use it to record any communication event into your node. All ingested messages are stored, validated, and queryable.

Ingest a message batch
POST /api/v1/ingest
{
  "client_ref": "contoso-ltd",
  "messages": [
    { "role": "user", "content": "When does my contract renew?" },
    { "role": "assistant", "content": "Your contract renews August 1st." }
  ],
  "channel": "sms",
  "process_with_ai": false  // set true to auto-generate summary
}

Channel-Specific Ingest

For richer per-client storage with channel metadata, use the client-scoped channel ingest endpoint:

Channel ingest with metadata
POST /api/v1/clients/contoso-ltd/channels/ingest
{
  "channel": "email",
  "direction": "inbound",
  "from_address": "client@contoso.com",
  "subject": "Renewal question",
  "body_preview": "Hi, when does my contract renew?",
  "external_id": "msg_abc123"
}

Bulk Ingest

Up to 100 messages across multiple clients in a single call. Per-item success/failure results returned. Usage tracked in aggregate.

Bulk ingest
POST /api/v1/bulk/ingest
{
  "items": [
    { "client_ref": "contoso-ltd", "messages": [...], "channel": "slack" },
    { "client_ref": "fabrikam-inc", "messages": [...], "channel": "whatsapp" }
  ]
}

Call Logging

Log calls with full transcripts. Summaries and action items auto-extracted and stored per record.

Log a call
POST /api/v1/clients/contoso-ltd/calls/log
{
  "direction": "inbound",
  "from_number": "+14155551234",
  "duration_seconds": 312,
  "transcript": "Full transcript text here..."
}

Querying History

MethodEndpointDescription
GET/clients/:ref/channels/recentRecent channel messages. Filter by ?channel=email, ?since=ISO
GET/clients/:ref/callsCall log history with cursor pagination
GET/clients/:ref/contacts/:id/timelineUnified interaction history for a contact across all channels and calls
5
Productivity Integrations

EMAIL, CALENDAR & FILES

Email

Full inbox access and send capability. Works across Gmail, Outlook/M365, and any IMAP provider. Requires a gmail, outlook, or imap integration to be connected for the client.

MethodEndpointDescription
GET/clients/:ref/email/inboxFetch inbox messages (subject, from, date, preview). Pass ?limit= to control count.
GET/clients/:ref/email/:messageIdRead full body of a specific message by ID returned from inbox
POST/clients/:ref/email/sendSend an email. Body: to, subject, body, optional cc, bcc

Calendar

Google Calendar and Outlook Calendar. Accessible via the gmail or outlook integration — no separate connection required.

MethodEndpointDescription
GET/clients/:ref/calendar/eventsList upcoming events. Filter by ?timeMin= and ?timeMax= (ISO format)
POST/clients/:ref/calendar/eventsCreate event. Body: title, start, end, attendees[], optional location, description
GET/clients/:ref/calendar/availabilityFree/busy lookup. Body: emails[], timeMin, timeMax

Messaging — Slack & SMS

MethodEndpointDescription
GET/clients/:ref/slack/channelsList Slack channels the connected bot is a member of
GET/clients/:ref/slack/:channel/messagesRead recent messages from a Slack channel
POST/clients/:ref/slack/:channel/messagePost a message to a Slack channel
POST/clients/:ref/sms/sendSend SMS via client's connected Twilio number. Body: to, body

Files

List and search files from Google Drive or OneDrive. Accessible via the gmail (Drive) or outlook (OneDrive) integration.

Search files
GET /api/v1/clients/contoso-ltd/files?q=contract+2026

// Response
{
  "files": [
    { "id": "1BxiM…", "name": "Contoso_Contract_2026.pdf", "webViewLink": "https://…" }
  ]
}
6
Processing Pipeline

PROCESSING & KNOWLEDGE

The /process Endpoint

Send any text input and receive a structured response from the processing pipeline. Optionally scope it to a client to apply their stored configuration automatically.

Process with client config applied
POST /api/v1/process
{
  "input": "Summarize the last 3 deals in our pipeline",
  "client_ref": "contoso-ltd",  // applies stored system prompt
  "session_id": "sess_abc"
}

// Response
{ "response": "...", "processing_ms": 740, "units_used": 388 }

Passthrough mode: Set "process_with_ai": false (on /ingest) or "passthrough": true (on /process) to skip pipeline processing entirely. The request is logged and stored only. Use this when your own stack handles inference.

Per-Client Processing Config

Store a system prompt and output length configuration per client. Applied automatically on every /process and /ingest call scoped to that client.

Set client processing config
PATCH /api/v1/clients/contoso-ltd/ai-config
{
  "system_prompt": "You are a business assistant for Contoso Ltd. Always respond concisely and focus on their IT infrastructure priorities.",
  "max_tokens": 1024
}

Knowledge Base

Store reference material, SOPs, policies, and documents per client. Searched and injected as context on processing requests. Fully queryable and updatable.

MethodEndpointDescription
POST/clients/:ref/knowledgeAdd a document. Body: title, content, optional tags[], source_url
GET/clients/:ref/knowledgeList all knowledge docs with cursor pagination
POST/clients/:ref/knowledge/searchFull-text keyword search across title and content
PATCH/clients/:ref/knowledge/:docIdUpdate title, content, or tags on an existing document
DELETE/clients/:ref/knowledge/:docIdRemove a knowledge document
Add a knowledge document
POST /api/v1/clients/contoso-ltd/knowledge
{
  "title": "Contoso SLA Policy",
  "content": "P1 incidents must be acknowledged within 15 minutes...",
  "tags": ["sla", "policy"]
}
7
Events & Access

WEBHOOKS & SUB-KEYS

Webhooks

Register an HTTPS endpoint on your VAR node to receive push events in real-time. Payloads are HMAC-SHA256 signed — verify the X-RGX-Signature header on every delivery.

Register a webhook
POST /api/v1/webhooks
{
  "url": "https://yourapp.com/webhooks/rgx",
  "events": ["message.ingested", "call.logged", "client.created"],
  "label": "Production Receiver"
}

// Response — signing secret shown ONCE, store it immediately
{ "id": "wh_…", "signing_secret": "whsec_…" }

Available Events

  • message.ingested
  • call.logged
  • client.created
  • client.deleted
  • all — subscribe to everything

Webhook Operations

  • GET /webhooks — list all
  • DELETE /webhooks/:id — remove
  • GET /webhooks/:id/deliveries — delivery log
  • POST /webhooks/:id/test — send test event
Verifying signatures — Node.js example
const sig = req.headers['x-rgx-signature'];
const expected = crypto
  .createHmac('sha256', 'whsec_your_secret')
  .update(JSON.stringify(req.body))
  .digest('hex');
if (sig !== expected) return res.status(401).end();

Sub-Keys — Scoped Access for Your Clients

Issue API keys directly to your clients so they can call the platform themselves — without exposing your master key. Sub-keys authenticate against your VAR node and are revocable at any time.

Issue a client sub-key
POST /api/v1/clients/contoso-ltd/keys
{ "label": "Contoso Portal Key" }

// Response — raw key shown once
{ "key": "rgx_live_sub_…", "id": "ck_…" }
MethodEndpointDescription
POST/clients/:ref/keysIssue a scoped sub-key for this client
GET/clients/:ref/keysList all active sub-keys for this client
DELETE/clients/:ref/keys/:keyIdRevoke a sub-key immediately
8
Reporting & Billing

USAGE & BILLING

Pricing Model

Two components — a flat monthly base fee plus a per-seat charge for each active client on your node.

Base Fee$2,000 / month
Per Active Seat$30 / seat / month
Client LimitUnlimited
Rate Limit1,000 req / hr per key
All IntegrationsIncluded

Example: You have 20 active clients. Your RGX invoice = $2,000 base + (20 × $30) = $2,600/month. You charge your clients whatever you want — $500/mo each = $10,000 MRR against a $2,600 cost. Your margin grows with every client you add.

Usage Endpoints

Query your node usage
GET /api/v1/usage

// Response
{
  "current_month": {
    "requests": 4821,
    "messages": 18340,
    "active_seats": 20,
    "seat_charges_usd": 1200.00,
    "estimated_invoice_usd": 3200.00
  },
  "history": [...]
}

Aggregate Reporting

Get a full breakdown of activity across your entire book of clients in a single call.

MethodEndpointDescription
GET/reports/summaryTotal clients, active clients, messages, calls, top channels, per-client breakdown
GET/reports/usageEndpoint-level breakdown of requests and processing costs. Pass ?days=30 (1–90)
GET/billing/summarySeat-based billing export — base fee, active seats, seat charges, estimated invoice, and per-client seat list for your own invoicing tools

Security Summary

Credential Storage

  • AES-256-GCM encryption at rest
  • Decrypted in-memory only at call time
  • API keys SHA-256 hashed — never stored plaintext
  • Webhook secrets stored encrypted

Isolation & Access

  • Full data isolation between VAR nodes
  • No cross-client data access possible
  • Rate limiting per key — 1,000 req/hr
  • All traffic over TLS 1.2+
9
Reference

FULL ENDPOINT REFERENCE

Core

GET/healthNode health and key validation
POST/ingestLog message batch with optional processing
POST/processProcess input or passthrough log-only
GET/usageNode usage and billing summary
POST/bulk/ingestBatch ingest up to 100 items across clients

Clients

POST/clientsRegister client
GET/clientsList all clients (cursor paginated)
GET/clients/:refGet client detail
PATCH/clients/:refUpdate client
DELETE/clients/:refDelete client
POST/clients/:ref/connectConnect integration
GET/clients/:ref/integrationsList integrations (credentials masked)
DELETE/clients/:ref/integrations/:typeDisconnect integration

CRM · Email · Calendar · Files

GET/clients/:ref/crm/dealsPipeline deals
GET/clients/:ref/crm/contactsContacts and leads
POST/clients/:ref/crm/activityLog CRM activity
POST/clients/:ref/crm/dealCreate deal
GET/clients/:ref/email/inboxInbox messages
GET/clients/:ref/email/:messageIdFull message body
POST/clients/:ref/email/sendSend email
GET/clients/:ref/calendar/eventsList events
POST/clients/:ref/calendar/eventsCreate event
GET/clients/:ref/calendar/availabilityFree/busy lookup
GET/clients/:ref/filesList/search files

Channels · Calls · Slack · SMS · Processing · Knowledge · Webhooks · Reporting

POST/clients/:ref/channels/ingestIngest channel message
GET/clients/:ref/channels/recentRecent channel history
POST/clients/:ref/calls/logLog call with transcript
GET/clients/:ref/callsCall history
GET/clients/:ref/contacts/:id/timelineUnified contact timeline
GET/clients/:ref/slack/channelsList Slack channels
GET/clients/:ref/slack/:ch/messagesRead Slack messages
POST/clients/:ref/slack/:ch/messagePost to Slack
POST/clients/:ref/sms/sendSend SMS
GET/clients/:ref/ai-configGet processing config
PATCH/clients/:ref/ai-configSet processing config
POST/clients/:ref/knowledgeAdd knowledge doc
GET/clients/:ref/knowledgeList knowledge docs
POST/clients/:ref/knowledge/searchSearch knowledge base
PATCH/clients/:ref/knowledge/:docIdUpdate knowledge doc
DELETE/clients/:ref/knowledge/:docIdDelete knowledge doc
POST/clients/:ref/keysIssue sub-key
GET/clients/:ref/keysList sub-keys
DELETE/clients/:ref/keys/:keyIdRevoke sub-key
POST/webhooksRegister webhook
GET/webhooksList webhooks
DELETE/webhooks/:idRemove webhook
GET/webhooks/:id/deliveriesDelivery history
POST/webhooks/:id/testSend test event
GET/reports/summaryAggregate client activity
GET/reports/usageEndpoint usage breakdown
GET/billing/summarySeat billing export for invoicing

Documentation: rgxsystems.com/docs

Support: support@rgxsystems.com

Status: rgxsystems.com/status

WHOLESALE SOFTWARE INFRASTRUCTURE

10