Levain LabsLevain Labs
ApiApps

Connect Segment

Connect a Segment source and mint its ingest URL + signing secret.

Connect a Segment source and mint its ingest URL + signing secret.

Add a Webhook destination in Segment pointed at the returned URL and configure it with the returned secret. The secret is shown only once. Returns 409 when a Segment source is already connected — rotate its secret instead of reconnecting.

POST
/api/v1/apps/segment/connect

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Header Parameters

X-API-Key?string|null

Response Body

application/json

application/json

curl -X POST "https://api.levainlabs.com/api/v1/apps/segment/connect"
{
  "integration_id": "string",
  "ingest_url": "string",
  "signing_secret": "string"
}