Camino CRM API
Camino is the central CRM and OAuth2 identity provider for the RBS ecosystem.
Base URL: https://camino.redbroomsoftware.com
Overview
Camino provides:
- Lead Management: Capture, score, and nurture leads
- Contact & Deal CRM: Full sales pipeline
- Marketing Automation: Email sequences, campaigns
- OAuth2 SSO: Central identity for all ecosystem apps
- Communications: Email, WhatsApp, voice integration
Authentication
For API Integrations
http
Authorization: Bearer <api_key>
Content-Type: application/jsonFor User-Context (OAuth2)
Camino is the OAuth2 provider. Apps redirect users to:
GET /oauth/authorize?
response_type=code&
client_id=<app_client_id>&
redirect_uri=<callback_url>&
scope=openid profile email&
code_challenge=<pkce_challenge>&
code_challenge_method=S256Then exchange the code:
http
POST /oauth/token
Content-Type: application/x-www-form-urlencoded
grant_type=authorization_code&
code=<auth_code>&
redirect_uri=<callback_url>&
client_id=<app_client_id>&
code_verifier=<pkce_verifier>Key Endpoints
Leads
| Endpoint | Method | Description |
|---|---|---|
/api/leads | GET | List leads (paginated) |
/api/leads | POST | Create lead |
/api/leads/:id | GET | Get lead details |
/api/leads/:id | PUT | Update lead |
/api/leads/:id/score | POST | Recalculate AI score |
Contacts & Deals
| Endpoint | Method | Description |
|---|---|---|
/api/contacts | GET/POST | List/create contacts |
/api/contacts/:id | GET/PUT/DELETE | Contact CRUD |
/api/deals | GET/POST | List/create deals |
/api/deals/:id | GET/PUT | Deal management |
/api/deals/:id/stage | PUT | Move deal stage |
Marketing
| Endpoint | Method | Description |
|---|---|---|
/api/campaigns | GET/POST | Campaign management |
/api/sequences | GET/POST | Email sequences |
/api/sequences/:id/enroll | POST | Enroll contact |
Ecosystem Admin
| Endpoint | Method | Description |
|---|---|---|
/api/admin/ecosystem/tenants | GET | List ecosystem tenants |
/api/admin/ecosystem/access-token | POST | Generate dev access token |
Code Examples
Create a Lead
typescript
const response = await fetch('https://camino.redbroomsoftware.com/api/leads', {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
email: 'prospect@example.com',
name: 'Juan Pérez',
phone: '+52 55 1234 5678',
source: 'website',
utm_source: 'google',
utm_campaign: 'spring-2026',
custom_fields: {
company: 'Acme Corp',
interest: 'Enterprise plan'
}
})
});
const { id, score, status } = await response.json();
console.log(`Lead created: ${id} with score ${score}`);OAuth2 Flow (PKCE)
typescript
import crypto from 'crypto';
// 1. Generate PKCE values
const codeVerifier = crypto.randomBytes(32).toString('base64url');
const codeChallenge = crypto
.createHash('sha256')
.update(codeVerifier)
.digest('base64url');
// 2. Redirect user to authorize
const authUrl = new URL('https://camino.redbroomsoftware.com/oauth/authorize');
authUrl.searchParams.set('response_type', 'code');
authUrl.searchParams.set('client_id', CLIENT_ID);
authUrl.searchParams.set('redirect_uri', CALLBACK_URL);
authUrl.searchParams.set('scope', 'openid profile email');
authUrl.searchParams.set('code_challenge', codeChallenge);
authUrl.searchParams.set('code_challenge_method', 'S256');
// Store codeVerifier in session for step 3
// 3. Exchange code for tokens (in callback handler)
const tokenResponse = await fetch('https://camino.redbroomsoftware.com/oauth/token', {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
body: new URLSearchParams({
grant_type: 'authorization_code',
code: authCode,
redirect_uri: CALLBACK_URL,
client_id: CLIENT_ID,
code_verifier: codeVerifier
})
});
const { access_token, id_token, refresh_token } = await tokenResponse.json();Generate Developer Access Token
typescript
// Super admin only - for support access to customer apps
const response = await fetch('https://camino.redbroomsoftware.com/api/admin/ecosystem/access-token', {
method: 'POST',
headers: {
'Authorization': `Bearer ${SESSION_TOKEN}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
target_app: 'cosmos-pet',
ecosystem_org_id: 'eco_abc123',
app_org_id: 'clinic_456',
org_name: 'Veterinaria El Perro Feliz'
})
});
const { token, redirect_url, expires_at } = await response.json();
// Open redirect_url in new tab to access customer's app
window.open(redirect_url, '_blank');Webhooks Received
Camino receives webhooks from:
| Source | Events |
|---|---|
| Colectiva | payment.completed, subscription.* |
| Constanza | cfdi.stamped, transaction.created |