# LiteSOC — API Documentation & Integration Guide

> Everything you need to integrate LiteSOC into your application. From quick start guides to complete API references.

- **API Reference:** https://litesoc.io/docs/api
- **Integrations:** https://litesoc.io/docs/integrations
- **n8n Node Docs:** https://litesoc.io/docs/n8n
- **Server Agent Docs:** https://litesoc.io/docs/integrations/agent

## Quick Start

### Install the SDK

```bash
# Node.js
npm install litesoc

# Python
pip install litesoc

# PHP
composer require litesoc/litesoc-php
```

### Track a Security Event

```typescript
import { LiteSOC } from 'litesoc';

const litesoc = new LiteSOC('YOUR_API_KEY');

// Track a security event
litesoc.track('auth.login_success', {
  actorId: 'user_123',
  actorEmail: 'user@example.com',
  userIp: request.ip,
  metadata: { method: 'password' }
});

// Use convenience methods
litesoc.trackLoginFailed('user_123', { userIp: request.ip });
```

## Quick Links

- **Quick Start** — Get started quickly with our REST API
- **Security Intelligence** — Auto-enrichment with GeoIP & Network Intelligence
- **Event Forensics** — Click any event to view full forensic details
- **Event Types** — 26 standardized event types across 5 categories

## SDKs

| Language | Package | Install |
|---|---|---|
| Node.js | `litesoc` | `npm install litesoc` |
| Python | `litesoc` | `pip install litesoc` |
| PHP | `litesoc/litesoc-php` | `composer require litesoc/litesoc-php` |

## API Host

- **Ingestion:** `POST https://api.litesoc.io/collect`
- **Management:** `https://api.litesoc.io/{alerts,events,health}`
- **Authentication:** `X-API-Key` header (required)

## Batch Ingestion

Send up to 100 events in a single request:

```bash
curl -X POST https://api.litesoc.io/collect \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"events": [{"event_type": "auth.login_success", "actor_id": "user_1"}, ...]}'
```
