Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.thesozocrm.com/llms.txt

Use this file to discover all available pages before exploring further.

API Overview

Sozo CRM integrations are built around authenticated requests and role-safe access to sales, pipeline, and payout data.
This page is intentionally implementation-focused for technical users integrating with Sozo CRM.

Authentication

Every request is tied to an authenticated user context.

Role-Safe Access

Permissions are enforced based on admin, manager, and rep roles.

Event-Driven Automations

Trigger downstream actions from stage and deal lifecycle changes.

Reliable Payloads

Use stable identifiers and avoid brittle name-based matching.

Authentication pattern

Use a signed user token when calling protected endpoints.
import { getAuth } from 'firebase/auth';

const auth = getAuth();
const idToken = await auth.currentUser.getIdToken();

await fetch('/your-endpoint', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${idToken}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(payload),
});

cURL example

curl -X POST "https://your-api-endpoint" \
  -H "Authorization: Bearer <firebase-id-token>" \
  -H "Content-Type: application/json" \
  -d '{"dealId":"abc123","event":"stage_updated"}'

Core data domains

Pipeline lifecycle, customer records, and operational status for each opportunity.
Identity, team mapping, role, and visibility scope for sales users.
Split logic, payout state, and dispute-safe earnings records.
System events used for alerts, automation triggers, and manager oversight.

Integration best practices

Store and pass record IDs rather than matching by names or free-form text.
Network calls and webhooks can repeat. Make create/update operations idempotent.
Validate inbound payloads before write operations to prevent partial failures.
Group related writes to keep state consistent and reduce edge-case drift.

Typical error categories

permission-denied
error
The authenticated user does not have access for the requested action.
not-found
error
The record or collection path could not be resolved.
invalid-argument
error
A required field is missing or a payload type is incorrect.
deadline-exceeded
error
The operation timed out; retry with backoff and observability.

Next steps

Quickstart

Set up production-ready workflows before connecting external systems.

Integrations

Review integration patterns and rollout guidance.

Hosted MCP

Connect AI clients to your docs and implementation context.