API Reference Overview
This is a high-level reference for the Chatofy REST API v1. For detailed documentation with request/response examples, visit the Interactive API Docs page at /developer.
Contact Management & Bulk Operations
POST /api/v1/contact/create
POST /api/v1/contact/update/[phone]
POST /api/v1/contacts/upsert
POST /api/v1/contacts/bulk
GET /api/v1/contacts/duplicates
POST /api/v1/contacts/merge
POST /api/v1/contacts/import/preview
POST /api/v1/contacts/import/commit
GET /api/v1/contacts
GET /api/v1/contacts/search
DELETE /api/v1/contacts/[id]
POST /api/v1/contacts/[id]/restore
GET /api/v1/users
Create, update, upsert, bulk import (up to 500 records), dedupe, merge, soft-delete, restore, typo-tolerant search, and list contacts with keyset cursor pagination.
Pipelines & Deals (CRM)
GET /api/v1/pipelines
POST /api/v1/pipelines
POST /api/v1/pipelines/[id]/stages
PUT /api/v1/pipelines/[id]/stages
PATCH /api/v1/pipelines/[id]/stages/[stageId]
DELETE /api/v1/pipelines/[id]/stages/[stageId]
GET /api/v1/deals
GET /api/v1/deals/search
POST /api/v1/deals
POST /api/v1/deals/bulk
POST /api/v1/deals/[id]/move
PATCH /api/v1/deals/[id]
DELETE /api/v1/deals/[id]
POST /api/v1/deals/[id]/restore
Full sales pipeline management with dedicated stage move endpoint, automatic status derivation, soft-delete & restore, win probabilities, weighted values, and signed webhooks.
CRM Reports & Analytics
GET /api/v1/reports/pipeline
GET /api/v1/reports/velocity
GET /api/v1/reports/conversion
GET /api/v1/reports/win-rate
GET /api/v1/reports/followups
GET /api/v1/reports/sla
GET /api/v1/reports/export
Comprehensive CRM intelligence: pipeline health, weighted forecasts, average stage duration, stage conversion funnels, sales velocity index, owner win rates, 48-hour follow-up compliance, agent SLA response adherence, and RFC 4180 CSV export.
Tasks, Follow-ups & Activity Timeline
GET /api/v1/tasks
POST /api/v1/tasks
GET /api/v1/tasks/[id]
PATCH /api/v1/tasks/[id]
POST /api/v1/tasks/[id]/complete
POST /api/v1/tasks/[id]/snooze
GET /api/v1/tasks/queue
GET /api/v1/contacts/[id]/timeline
GET /api/v1/contacts/[id]/followups
POST /api/v1/contacts/[id]/followups
Follow-up cadence queues, touchpoint check-in logging ([LEAD X/Y] CHECKIN), template tracking, reply detection, snooze and completion flows, owner-grouped queues, and contact activity timeline.
Messaging
POST /api/v1/contact/send-message
POST /api/v1/contact/send-template-message
POST /api/v1/contact/send-media-message
POST /api/v1/contact/send-interactive-message
Send various message types: plain text, templates, media files, and interactive messages with buttons or lists.
Campaigns
GET /api/v1/campaigns
POST /api/v1/campaigns
GET /api/v1/campaign/[id]
GET /api/v1/campaign/[id]/logs
Create and manage broadcast campaigns programmatically.
Templates
GET /api/v1/templates
List available WhatsApp message templates for use in campaigns.
Products (Products, Services & SaaS)
Products cover physical products, services and SaaS plans. Requires the products feature flag. Archiving a product hides it from lists but keeps its deals and report history.
GET /api/v1/products
POST /api/v1/products
GET /api/v1/products/[id]
PATCH /api/v1/products/[id]
PUT /api/v1/products/[id]/stages
Filter deals, tasks, flows, campaigns, contacts and the pipeline report with ?product_id=. Contacts also take interest_level (interested, trial, customer, churned). A contact can hold a different interest level for each product. The global lifecycle is customer when any product link is customer, otherwise lead. at_risk and churned are set manually and never overwritten.
Error Responses
The API returns standard HTTP status codes and a JSON error body:
200— Success400— Bad request (validation error)401— Unauthorized (invalid API key)403— Forbidden (insufficient permissions)404— Resource not found429— Rate limit exceeded500— Internal server error