Integrate Rubi Professional with your applications using our RESTful API. Pull customer data, interaction history, and analytics with secure authentication.
curl -X GET \
'https://api.rubiprofessional.com/v2/customers' \
-H 'Authorization: Bearer YOUR_API_KEY'
API keys are generated from your Rubi Professional dashboard and are unique to your tenant.
curl -X GET \
'https://api.rubiprofessional.com/v2/customers' \
-H 'Authorization: Bearer rubi_live_4f6b2c8d...' \
-H 'Content-Type: application/json'
Authorization: Bearer YOUR_API_GUID
Content-Type: application/json
Accept: application/json
/v2/customers
Retrieve customer records with filtering and pagination
tenant_id
- Your tenant identifier (required)start_date
- Start date (YYYY-MM-DD)end_date
- End date (YYYY-MM-DD)page
- Page number (default: 1)per_page
- Records per page (max: 100)/v2/interactions
Get call history, chat logs, and interaction details
tenant_id
- Your tenant identifier (required)customer_id
- Filter by customer IDstart_date
- Start datetime (ISO 8601)end_date
- End datetime (ISO 8601)interaction_type
- call, chat, email, sms/v2/analytics/reports
Generate custom reports and analytics data
tenant_id
- Your tenant identifier (required)report_type
- daily, weekly, monthlystart_date
- Report start dateend_date
- Report end date/v2/tenant/info
Get tenant configuration and usage limits
/tenant-admin/api/data-analytics.php
Advanced analytics and reporting capabilities
getMetrics
- Real-time tenant metricsgetCustomerStats
- Customer analyticsgetInteractionTrends
- Interaction patternsgetPaymentAnalytics
- Payment insights/tenant-admin/api/export-data.php
Export data in CSV, JSON, or Excel formats
customers
- Customer database exportinteractions
- Interaction historypayments
- Payment recordsanalytics
- Analytics reports/crm/api/search.php
Universal search across CRM data
q
- Search querytype
- customer, interaction, notelimit
- Results limitCore CRM functionality endpoints
/crm/api/autosave.php
- Auto-save form data/crm/api/interaction.php
- Create/update interactions/crm/api/notes.php
- Manage customer notes/crm/api/payments.php
- Payment operations/crm/api/process-stripe-payment.php
- Stripe processing/crm/api/track-module-usage.php
- Module tracking/crm/modules/api/discovery/*
Dynamic questionnaire system
get-questions.php
- Get question setsave-answers.php
- Save responsesget-dependencies.php
- Conditional logicimport-questions.php
- Bulk import/api/nice-cxone/*
Contact center integration
click-to-dial.php
- Click-to-dial functionalitystatus.php
- Agent status monitoringconst axios = require('axios');
const apiClient = axios.create({
baseURL: 'https://api.rubiprofessional.com/v2',
headers: {
'Authorization': 'Bearer rubi_live_YOUR_API_GUID_HERE',
'Content-Type': 'application/json'
}
});
// Get customers for a date range
async function getCustomers() {
try {
const response = await apiClient.get('/customers', {
params: {
tenant_id: 'your_tenant_id',
start_date: '2025-01-01',
end_date: '2025-01-31',
per_page: 25
}
});
console.log('Customers:', response.data.data);
return response.data;
} catch (error) {
console.error('API Error:', error.response.data);
}
}
import requests
from datetime import datetime, timedelta
class RubiAPI:
def __init__(self, api_key, tenant_id):
self.base_url = 'https://api.rubiprofessional.com/v2'
self.headers = {
'Authorization': f'Bearer {api_key}',
'Content-Type': 'application/json'
}
self.tenant_id = tenant_id
def get_interactions(self, start_date, end_date, customer_id=None):
params = {
'tenant_id': self.tenant_id,
'start_date': start_date,
'end_date': end_date
}
if customer_id:
params['customer_id'] = customer_id
response = requests.get(
f'{self.base_url}/interactions',
headers=self.headers,
params=params
)
return response.json() if response.status_code == 200 else None
# Usage Example
api = RubiAPI('rubi_live_YOUR_API_GUID_HERE', 'your_tenant_id')
interactions = api.get_interactions('2025-01-01', '2025-01-31')
// Export customer data to CSV
async function exportCustomerData() {
const exportRequest = {
export_type: 'customers',
format: 'csv',
filters: {
date_from: '2025-01-01',
date_to: '2025-01-31',
status: 'active'
}
};
try {
const response = await fetch('/tenant-admin/api/export-data.php', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify(exportRequest)
});
const blob = await response.blob();
const url = window.URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = 'customers_export.csv';
a.click();
} catch (error) {
console.error('Export failed:', error);
}
}
# Get real-time analytics metrics
import requests
import json
def get_analytics_metrics(api_key, tenant_id):
url = 'https://api.rubiprofessional.com/tenant-admin/api/data-analytics.php'
payload = {
'action': 'getMetrics',
'tenant_id': tenant_id,
'period': 'last_30_days',
'metrics': ['customer_growth', 'interaction_volume', 'payment_total']
}
headers = {
'Authorization': f'Bearer {api_key}',
'Content-Type': 'application/json'
}
response = requests.post(url, json=payload, headers=headers)
if response.status_code == 200:
metrics = response.json()
print(f"Customer Growth: {metrics['customer_growth']}%")
print(f"Total Interactions: {metrics['interaction_volume']}")
print(f"Revenue: ${metrics['payment_total']}")
else:
print(f"Error: {response.status_code}")
# Usage
get_analytics_metrics('YOUR_API_KEY', 'YOUR_TENANT_ID')
// Dynamic questionnaire management
class DiscoveryQuestions {
constructor(apiKey) {
this.apiKey = apiKey;
this.baseUrl = '/crm/modules/api/discovery';
}
async getQuestions(customerId) {
const response = await fetch(`${this.baseUrl}/get-questions.php`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${this.apiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ customer_id: customerId })
});
return response.json();
}
async saveAnswers(customerId, answers) {
const response = await fetch(`${this.baseUrl}/save-answers.php`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${this.apiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
customer_id: customerId,
answers: answers
})
});
return response.json();
}
// Handle conditional logic
async checkDependencies(questionCode, answer) {
const response = await fetch(`${this.baseUrl}/get-dependencies.php`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${this.apiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
question_code: questionCode,
answer: answer
})
});
return response.json();
}
}
// Usage
const discovery = new DiscoveryQuestions('YOUR_API_KEY');
const questions = await discovery.getQuestions('CUST-12345');
requests per hour
requests per hour
with custom SLA
Monitor your usage with these response headers:
X-RateLimit-Limit: 5000
X-RateLimit-Remaining: 4999
X-RateLimit-Reset: 1640995200
Receive real-time payment notifications
payment_intent.succeeded
payment_intent.failed
charge.refunded
invoice.payment_succeeded
Endpoint: /webhooks/stripe.php
Configure in your Stripe Dashboard with your webhook signing secret
Track module usage and activation events
module.activated
module.deactivated
module.usage_limit_reached
module.trial_expired
Endpoint: /webhooks/modules.php
Automatically triggered by system events