Connections

Account connections with other LC accounts

List connections

Returns the calling account's reconciled list of connections, merging LC-resident account_connections rows with the SSO NetworkConnection source-of-truth list. Each entry is tagged with a status enum (completed or sso_only).

When SSO is unreachable, the endpoint fails open: it returns 200 OK with LC-resident entries only and the X-Connections-Degraded: true response header.

SecurityAPIKey
Request
query Parameters
relationship_type
string

Optional filter limiting the response to entries with the given relationship type.

Enum: "seller" "buyer"
Responses
200

Reconciled list of connections.

400

Bad request — invalid relationship_type.

401

Authorization information is missing or invalid.

get/connections
Request samples
Response samples
application/json
[
  • {
    • "id": "5d9a4c421d011c553e000001",
    • "status": "completed",
    • "relationship_type": "seller",
    • "invitation_id": "string",
    • "created_at": "2019-08-24T14:15:22Z",
    • "updated_at": "2019-08-24T14:15:22Z",
    • "created_by": "example@mail.com",
    • "ui_state": {
      • "has_setup_buyer_delivery": true
      },
    • "permissions": [
      • "request_domain_ownership_confirmation",
      • "view_submission_docs"
      ],
    • "connected_account": {
      • "id": "5fd4371e940df5a34a3888b2",
      • "sso_id": "5fd4371e940df5a34a3888b2",
      • "name": "Acme Corp"
      },
    • "account_entity": {
      • "id": "5fd4371e940df5a34a3888b2",
      • "name": "A Corporation",
      • "description": "string",
      • "standard": false,
      • "account": true,
      • "pending": true,
      • "connected": "seller",
      • "connected_account_id": "5fd4371e940df5a34a3888b2",
      • "deprecated": false,
      • "see": "5fd4371e940df5a34a3888b2",
      • "field_suffix": "acorp",
      • "invitation_id": "5fd4371e940df5a34a3888b2",
      • "invitation_expires_at": "2025-11-07T00:00:00Z",
      • "expired": false,
      • "flow_ids": [
        • "5fd4371e940df5a34a3888b2"
        ],
      • "logo_url": "string",
      • "module_ids": [
        • "leadconduit-salesforce.outbound.create_contact"
        ],
      • "source": { },
      • "recipient": { },
      • "time_zone": "America/Los Angeles",
      • "trustedform_certified_vendor": true,
      • "website": "http://example.com",
      • "created_at": "2019-08-24T14:15:22Z",
      • "updated_at": "2019-08-24T14:15:22Z"
      },
    • "custom_entities": [
      • {
        • "id": "5d9a4c421d011c553e000003",
        • "name": "Acme Source",
        • "source": "seller",
        • "recipient": null
        }
      ]
    }
]

Repair: materialize a missing LC connection

Superuser-only repair endpoint. Given a connection_id, fetches the corresponding NetworkConnection from SSO and inserts the matching account_connections row. Used when a Kafka invitation message was missed and the LC row was never created.

Does NOT modify account_entities, does NOT redeploy any flow.

SecurityAPIKey
Request
Request Body schema: application/json
required
connection_id
required
string

24-char hex ID of the SSO connection to materialize in LC.

Responses
201

Created — account_connections row inserted.

400

Bad request — invalid connection_id.

401

Superuser authentication is required.

409

Conflict — an account_connections row already exists for this connection_id.

422

Unprocessable — the SSO connection cannot be found (or is visible only in another account).

post/connections
Request samples
application/json
{
  • "connection_id": "5d9a4c421d011c553e000001"
}
Response samples
application/json
{
  • "id": "5d9a4c421d011c553e000001"
}

Get connection by ID

Retrieves a connection by its unique identifier, SSO Connection Id, or Invitation Id. This endpoint allows clients to fetch detailed information about a specific connection.

SecurityAPIKey
Request
path Parameters
id
required
string (ID) ^[0-9a-fA-F]{24}$

ID of the connection to get. This can be a unique identifier, SSO Connection Id, or Invitation Id.

Example: 5fd4371e940df5a34a3888b2
Responses
200

Created

401

Authorization information is missing or invalid.

get/connections/{id}
Request samples
Response samples
application/json
{
  • "id": "string",
  • "connected_account": {
    • "id": "5fd4371e940df5a34a3888b2",
    • "sso_id": "5fd4371e940df5a34a3888b2",
    • "name": "Acme Corp"
    },
  • "external_id": "5fd4371e940df5a34a3888b2",
  • "invitation_id": "string",
  • "relationship_type": "seller",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "created_by": "example@mail.com",
  • "ui_state": {
    • "has_setup_buyer_delivery": true
    }
}