API Reference

112 live endpoints. Built API-first for AI agents and custom integrations. Full CRM operations via a single API key.

Live & Ready

The Clozup API is live in production. Get your API key from Settings → API Keys in the dashboard, or call POST /api/v1/api-keys programmatically.

Base URL

Production
https://api.clozup.ai/api/v1

Authentication

All requests require an API key (clz_ prefix) or a Clerk JWT in the Authorization header:

API Key Authentication
curl "https://api.clozup.ai/api/v1/deals" \
  -H "Authorization: Bearer clz_your_api_key_here"

Keep your API key secret

API keys are hashed (SHA-256) on our servers. Never expose keys in client-side code or public repos. Revoke immediately if compromised.

Core CRM

Leads

MethodEndpointDescription
GET/leadsList leads with pagination & filters
GET/leads/:idGet lead details
GET/leads/:id/360Full 360° view: deals, activities, notes, calls
POST/leadsCreate a lead
PATCH/leads/:idUpdate lead fields
POST/leads/:id/assignAssign to team member

Deals & Pipeline

MethodEndpointDescription
GET/dealsList deals with stage filtering
GET/deals/:idGet deal with full context
POST/dealsCreate a deal
PATCH/deals/:idUpdate deal fields
POST/deals/:id/moveMove to another pipeline stage
GET/deals/stagesList pipeline stages

Tasks

MethodEndpointDescription
GET/tasksList tasks (filter by status, priority)
POST/tasksCreate a follow-up task
POST/tasks/:id/completeMark task as completed

Activities & Notes

MethodEndpointDescription
GET/activitiesList activities
POST/activitiesLog an activity (call, email, meeting, etc.)
POST/notesAdd a note to a deal or lead

AI & Intelligence

Agent-Native

These endpoints are designed for AI agents — risk scoring, memory, and buying signals are computed server-side in pure Rust. No LLM calls, instant responses.

Deal Intelligence

MethodEndpointDescription
GET/deals/:id/intelligenceRisk score, days in stage, suggested action
GET/deals/at-riskAll deals needing immediate attention

Agent Memory

MethodEndpointDescription
GET/deals/:id/memoryRead persistent agent context notes
POST/deals/:id/memoryWrite a memory entry with tags

Buying Signals

MethodEndpointDescription
GET/signalsDetect email opens, activity gaps, overdue follow-ups

Email (AgentMail)

MethodEndpointDescription
POST/deals/:id/email-inboxProvision a dedicated email inbox for a deal
GET/deals/:id/emailsList emails in the deal inbox
POST/deals/:id/emails/sendSend email from deal inbox
POST/deals/:id/emails/reply/:message_idReply to an email thread

Real-Time Events

MethodEndpointDescription
GET/eventsSSE stream — subscribe to deal.updated, signal.detected, etc.
Subscribe to Events
curl -N "https://api.clozup.ai/api/v1/events?types=deal.updated,signal.detected" \
  -H "Authorization: Bearer clz_your_key" \
  -H "Accept: text/event-stream"

Webhooks

MethodEndpointDescription
GET/webhooksList configured webhooks
POST/webhooksCreate a webhook (deal.created, deal.stage_changed, etc.)
DELETE/webhooks/:idDelete a webhook

API Key Management

MethodEndpointDescription
GET/api-keysList API keys for your org
POST/api-keysCreate a new API key
DELETE/api-keys/:idRevoke an API key

Analytics

MethodEndpointDescription
GET/analytics/overviewPipeline stats, total deals, value, win rate
GET/performance/leaderboardTeam performance rankings

Agent Workflow

The recommended workflow for an AI agent operating Clozup:

Daily Agent Loop
1. GET /signals?score_min=70        → Check buying signals
2. GET /deals/at-risk               → Find deals needing attention  
3. GET /deals/:id/intelligence      → Get risk score + suggested action
4. GET /deals/:id/memory            → Read persistent context
5. POST /activities                 → Log actions taken
6. POST /deals/:id/memory           → Write learnings for next cycle
7. POST /deals/:id/move             → Advance pipeline stage

Response Format

Standard Response
{
  "data": { ... },
  "meta": {
    "page": 1,
    "per_page": 25,
    "total": 142
  }
}
Intelligence Response
{
  "data": {
    "risk_score": 65,
    "risk_level": "medium",
    "days_in_stage": 12,
    "days_since_activity": 8,
    "risk_factors": ["No activity in 8 days", "High value deal stalling"],
    "suggested_action": "Schedule a follow-up call"
  }
}

Rate Limits

  • 30 requests per burst
  • 1 request per 500ms sustained
  • HTTP 429 on limit exceeded — back off and retry

Full Endpoint Catalog

For the complete list of all 112 endpoints with request/response schemas, see the live API documentation:

Live Docs
curl https://api.clozup.ai/api/v1/public/docs | jq

The /public/docs endpoint is always up-to-date and requires no authentication.