API Reference

The LVNG REST API lets you programmatically interact with every part of the platform. Manage agents, orchestrate workflows, send messages, and build intelligent applications with a consistent, well-documented interface.

Base URL

All API requests are made to the following base URL. HTTPS is required for all requests.

https:400">class="text-zinc-500">//api.lvng.ai/api

Versioning

The API is versioned via path prefix. The current stable version is v2. Version 1 endpoints are deprecated and will be removed in a future release.

v2

Current stable version. All new features land here.

v1

Deprecated. Will be sunset Q3 2026.

Content Type

All requests and responses use JSON. Set the Content-Type header on every request that includes a body.

Content-Type: application/json

Authentication

All endpoints require a Bearer token in the Authorization header. You can generate API keys from the Settings page in the LVNG dashboard.

Authenticated request
400">curl -X 400">GET https:400">class="text-zinc-500">//api.lvng.ai/api/v2/agents \
  -H 400">class="text-emerald-400">"Authorization: Bearer YOUR_API_KEY" \
  -H 400">class="text-emerald-400">"Content-Type: application/json"

Requests without a valid token receive a 401 Unauthorized response.

Response Format

All responses follow a consistent envelope structure. Successful responses include a data field. Error responses include an error field with a human-readable message.

Success response

{
  400">class="text-emerald-400">"success": true,
  400">class="text-emerald-400">"data": {
    400">class="text-emerald-400">"id": 400">class="text-emerald-400">"agt_a1b2c3d4",
    400">class="text-emerald-400">"name": 400">class="text-emerald-400">"Research Agent",
    400">class="text-emerald-400">"status": 400">class="text-emerald-400">"active"
  }
}

Error response

{
  400">class="text-emerald-400">"success": false,
  400">class="text-emerald-400">"error": 400">class="text-emerald-400">"Agent not found"
}

Rate Limiting

API requests are rate-limited per API key. Rate limit information is returned in response headers.

Rate limit headers
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 997
X-RateLimit-Reset: 1711843200

If you exceed the limit, you will receive a 429 Too Many Requests response. Wait until the reset timestamp before retrying.

API Resources

HTTP Methods

The API uses standard HTTP methods for CRUD operations.

MethodDescription
GETRetrieve a resource or list of resources
POSTCreate a new resource or trigger an action
PUTReplace a resource entirely
PATCHPartially update a resource
DELETERemove a resource

Pagination

List endpoints support cursor-based pagination using limit and before parameters. The default page size is 50 items. Maximum is 100.

Paginated request
400">curl -X 400">GET 400">class="text-emerald-400">"https:400">class="text-zinc-500">//api.lvng.ai/api/v2/messages?channel_id=ch_abc123&limit=25&before=2026-03-01T00:00:00Z" \
  -H 400">class="text-emerald-400">"Authorization: Bearer YOUR_API_KEY"