API Documentation

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'

Authentication

Generate Your API Key

API keys are generated from your Rubi Professional dashboard and are unique to your tenant.

  1. Log into your Rubi Professional dashboard
  2. Navigate to Settings → API Access
  3. Click "Generate New API Key"
  4. Copy your API GUID (keep this secure!)
  5. Add IP restrictions for enhanced security

Example Request

curl -X GET \
  'https://api.rubiprofessional.com/v2/customers' \
  -H 'Authorization: Bearer rubi_live_4f6b2c8d...' \
  -H 'Content-Type: application/json'

Required Headers

Authorization: Bearer YOUR_API_GUID
Content-Type: application/json
Accept: application/json

API Endpoints

GET

Customers

/v2/customers

Retrieve customer records with filtering and pagination

Parameters

  • 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)
GET

Interactions

/v2/interactions

Get call history, chat logs, and interaction details

Parameters

  • tenant_id - Your tenant identifier (required)
  • customer_id - Filter by customer ID
  • start_date - Start datetime (ISO 8601)
  • end_date - End datetime (ISO 8601)
  • interaction_type - call, chat, email, sms
GET

Analytics

/v2/analytics/reports

Generate custom reports and analytics data

Parameters

  • tenant_id - Your tenant identifier (required)
  • report_type - daily, weekly, monthly
  • start_date - Report start date
  • end_date - Report end date
GET

Tenant Info

/v2/tenant/info

Get tenant configuration and usage limits

Response Includes

  • • Account limits and current usage
  • • API rate limits
  • • Available features and integrations
  • • Billing information

Code Examples

JavaScript (Node.js)

const 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);
  }
}

Python

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')

PHP

Rate Limits

Lite Edition

1,000

requests per hour

Pro Edition

5,000

requests per hour

Enterprise

Unlimited

with custom SLA

Rate Limit Headers

Monitor your usage with these response headers:

X-RateLimit-Limit: 5000
X-RateLimit-Remaining: 4999
X-RateLimit-Reset: 1640995200

Need API Support?

Our developer support team is here to help you integrate successfully. Get technical assistance and code reviews from our API experts.