Some checks failed
Deploy / deploy (push) Has been cancelled
Full-stack web application for Telegram management - Frontend: Vue 3 + Vben Admin - Backend: NestJS - Features: User management, group broadcast, statistics 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Telegram Marketing Agent System API Documentation
Overview
The Telegram Marketing Agent System provides a comprehensive REST API for managing marketing campaigns, user segmentation, message scheduling, and analytics. This documentation covers all available endpoints, authentication requirements, and usage examples.
Base URL
http://localhost:3000/api/v1
Authentication
All API endpoints (except login and public endpoints) require JWT authentication. Include the JWT token in the Authorization header:
Authorization: Bearer <your-jwt-token>
Getting Started
-
Login to get access token
curl -X POST http://localhost:3000/api/v1/auth/login \ -H "Content-Type: application/json" \ -d '{"username": "admin", "password": "password123"}' -
Use the token for subsequent requests
curl -X GET http://localhost:3000/api/v1/campaigns \ -H "Authorization: Bearer <your-token>"
API Documentation Sections
Core Services
- Authentication API - User authentication and session management
- Campaigns API - Campaign creation and management
- Analytics API - Real-time analytics and reporting
- Users API - User management and segmentation
Marketing Features
- Templates API - Message template management
- Scheduled Campaigns API - Campaign scheduling
- A/B Testing API - A/B test management
- Workflows API - Marketing automation workflows
Integration Services
- Webhooks API - Webhook integration management
- Translations API - Multi-language support
- AI API - Claude AI integration for smart suggestions
System Management
- Accounts API - Telegram account management
- Compliance API - Compliance checking
- Settings API - System configuration
Interactive API Explorer
Access the Swagger UI at: http://localhost:3000/api-docs
Rate Limiting
- Default rate limit: 100 requests per minute per IP
- Authenticated users: 1000 requests per minute
- AI endpoints: 20 requests per minute
Error Handling
All API errors follow a consistent format:
{
"success": false,
"error": "Error message",
"code": "ERROR_CODE",
"details": {}
}
Common Error Codes
400- Bad Request401- Unauthorized403- Forbidden404- Not Found429- Too Many Requests500- Internal Server Error
Pagination
List endpoints support pagination:
GET /api/v1/campaigns?page=1&limit=20&sort=-createdAt
page- Page number (default: 1)limit- Items per page (default: 20, max: 100)sort- Sort field, prefix with-for descending
Filtering
Most list endpoints support filtering:
GET /api/v1/campaigns?status=active&type=message
Webhooks
Configure webhooks to receive real-time notifications:
- Register webhook endpoint
- Verify webhook signature
- Handle webhook events
See Webhooks API for details.
SDKs and Libraries
Support
- API Status:
http://localhost:3000/health - Contact: api-support@yourcompany.com
- GitHub: https://github.com/yourusername/telegram-marketing-agent