> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vchata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API Introduction

> Complete API reference for VChata Backend - AI-powered social media automation platform

# VChata Backend API

Welcome to the VChata Backend API documentation. VChata is a comprehensive AI-powered social media automation platform that helps businesses manage their social media presence, engage with leads, and automate marketing campaigns.

## Overview

The VChata Backend API provides a complete set of endpoints for:

* **Authentication & User Management** - Secure user registration, login, and organization management
* **AI-Powered Automation** - Intelligent conversation handling, prompt templates, and AI agents
* **Social Media Integration** - Connect and manage Facebook, Instagram, and other social platforms
* **Lead Management** - Track, nurture, and convert leads through automated pipelines
* **Content Management** - Create, schedule, and analyze social media content
* **Billing & Subscriptions** - Handle payments, credits, and subscription management
* **Analytics & Reporting** - Comprehensive insights and performance tracking

## Base URL

```
https://api.vchata.com
```

## Authentication

All API endpoints require authentication using JWT (JSON Web Tokens). Include the token in the Authorization header:

```http theme={null}
Authorization: Bearer <your-jwt-token>
```

<Note>
  Most endpoints require organization context. Make sure to include the organization ID in the request path or use the appropriate organization-scoped endpoints.
</Note>

## Rate Limits

* **Standard endpoints**: 100 requests/minute per user
* **Analytics endpoints**: 20 requests/minute per user
* **Payment operations**: 10 requests/minute per user
* **Webhook endpoints**: 500 requests/minute per user

## Response Format

All API responses follow a consistent JSON format:

```json theme={null}
{
  "success": true,
  "data": {
    // Response data
  },
  "message": "Operation completed successfully"
}
```

## Error Handling

The API uses standard HTTP status codes:

* `200` - Success
* `201` - Created
* `400` - Bad Request
* `401` - Unauthorized
* `403` - Forbidden
* `404` - Not Found
* `409` - Conflict
* `422` - Validation Error
* `429` - Rate Limited
* `500` - Internal Server Error

Error responses include detailed messages:

```json theme={null}
{
  "success": false,
  "error": "ValidationError",
  "message": "Invalid request parameters",
  "details": {
    "field": "email",
    "reason": "Invalid email format"
  }
}
```

## Getting Started

1. **Create an Account** - Use the `/auth/signup` endpoint to create your account
2. **Authenticate** - Login using `/auth/login` to get your JWT token
3. **Set up Organization** - Create or join an organization for team collaboration
4. **Connect Social Accounts** - Link your social media accounts via `/social/connect`
5. **Create Campaigns** - Set up automated campaigns using the campaigns endpoints

## SDKs and Libraries

<CardGroup cols={2}>
  <Card title="JavaScript/Node.js" icon="code" href="https://www.npmjs.com/package/vchata-sdk">
    Official VChata SDK for JavaScript and Node.js applications
  </Card>

  <Card title="Python" icon="python" href="https://pypi.org/project/vchata-python/">
    Python SDK for VChata API integration
  </Card>
</CardGroup>
