Channel Automation API
Comprehensive API documentation for the Channel Automation backend system.
## Features
- **Messaging**: Send/receive SMS and MMS through Twilio integration
- **Contact Management**: Full CRUD operations for contact records
- **Webhooks**: Configure and monitor webhook integrations
- **Analytics**: Visual query builder and data analytics
- **Pipeline Management**: Sales pipeline and lead tracking
- **Calendar Booking**: Appointment scheduling and booking system (Cloudflare Worker)
- **AI Content Processing**: Intelligent content generation, enhancement, summarization, and expansion (Cloudflare Worker)
- **Authentication**: JWT and API key authentication
- **Workspace Management**: Multi-tenant workspace support
## Authentication
This API supports two authentication methods:
1. **Bearer Token**: JWT authentication for user sessions
2. **API Key**: X-API-Key header for programmatic access
## Rate Limiting
API endpoints are rate-limited to ensure fair usage and system stability.
## Data Security
All data access is workspace-isolated, ensuring tenant data separation.
## Calendar API (Cloudflare Worker)
The Calendar Booking API is deployed as a separate Cloudflare Worker for optimal performance:
- **Public Endpoints**: Available without authentication for booking and availability queries
- **Admin Endpoints**: Require JWT or API key authentication for event management
- **Auto-Contact Creation**: New bookings automatically create contacts in the CRM
- **Global Edge Deployment**: Served from Cloudflare's global network for low latency
## AI Content API (Cloudflare Worker)
The Notes AI Processor provides intelligent content operations via edge deployment:
- **Base URL**: https://ai-notes.customerconnects.app/api/notes
- **Features**: Content generation, enhancement, summarization, and expansion using GPT-4o
- **Authentication**: No auth required for frontend use, API key required for external integrations
- **Performance**: Sub-50ms response times with global edge caching
- **Integration**: Seamless integration with Notes system and external tools (Zapier, Make.com)
Authentication
User authentication and session management
Research
Public UX research questionnaire pages and submissions
Messages
SMS/MMS messaging via Twilio integration
- Send an outbound SMS or MMS messagePOST
/send-sms - Send a message via Twilio for a workspacePOST
/api/send-message - Send an agent text to a contact from the Call Center profilePOST
/api/call-center/contacts/{contactId}/text - Read a page of email previews for a visible Calling contactGET
/api/call-center/contacts/{contactId}/emails - Send an email or a reply to a visible Calling contactPOST
/api/call-center/contacts/{contactId}/emails - Read an email and related messages using saved reply referencesGET
/api/call-center/contacts/{contactId}/emails/{messageId}/thread - Read public website metadata for a conversation link previewPOST
/api/link-preview
Contacts
Contact management and CRM operations
- Search contactsGET
/api/contacts/search - Enhanced contact search with advanced filteringGET
/api/contacts/enhanced-search - Create new contactPOST
/api/contacts - Create a new contact without requiring a phone numberPOST
/api/contacts/no-phone - Pause automation for a contactPOST
/api/contacts/{contactId}/pause-automation - Resume automation for a contactPOST
/api/contacts/{contactId}/resume-automation - Cancel active automation workflows for a contactPOST
/api/contacts/{contactId}/cancel-active-workflows - Reset a contact's AI context for internal verificationPOST
/api/contact-ai/{contactId}/reset-context - Create a custom field definitionPOST
/api/custom-fields - Update a custom field definitionPUT
/api/custom-fields/{id} - Booked appointments nearest a contact's addressGET
/api/nearby-appointments - How many workspace addresses still need mapping for NearbyGET
/api/nearby-appointments/backfill/status - Map (geocode) a batch of workspace addresses for Nearby — on demandPOST
/api/nearby-appointments/backfill - SMS/MMS segment counts and estimated Twilio cost for one contactGET
/api/contacts/{contactId}/sms-usage
Customer Hub
LeadGPT and Customer Hub agent action companion APIs
Actions
Advanced Action System for workflow automation and contact actions
- Preview install-time bindings for an unsaved selectionPOST
/api/workspaces/{workspaceId}/automation-templates/analyze/install-preview - Analyze automation template selectionPOST
/api/workspaces/{workspaceId}/automation-templates/analyze - Review an automation templateGET
/api/workspaces/{workspaceId}/automation-templates/{templateId} - Validate a template installationPOST
/api/workspaces/{workspaceId}/automation-templates/{templateId}/install/preview - Install an automation templatePOST
/api/workspaces/{workspaceId}/automation-templates/{templateId}/install - Manage a trigger or its scheduled remindersPOST
/api/triggers/process-date-distance - Manage a trigger or its scheduled remindersPOST
/api/triggers/process-appointment-booked - Send an appointment alert test for the authorized workspacePOST
/api/triggers/test-appointment-alert - List available trigger event typesGET
/api/triggers/event-types - Read workspace trigger executionsGET
/api/triggers/executions - Get workflow trigger counts or detailed analyticsGET
/api/triggers/analytics - Read workspace scheduled remindersGET
/api/triggers/scheduled - Reschedule triggers for an authorized contactPOST
/api/triggers/reschedule-for-contact - Process time triggers for an authorized contactPOST
/api/triggers/process-contact - List or create workspace triggersGET
/api/triggers/ - List or create workspace triggersPOST
/api/triggers/ - Manage a trigger or its scheduled remindersGET
/api/triggers/{id} - Manage a trigger or its scheduled remindersPUT
/api/triggers/{id} - Manage a trigger or its scheduled remindersDEL
/api/triggers/{id} - Manage a trigger or its scheduled remindersPOST
/api/triggers/{id}/schedule - Manage a trigger or its scheduled remindersDEL
/api/triggers/{id}/scheduled/{contactId} - Manage a trigger or its scheduled remindersDEL
/api/triggers/{id}/scheduled - Execute a stored workflowPOST
/api/unified-workflow/execute-workflow - Read a workflow run in the selected workspaceGET
/api/unified-workflow/workflow-status/{taskId} - Cancel a workflow run in the selected workspacePOST
/api/unified-workflow/cancel-workflow/{taskId} - Execute a stored workflow for a visible contactPOST
/api/unified-workflow/execute-for-contact - Read the manual batch protocol supported by this backendGET
/api/unified-workflow/batch-capabilities - Execute a stored workflow for visible contactsPOST
/api/unified-workflow/batch-execute - Submit a bounded manual batch with a stable retry identityPOST
/api/unified-workflow/batch-execute-v2
Analytics
Data analytics and visual query builder
- Get available data sources for query builderGET
/api/analytics/data-sources - Get query templatesGET
/api/analytics/templates - Execute an analytics queryPOST
/api/analytics/execute - Get saved queries for workspaceGET
/api/analytics/saved-queries - Save a new queryPOST
/api/analytics/saved-queries - Update a saved queryPUT
/api/analytics/saved-queries/{id} - Delete a saved queryDEL
/api/analytics/saved-queries/{id} - Get query execution history/logsGET
/api/analytics/executions - Get analytics performance statisticsGET
/api/analytics/performance - Export query results as CSVPOST
/api/analytics/export/csv - Voice AI raw analytics dashboard dataGET
/api/analytics/voice-ai-raw-dashboard - Lightweight Voice AI summary for the Calling tabGET
/api/analytics/voice-ai-calling-summary - Inbound calls per dialed number and number labelGET
/api/analytics/inbound-calls-by-number - Underlying counted inbound calls and exact booking evidenceGET
/api/analytics/inbound-calls-by-number/calls - Per-agent human outbound dialing KPIsGET
/api/analytics/agent-calling-stats - Latest Voice AI questionnaire checklist for a single contactGET
/api/analytics/contact-voice-questionnaire - Save Voice AI final funnel stage mappingPUT
/api/analytics/voice-ai-raw-dashboard/funnel-stage-mapping - Enable sharing for a saved report and return a login-gated share linkPOST
/api/analytics/saved-queries/{id}/share - Revoke a saved report's share linkDEL
/api/analytics/saved-queries/{id}/share - Fetch a shared report's rendered data by share token (login + workspace membership required)GET
/api/analytics/shared-report/{token} - Get sequence performance analyticsGET
/api/workspaces/{workspaceId}/sequence-analytics
Webhooks
Webhook configuration and monitoring
Pipeline
Sales pipeline and lead management
- List all pipelinesGET
/api/pipeline/pipelines - Create a new pipelinePOST
/api/pipeline/pipelines - Get a pipeline by IDGET
/api/pipeline/pipelines/{id} - Update a pipelinePUT
/api/pipeline/pipelines/{id} - Delete a pipeline (soft delete)DEL
/api/pipeline/pipelines/{id} - Get all opportunities with filtering optionsGET
/api/pipeline/opportunities
Twilio
Twilio service configuration and phone numbers
- List voice-capable workspace numbers and their inbound agent assignmentsGET
/api/workspaces/{workspaceId}/voice-ai/numbers - Assign or clear the inbound voice agent for an owned numberPUT
/api/workspaces/{workspaceId}/voice-ai/numbers/{phone} - Route a Twilio voice call to the configured workspace destinationPOST
/api/workspaces/{workspaceId}/voice - Record carrier status and release ended Voice AI call capacityPOST
/api/workspaces/{workspaceId}/voice/status - Receive inbound Twilio SMS for a workspacePOST
/twilio/{workspaceId} - Test inbound Twilio SMS orchestrationPOST
/test/twilio/{workspaceId} - Record authenticated message status and delivery-channel evidencePOST
/twilio/{workspaceId}/status - Receive legacy inbound Twilio SMSPOST
/twilio - Create an outbound call logPOST
/api/calls/initiate - Save a wrap-up disposition for a call that produced no CallSidPUT
/api/calls/contact/{contactId}/disposition - Search available US phone numbersPOST
/api/twilio/available-numbers - Trigger a Twilio credit alert for a workspacePOST
/api/twilio/credit-alert - Buy a phone number and optionally configure SMS and VoicePOST
/api/twilio/purchase-number - List messaging services with VERIFIED A2P campaigns for the workspacePOST
/api/twilio/messaging-services - Add an owned phone number to an approved A2P messaging servicePOST
/api/twilio/add-to-messaging-service - Release an owned Twilio phone numberPOST
/api/twilio/release-number - Record authenticated message status and delivery-channel evidencePOST
/api/twilio/{workspaceId}/status - Twilio connection status for a workspace (the Auth Token is never returned)GET
/api/twilio/config/{workspaceId}
Voice AI
Workspace voice agents, phone number connections and outbound campaigns
- Validate and publish an immutable inbound call flow versionPOST
/api/workspaces/{workspaceId}/inbound-call-flows/{flowId}/publish - Continue a signed Twilio inbound call flowPOST
/api/workspaces/{workspaceId}/inbound-call-flow/{runId}/step - Record a signed destination-leg handoff acknowledgementPOST
/api/workspaces/{workspaceId}/voice/handoffs/{attemptId}/{kind} - List configured voice agents without initializing profilesGET
/api/workspaces/{workspaceId}/voice-ai/agents - Create a voice agent and lazily preserve the current workspace agentPOST
/api/workspaces/{workspaceId}/voice-ai/agents - Get one selected agent with masked secretsGET
/api/workspaces/{workspaceId}/voice-ai/agents/{agentId} - Save only changed agent keys with revision compare and swapPUT
/api/workspaces/{workspaceId}/voice-ai/agents/{agentId} - Duplicate an agent on the server while retaining lookup credentialsPOST
/api/workspaces/{workspaceId}/voice-ai/agents/{agentId}/duplicate - Set the default without moving either configurationPOST
/api/workspaces/{workspaceId}/voice-ai/agents/{agentId}/default - Archive an unused nondefault agent and retain historyPOST
/api/workspaces/{workspaceId}/voice-ai/agents/{agentId}/archive - Get shared workspace voice settings with masked credentialsGET
/api/workspaces/{workspaceId}/voice-ai/settings/shared - Patch shared keys without modifying any agent scriptPUT
/api/workspaces/{workspaceId}/voice-ai/settings/shared - Calls taken by each voice agent in the workspaceGET
/api/voice-agent-studio/agent-call-counts - Preview the lead brief supplied before an outbound callPOST
/api/voice-campaigns/context-preview/{contactId} - GET AI outbound number pool configurationGET
/api/voice-campaigns/number-pools - Create an AI caller poolPOST
/api/voice-campaigns/number-pools - Remove a number from an AI caller poolDEL
/api/voice-campaigns/number-pools/{poolId}/numbers/{numberId} - GET AI outbound number pool configurationGET
/api/voice-campaigns/number-pools/inventory - POST AI outbound number pool configurationPOST
/api/voice-campaigns/number-pools/refresh - Update an AI caller poolPATCH
/api/voice-campaigns/number-pools/{poolId} - Add an imported number to an AI caller poolPOST
/api/voice-campaigns/number-pools/{poolId}/numbers - Update shared AI caller number policyPATCH
/api/voice-campaigns/pool-numbers/{numberId} - Voice agents that can answer callbacks on a pool numberGET
/api/voice-campaigns/number-pools/agents - Create a free voice number, attach an agent, and add it to the poolPOST
/api/voice-campaigns/number-pools/{poolId}/provision - Attempts the voice engine left uncertain, awaiting operator reviewGET
/api/voice-campaigns/held-attempts - Record whether a held attempt actually placed a callPOST
/api/voice-campaigns/held-attempts/{attemptId}/resolve - Simultaneous call capacity for the workspaceGET
/api/voice-campaigns/capacity - Estimate who an audience would call, and who it would excludePOST
/api/voice-campaigns/audience-preview - Create a draft AI outbound campaignPOST
/api/voice-campaigns - Update AI outbound campaign settingsPATCH
/api/voice-campaigns/{campaignId} - Freeze the audience and mark the campaign runningPOST
/api/voice-campaigns/{campaignId}/start - List existing workspace numbers for voice agentsGET
/api/voice-workspace-numbers - Preview an existing number's incoming call routingGET
/api/voice-workspace-numbers/{sid}/preview - Connect a workspace Twilio number to a voice agentPOST
/api/voice-workspace-numbers/connect
