Skip to content

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/json

For 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=S256

Then 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

EndpointMethodDescription
/api/leadsGETList leads (paginated)
/api/leadsPOSTCreate lead
/api/leads/:idGETGet lead details
/api/leads/:idPUTUpdate lead
/api/leads/:id/scorePOSTRecalculate AI score

Contacts & Deals

EndpointMethodDescription
/api/contactsGET/POSTList/create contacts
/api/contacts/:idGET/PUT/DELETEContact CRUD
/api/dealsGET/POSTList/create deals
/api/deals/:idGET/PUTDeal management
/api/deals/:id/stagePUTMove deal stage

Marketing

EndpointMethodDescription
/api/campaignsGET/POSTCampaign management
/api/sequencesGET/POSTEmail sequences
/api/sequences/:id/enrollPOSTEnroll contact

Ecosystem Admin

EndpointMethodDescription
/api/admin/ecosystem/tenantsGETList ecosystem tenants
/api/admin/ecosystem/access-tokenPOSTGenerate 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:

SourceEvents
Colectivapayment.completed, subscription.*
Constanzacfdi.stamped, transaction.created

Red Broom Software Ecosystem