Skip to main content

Campaigns Controller

The Campaigns Controller provides comprehensive campaign management capabilities including multi-platform campaign creation, keyword management, AI agent configuration, and automated lead generation for the VChata platform.

Base Path

Overview

This controller enables sophisticated campaign automation:
  • 🎯 Multi-Platform Campaigns - Create campaigns across Instagram, Facebook, TikTok, and more
  • 🤖 AI Agent Integration - Configure intelligent response agents for each platform
  • 🔍 Keyword Management - Advanced keyword matching with priorities and conflict detection
  • 📊 Lead Generation - Automated lead capture from social media interactions
  • 🎭 A/B Testing - Support for testing different campaign variations
  • 🔄 Real-time Processing - Live monitoring and response to social media activity

Authentication & Authorization

  • 🔐 All endpoints require valid JWT authentication token
  • 🏢 All operations are scoped to the user’s current organization
  • 👥 Organization membership required for all operations

Campaign Management

Create Campaign

Description: Creates a comprehensive multi-platform campaign with AI agent configuration and keyword management.
object

Get All Campaigns

Description: Retrieves all campaigns for the organization with optional filtering and pagination.
object

Get Campaign Details

Description: Retrieves detailed information about a specific campaign including performance metrics.

Update Campaign

Description: Updates campaign details including keywords, agent configurations, and social account associations.
Update Behavior:
  • Keywords: Provide array to replace all keywords, empty array to remove all, omit to leave unchanged
  • Agent Configs: Provide array to replace all configs, empty array to remove all, omit to leave unchanged
  • Social Accounts: Provide array to replace all associations, empty array to remove all, omit to leave unchanged

Delete Campaign

Description: Permanently deletes a campaign and all associated data.
Irreversible Action: Deleting a campaign will permanently remove all associated keywords, agent configurations, and historical data.

Keyword Management

Validate Keywords

Description: Validates keywords for conflicts and provides suggestions for optimization.
object

Get Organization Keywords

Description: Retrieves all keywords across all campaigns in the organization.

Campaign Status Values

  • DRAFT - Campaign is being created/configured
  • ACTIVE - Campaign is running and processing interactions
  • PAUSED - Campaign is temporarily stopped
  • COMPLETED - Campaign has finished
  • ARCHIVED - Campaign is archived and no longer active

Match Types

  • EXACT - Exact keyword match
  • CONTAINS - Keyword is contained within the text
  • STARTS_WITH - Text starts with the keyword
  • ENDS_WITH - Text ends with the keyword

Channel Types

  • DIRECT_MESSAGE - Private messages/DMs
  • COMMENT - Public comments on posts
  • POST - Direct posts (for posting content)

Error Responses

Common Errors

Advanced Features

Multi-Platform Support

  • Cross-Platform Campaigns - Run campaigns across multiple social media platforms
  • Platform-Specific Agents - Different AI agents for each platform
  • Unified Lead Management - All leads funnel into the same pipeline

Keyword Priority System

  • Priority Levels - Keywords with higher priority (lower numbers) are processed first
  • Conflict Resolution - Automatic conflict detection and resolution
  • Smart Matching - Advanced matching algorithms for better targeting

AI Agent Configuration

  • Channel-Specific Responses - Different responses for DMs vs comments
  • Response Delays - Configurable delays to appear more human
  • Template Management - Reusable prompt templates across campaigns

Webhook Integration

  • Real-time Events - Webhook notifications for campaign events
  • Lead Notifications - Instant notifications when leads are generated
  • Performance Metrics - Real-time campaign performance data

UTM Tracking

  • Campaign Attribution - Track which campaigns generate leads
  • Source Identification - Identify the best performing traffic sources
  • ROI Measurement - Measure return on investment for each campaign