Developer API
Developer console endpoints for managing webhooks, viewing per-key API usage, and querying event logs. Webhooks support automatic retries, delivery logs, and test events. All endpoints require JWT authentication.
Base path: /api/v2/developer
API Key Usage
View per-key usage statistics and sparkline data for dashboard charts.
/api/v2/developer/api-keys/:id/usageAuthenticatedGet per-key usage sparkline data (requests per day). Verifies the authenticated user owns the key.
Path Parameters
idstringrequiredUUID of the API key.
Query Parameters
daysintegerNumber of days of usage data. Defaults to 7.
Request
400">curl -X 400">GET 400">class="text-emerald-400">"https:400">class="text-zinc-500">//api.lvng.ai/api/v2/developer/api-keys/key_abc123/usage?days=14" \
-H 400">class="text-emerald-400">"Authorization: Bearer YOUR_API_KEY"Response 200
{
400">class="text-emerald-400">"success": true,
400">class="text-emerald-400">"data": {
400">class="text-emerald-400">"key_id": 400">class="text-emerald-400">"key_abc123",
400">class="text-emerald-400">"days": 14,
400">class="text-emerald-400">"sparkline": [12, 8, 15, 23, 19, 31, 28, 14, 9, 22, 35, 18, 27, 20]
}
}Webhooks
Create and manage webhook endpoints that receive real-time event notifications. Supported event types: agent.completed, workflow.completed, message.created, credit.low, swarm.spawn, knowledge.indexed.
/api/v2/developer/webhooksAuthenticatedCreate a new webhook endpoint. A signing secret is generated automatically for verifying payloads.
Body Parameters
urlstringrequiredHTTP/HTTPS URL to receive webhook payloads.
eventsstring[]requiredArray of event types to subscribe to.
descriptionstringHuman-readable description of the webhook.
Request
400">curl -X 400">POST https:400">class="text-zinc-500">//api.lvng.ai/api/v2/developer/webhooks \
-H 400">class="text-emerald-400">"Authorization: Bearer YOUR_API_KEY" \
-H 400">class="text-emerald-400">"Content-Type: application/json" \
-d '{
400">class="text-emerald-400">"url": 400">class="text-emerald-400">"https:400">class="text-zinc-500">//myapp.com/webhooks/lvng",
400">class="text-emerald-400">"events": [400">class="text-emerald-400">"agent.completed", 400">class="text-emerald-400">"workflow.completed"],
400">class="text-emerald-400">"description": 400">class="text-emerald-400">"Production webhook for agent completions"
}'Response 201
{
400">class="text-emerald-400">"success": true,
400">class="text-emerald-400">"data": {
400">class="text-emerald-400">"id": 400">class="text-emerald-400">"wh_abc123",
400">class="text-emerald-400">"workspace_id": 400">class="text-emerald-400">"ws_abc123",
400">class="text-emerald-400">"url": 400">class="text-emerald-400">"https:400">class="text-zinc-500">//myapp.com/webhooks/lvng",
400">class="text-emerald-400">"events": [400">class="text-emerald-400">"agent.completed", 400">class="text-emerald-400">"workflow.completed"],
400">class="text-emerald-400">"signing_secret": 400">class="text-emerald-400">"whsec_a1b2c3d4e5f6...",
400">class="text-emerald-400">"active": true,
400">class="text-emerald-400">"description": 400">class="text-emerald-400">"Production webhook for agent completions",
400">class="text-emerald-400">"created_at": 400">class="text-emerald-400">"2026-04-01T12:00:00.000Z"
}
}/api/v2/developer/webhooksAuthenticatedList all webhooks for the current workspace.
Request
400">curl -X 400">GET https:400">class="text-zinc-500">//api.lvng.ai/api/v2/developer/webhooks \
-H 400">class="text-emerald-400">"Authorization: Bearer YOUR_API_KEY"Response 200
{
400">class="text-emerald-400">"success": true,
400">class="text-emerald-400">"data": [
{
400">class="text-emerald-400">"id": 400">class="text-emerald-400">"wh_abc123",
400">class="text-emerald-400">"url": 400">class="text-emerald-400">"https:400">class="text-zinc-500">//myapp.com/webhooks/lvng",
400">class="text-emerald-400">"events": [400">class="text-emerald-400">"agent.completed", 400">class="text-emerald-400">"workflow.completed"],
400">class="text-emerald-400">"active": true,
400">class="text-emerald-400">"description": 400">class="text-emerald-400">"Production webhook for agent completions",
400">class="text-emerald-400">"created_at": 400">class="text-emerald-400">"2026-04-01T12:00:00.000Z",
400">class="text-emerald-400">"updated_at": 400">class="text-emerald-400">"2026-04-01T12:00:00.000Z"
}
]
}/api/v2/developer/webhooks/:idAuthenticatedUpdate a webhook's URL, events, active status, or description.
Path Parameters
idstringrequiredUUID of the webhook.
Body Parameters
urlstringUpdated webhook URL.
eventsstring[]Updated event subscriptions.
activebooleanEnable or disable the webhook.
descriptionstringUpdated description.
Request
400">curl -X 400">PUT https:400">class="text-zinc-500">//api.lvng.ai/api/v2/developer/webhooks/wh_abc123 \
-H 400">class="text-emerald-400">"Authorization: Bearer YOUR_API_KEY" \
-H 400">class="text-emerald-400">"Content-Type: application/json" \
-d '{
400">class="text-emerald-400">"events": [400">class="text-emerald-400">"agent.completed", 400">class="text-emerald-400">"workflow.completed", 400">class="text-emerald-400">"credit.low"],
400">class="text-emerald-400">"active": true
}'Response 200
{
400">class="text-emerald-400">"success": true,
400">class="text-emerald-400">"data": {
400">class="text-emerald-400">"id": 400">class="text-emerald-400">"wh_abc123",
400">class="text-emerald-400">"url": 400">class="text-emerald-400">"https:400">class="text-zinc-500">//myapp.com/webhooks/lvng",
400">class="text-emerald-400">"events": [400">class="text-emerald-400">"agent.completed", 400">class="text-emerald-400">"workflow.completed", 400">class="text-emerald-400">"credit.low"],
400">class="text-emerald-400">"active": true,
400">class="text-emerald-400">"updated_at": 400">class="text-emerald-400">"2026-04-01T14:00:00.000Z"
}
}/api/v2/developer/webhooks/:idAuthenticatedDelete a webhook endpoint.
Path Parameters
idstringrequiredUUID of the webhook.
Request
400">curl -X 400">DELETE https:400">class="text-zinc-500">//api.lvng.ai/api/v2/developer/webhooks/wh_abc123 \
-H 400">class="text-emerald-400">"Authorization: Bearer YOUR_API_KEY"Response 200
{
400">class="text-emerald-400">"success": true,
400">class="text-emerald-400">"message": 400">class="text-emerald-400">"Webhook deleted"
}/api/v2/developer/webhooks/:id/deliveriesAuthenticatedGet the last 50 delivery attempts for a webhook, including status codes and response data.
Path Parameters
idstringrequiredUUID of the webhook.
Request
400">curl -X 400">GET https:400">class="text-zinc-500">//api.lvng.ai/api/v2/developer/webhooks/wh_abc123/deliveries \
-H 400">class="text-emerald-400">"Authorization: Bearer YOUR_API_KEY"Response 200
{
400">class="text-emerald-400">"success": true,
400">class="text-emerald-400">"data": [
{
400">class="text-emerald-400">"id": 400">class="text-emerald-400">"del_xyz789",
400">class="text-emerald-400">"webhook_id": 400">class="text-emerald-400">"wh_abc123",
400">class="text-emerald-400">"event_type": 400">class="text-emerald-400">"agent.completed",
400">class="text-emerald-400">"status_code": 200,
400">class="text-emerald-400">"success": true,
400">class="text-emerald-400">"latency_ms": 145,
400">class="text-emerald-400">"request_body": { 400">class="text-emerald-400">"event": 400">class="text-emerald-400">"agent.completed", 400">class="text-emerald-400">"data": {} },
400">class="text-emerald-400">"response_body": 400">class="text-emerald-400">"OK",
400">class="text-emerald-400">"created_at": 400">class="text-emerald-400">"2026-04-01T13:00:00.000Z"
}
]
}/api/v2/developer/webhooks/:id/testAuthenticatedSend a test.ping event to the webhook endpoint to verify connectivity.
Path Parameters
idstringrequiredUUID of the webhook.
Request
400">curl -X 400">POST https:400">class="text-zinc-500">//api.lvng.ai/api/v2/developer/webhooks/wh_abc123/test \
-H 400">class="text-emerald-400">"Authorization: Bearer YOUR_API_KEY"Response 200
{
400">class="text-emerald-400">"success": true,
400">class="text-emerald-400">"data": {
400">class="text-emerald-400">"delivered": true,
400">class="text-emerald-400">"status_code": 200,
400">class="text-emerald-400">"latency_ms": 132,
400">class="text-emerald-400">"delivery": {
400">class="text-emerald-400">"id": 400">class="text-emerald-400">"del_test123",
400">class="text-emerald-400">"event_type": 400">class="text-emerald-400">"test.ping"
}
}
}Event Logs
Query paginated, filterable developer event logs. Supports cursor-based pagination.
/api/v2/developer/logsAuthenticatedGet paginated developer event logs with optional filtering by category, API key, and date range.
Query Parameters
categoriesstringComma-separated event categories to filter by.
api_key_idstringFilter by specific API key UUID.
startstringStart date (ISO 8601) for date range filter.
endstringEnd date (ISO 8601) for date range filter.
cursorstringPagination cursor from a previous response.
limitintegerResults per page (max 100). Defaults to 50.
Request
400">curl -X 400">GET 400">class="text-emerald-400">"https:400">class="text-zinc-500">//api.lvng.ai/api/v2/developer/logs?categories=api,webhook&limit=25" \
-H 400">class="text-emerald-400">"Authorization: Bearer YOUR_API_KEY"Response 200
{
400">class="text-emerald-400">"success": true,
400">class="text-emerald-400">"data": [
{
400">class="text-emerald-400">"id": 400">class="text-emerald-400">"evt_abc123",
400">class="text-emerald-400">"category": 400">class="text-emerald-400">"api",
400">class="text-emerald-400">"action": 400">class="text-emerald-400">"agent.create",
400">class="text-emerald-400">"api_key_id": 400">class="text-emerald-400">"key_abc123",
400">class="text-emerald-400">"status_code": 201,
400">class="text-emerald-400">"duration_ms": 45,
400">class="text-emerald-400">"created_at": 400">class="text-emerald-400">"2026-04-01T12:00:00.000Z"
}
],
400">class="text-emerald-400">"nextCursor": 400">class="text-emerald-400">"eyJjcmVhdGVkX2F0IjoiMjAyNi0wNC0wMVQxMTowMDowMC4wMDBaIn0="
}