Platform Connections API
Unified platform connection manager for integrating external services like Discord, Slack, and Teams. Connect platforms, configure message ingestion and auto-reply settings, and trigger history imports. All endpoints require JWT authentication.
Base path: /api/v2/platform-connections
/api/v2/platform-connectionsAuthenticatedList all connected platforms and available (unconnected) platforms. Connected platforms include synced channels, configuration, and last sync time.
Request
400">curl -X 400">GET https:400">class="text-zinc-500">//api.lvng.ai/api/v2/platform-connections \
-H 400">class="text-emerald-400">"Authorization: Bearer YOUR_API_KEY"Response 200
{
400">class="text-emerald-400">"connected": [
{
400">class="text-emerald-400">"id": 400">class="text-emerald-400">"int_abc123",
400">class="text-emerald-400">"platform": 400">class="text-emerald-400">"discord",
400">class="text-emerald-400">"displayName": 400">class="text-emerald-400">"Discord",
400">class="text-emerald-400">"status": 400">class="text-emerald-400">"connected",
400">class="text-emerald-400">"config": {
400">class="text-emerald-400">"ingestMessages": true,
400">class="text-emerald-400">"selectedChannels": [400">class="text-emerald-400">"general", 400">class="text-emerald-400">"dev"],
400">class="text-emerald-400">"autoReply": false
},
400">class="text-emerald-400">"channels": [
{ 400">class="text-emerald-400">"id": 400">class="text-emerald-400">"ch_001", 400">class="text-emerald-400">"name": 400">class="text-emerald-400">"general", 400">class="text-emerald-400">"400">type": 400">class="text-emerald-400">"text" },
{ 400">class="text-emerald-400">"id": 400">class="text-emerald-400">"ch_002", 400">class="text-emerald-400">"name": 400">class="text-emerald-400">"dev", 400">class="text-emerald-400">"400">type": 400">class="text-emerald-400">"text" }
],
400">class="text-emerald-400">"connectedAt": 400">class="text-emerald-400">"2026-03-01T10:00:00.000Z",
400">class="text-emerald-400">"lastSyncAt": 400">class="text-emerald-400">"2026-04-01T12:00:00.000Z"
}
],
400">class="text-emerald-400">"available": [
{
400">class="text-emerald-400">"platform": 400">class="text-emerald-400">"slack",
400">class="text-emerald-400">"displayName": 400">class="text-emerald-400">"Slack",
400">class="text-emerald-400">"status": 400">class="text-emerald-400">"available",
400">class="text-emerald-400">"features": [400">class="text-emerald-400">"messages", 400">class="text-emerald-400">"channels", 400">class="text-emerald-400">"threads"]
}
]
}/api/v2/platform-connections/:platform/connectAuthenticatedConnect a new platform. Tests the connection if the platform adapter supports it.
Path Parameters
platformstringrequiredPlatform identifier (e.g. "discord", "slack", "teams").
Body Parameters
configobjectPlatform-specific configuration.
config.ingestMessagesbooleanWhether to ingest messages from this platform. Defaults to false.
config.selectedChannelsstring[]Channels to sync. Defaults to empty.
config.autoReplybooleanWhether AI should auto-reply on this platform. Defaults to false.
Request
400">curl -X 400">POST https:400">class="text-zinc-500">//api.lvng.ai/api/v2/platform-connections/discord/connect \
-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">"config": {
400">class="text-emerald-400">"ingestMessages": true,
400">class="text-emerald-400">"selectedChannels": [400">class="text-emerald-400">"general"],
400">class="text-emerald-400">"autoReply": false
}
}'Response 201
{
400">class="text-emerald-400">"id": 400">class="text-emerald-400">"int_abc123",
400">class="text-emerald-400">"platform": 400">class="text-emerald-400">"discord",
400">class="text-emerald-400">"displayName": 400">class="text-emerald-400">"Discord",
400">class="text-emerald-400">"status": 400">class="text-emerald-400">"connected",
400">class="text-emerald-400">"connectionTest": {
400">class="text-emerald-400">"success": true
}
}/api/v2/platform-connections/:platform/disconnectAuthenticatedDisconnect a platform and remove the integration record.
Path Parameters
platformstringrequiredPlatform identifier.
Request
400">curl -X 400">DELETE https:400">class="text-zinc-500">//api.lvng.ai/api/v2/platform-connections/discord/disconnect \
-H 400">class="text-emerald-400">"Authorization: Bearer YOUR_API_KEY"Response 200
{
400">class="text-emerald-400">"platform": 400">class="text-emerald-400">"discord",
400">class="text-emerald-400">"status": 400">class="text-emerald-400">"disconnected",
400">class="text-emerald-400">"disconnectedAt": 400">class="text-emerald-400">"2026-04-01T14:00:00.000Z"
}/api/v2/platform-connections/:platform/configAuthenticatedUpdate platform configuration. Only allowed fields (ingestMessages, selectedChannels, autoReply) are accepted.
Path Parameters
platformstringrequiredPlatform identifier.
Body Parameters
ingestMessagesbooleanToggle message ingestion.
selectedChannelsstring[]Update synced channels.
autoReplybooleanToggle auto-reply.
Request
400">curl -X 400">PATCH https:400">class="text-zinc-500">//api.lvng.ai/api/v2/platform-connections/discord/config \
-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">"ingestMessages": true,
400">class="text-emerald-400">"autoReply": true
}'Response 200
{
400">class="text-emerald-400">"platform": 400">class="text-emerald-400">"discord",
400">class="text-emerald-400">"config": {
400">class="text-emerald-400">"ingestMessages": true,
400">class="text-emerald-400">"selectedChannels": [400">class="text-emerald-400">"general"],
400">class="text-emerald-400">"autoReply": true
},
400">class="text-emerald-400">"updatedAt": 400">class="text-emerald-400">"2026-04-01T14:30:00.000Z"
}/api/v2/platform-connections/:platform/import-historyAuthenticatedTrigger a history import job for a connected platform. Returns a job ID that can be polled for progress.
Path Parameters
platformstringrequiredPlatform identifier.
Body Parameters
channelIdsstring[]Specific channels to import. Imports all if omitted.
sincestringStart date for import range (ISO 8601).
untilstringEnd date for import range (ISO 8601).
Request
400">curl -X 400">POST https:400">class="text-zinc-500">//api.lvng.ai/api/v2/platform-connections/discord/400">import-history \
-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">"channelIds": [400">class="text-emerald-400">"ch_001"],
400">class="text-emerald-400">"since": 400">class="text-emerald-400">"2026-01-01T00:00:00Z"
}'Response 202
{
400">class="text-emerald-400">"platform": 400">class="text-emerald-400">"discord",
400">class="text-emerald-400">"jobId": 400">class="text-emerald-400">"job_abc123",
400">class="text-emerald-400">"status": 400">class="text-emerald-400">"started",
400">class="text-emerald-400">"message": 400">class="text-emerald-400">"History 400">import started"
}/api/v2/platform-connections/:platform/import-statusAuthenticatedCheck the progress of a history import job.
Path Parameters
platformstringrequiredPlatform identifier.
Query Parameters
jobIdstringrequiredJob ID returned from the import-history endpoint.
Request
400">curl -X 400">GET 400">class="text-emerald-400">"https:400">class="text-zinc-500">//api.lvng.ai/api/v2/platform-connections/discord/400">import-status?jobId=job_abc123" \
-H 400">class="text-emerald-400">"Authorization: Bearer YOUR_API_KEY"Response 200
{
400">class="text-emerald-400">"platform": 400">class="text-emerald-400">"discord",
400">class="text-emerald-400">"jobId": 400">class="text-emerald-400">"job_abc123",
400">class="text-emerald-400">"status": 400">class="text-emerald-400">"in_progress",
400">class="text-emerald-400">"progress": 65,
400">class="text-emerald-400">"messagesImported": 1250,
400">class="text-emerald-400">"totalEstimated": 1920
}