API Reference

Documentacion de la API REST de Treebuu. Integra nuestras funcionalidades en tu propia aplicacion.

Autenticacion

Todas las peticiones a la API requieren un token Bearer JWT en el headerAuthorization. Obtén el token mediante el endpoint de login.

# Ejemplo de header
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...

Endpoints

Autenticacion

POST/api/v1/auth/register
POST/api/v1/auth/login
POST/api/v1/auth/refresh
GET/api/v1/auth/me

Lives

POST/api/v1/lives
GET/api/v1/lives
GET/api/v1/lives/:id
POST/api/v1/lives/:id/start-monitor
POST/api/v1/lives/:id/stop-monitor

Leads

GET/api/v1/leads
GET/api/v1/leads/:id
PATCH/api/v1/leads/:id
POST/api/v1/leads/export

Productos

GET/api/v1/products
POST/api/v1/products
PATCH/api/v1/products/:id
DELETE/api/v1/products/:id

Base URL

https://api.treebuu.com/v1

Rate Limit

100 requests/min (Free)
1000 requests/min (Pro)

Formato

JSON (application/json)
UTF-8 encoding

Ejemplos

Iniciar sesion

curl -X POST https://api.treebuu.com/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "password": "your_password"
  }'

Listar leads

curl https://api.treebuu.com/v1/leads \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json"

Iniciar monitoreo de TikTok Live

curl -X POST https://api.treebuu.com/v1/lives/123/start-monitor \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "tiktok_username": "@your_tiktok"
  }'