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

GET/api/v2/platform-connectionsAuthenticated

List all connected platforms and available (unconnected) platforms. Connected platforms include synced channels, configuration, and last sync time.

Request

cURL
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"]
    }
  ]
}
POST/api/v2/platform-connections/:platform/connectAuthenticated

Connect a new platform. Tests the connection if the platform adapter supports it.

Path Parameters

platformstringrequired

Platform identifier (e.g. "discord", "slack", "teams").

Body Parameters

configobject

Platform-specific configuration.

config.ingestMessagesboolean

Whether to ingest messages from this platform. Defaults to false.

config.selectedChannelsstring[]

Channels to sync. Defaults to empty.

config.autoReplyboolean

Whether AI should auto-reply on this platform. Defaults to false.

Request

cURL
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
  }
}
DELETE/api/v2/platform-connections/:platform/disconnectAuthenticated

Disconnect a platform and remove the integration record.

Path Parameters

platformstringrequired

Platform identifier.

Request

cURL
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"
}
PATCH/api/v2/platform-connections/:platform/configAuthenticated

Update platform configuration. Only allowed fields (ingestMessages, selectedChannels, autoReply) are accepted.

Path Parameters

platformstringrequired

Platform identifier.

Body Parameters

ingestMessagesboolean

Toggle message ingestion.

selectedChannelsstring[]

Update synced channels.

autoReplyboolean

Toggle auto-reply.

Request

cURL
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"
}
POST/api/v2/platform-connections/:platform/import-historyAuthenticated

Trigger a history import job for a connected platform. Returns a job ID that can be polled for progress.

Path Parameters

platformstringrequired

Platform identifier.

Body Parameters

channelIdsstring[]

Specific channels to import. Imports all if omitted.

sincestring

Start date for import range (ISO 8601).

untilstring

End date for import range (ISO 8601).

Request

cURL
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"
}
GET/api/v2/platform-connections/:platform/import-statusAuthenticated

Check the progress of a history import job.

Path Parameters

platformstringrequired

Platform identifier.

Query Parameters

jobIdstringrequired

Job ID returned from the import-history endpoint.

Request

cURL
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
}