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
curl -X GET "https://api.lvng.ai/api/v2/platform-connections" \
-H "Authorization: Bearer YOUR_API_KEY"Response 200
{
"connected": [
{
"id": "int_abc123",
"platform": "discord",
"displayName": "Discord",
"status": "connected",
"config": {
"ingestMessages": true,
"selectedChannels": ["general", "dev"],
"autoReply": false
},
"channels": [
{ "id": "ch_001", "name": "general", "type": "text" },
{ "id": "ch_002", "name": "dev", "type": "text" }
],
"connectedAt": "2026-03-01T10:00:00.000Z",
"lastSyncAt": "2026-04-01T12:00:00.000Z"
}
],
"available": [
{
"platform": "slack",
"displayName": "Slack",
"status": "available",
"features": ["messages", "channels", "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
curl -X POST "https://api.lvng.ai/api/v2/platform-connections/{platform}/connect" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Response 201
{
"id": "int_abc123",
"platform": "discord",
"displayName": "Discord",
"status": "connected",
"connectionTest": {
"success": true
}
}/api/v2/platform-connections/:platform/disconnectAuthenticatedDisconnect a platform and remove the integration record.
Path Parameters
platformstringrequiredPlatform identifier.
Request
curl -X DELETE "https://api.lvng.ai/api/v2/platform-connections/{platform}/disconnect" \
-H "Authorization: Bearer YOUR_API_KEY"Response 200
{
"platform": "discord",
"status": "disconnected",
"disconnectedAt": "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
curl -X PATCH "https://api.lvng.ai/api/v2/platform-connections/{platform}/config" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Response 200
{
"platform": "discord",
"config": {
"ingestMessages": true,
"selectedChannels": ["general"],
"autoReply": true
},
"updatedAt": "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
curl -X POST "https://api.lvng.ai/api/v2/platform-connections/{platform}/import-history" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Response 202
{
"platform": "discord",
"jobId": "job_abc123",
"status": "started",
"message": "History 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
curl -X GET "https://api.lvng.ai/api/v2/platform-connections/{platform}/import-status" \
-H "Authorization: Bearer YOUR_API_KEY"Response 200
{
"platform": "discord",
"jobId": "job_abc123",
"status": "in_progress",
"progress": 65,
"messagesImported": 1250,
"totalEstimated": 1920
}