> ## Documentation Index
> Fetch the complete documentation index at: https://docs.structural.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect a platform

> Seeds all entity types for the specified platform. When connecting the second platform,
entities are automatically reconciled against the first platform's data.


Seeds all entity types (projects, customers, contracts, invoices, payments) for the
specified platform. When connecting the second platform, Structural automatically reconciles
entities against the first platform's data using business keys - check numbers, invoice
numbers, contract numbers.

The response includes a count of seeded entities per type so you can verify the connection
succeeded.

<Warning>
  **Destructive re-seed.** Calling `/connect` on a platform that is already connected deletes all
  existing data for that platform - entity mappings, canonical objects, and platform objects -
  before re-seeding from scratch. Any changes made via `/propagate` since the last connect are lost.
  This is a reset, not an idempotent update.
</Warning>

After connecting, use [`GET /connections`](/api-reference/connections) to verify the
platform is active, then [`GET /objects`](/api-reference/objects) to read the reconciled
data.


## OpenAPI

````yaml POST /connect
openapi: 3.1.0
info:
  title: Structural API
  version: '1.0'
  description: |
    Bidirectional data translation between construction management platforms.
    One integration gives you normalized access to every connected platform.
  contact:
    email: support@structural.app
    url: https://structural.app
servers:
  - url: https://api.structural.app/api/v1
    description: Production
security: []
paths:
  /connect:
    post:
      tags:
        - Connections
      summary: Connect a platform
      description: >
        Seeds all entity types for the specified platform. When connecting the
        second platform,

        entities are automatically reconciled against the first platform's data.
      operationId: connectPlatform
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectRequest'
      responses:
        '200':
          description: Platform connected successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ConnectResult'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
      security:
        - bearerAuth: []
components:
  schemas:
    ConnectRequest:
      type: object
      required:
        - platform
      properties:
        platform:
          type: string
          enum:
            - procore
            - dynamics
          description: The platform to connect
    ConnectResult:
      type: object
      properties:
        platform:
          type: string
          enum:
            - procore
            - dynamics
          example: procore
        status:
          type: string
          enum:
            - connected
          example: connected
        entities:
          type: object
          description: Count of seeded entities per type
          properties:
            projects:
              type: integer
              example: 5
            customers:
              type: integer
              example: 4
            contracts:
              type: integer
              example: 13
            invoices:
              type: integer
              example: 8
            payments:
              type: integer
              example: 8
          additionalProperties:
            type: integer
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          required:
            - type
            - message
            - request_id
          properties:
            type:
              type: string
              description: Machine-readable error code
              example: VALIDATION_ERROR
            message:
              type: string
              description: Human-readable error description
              example: platform and entity_type query params required
            request_id:
              type: string
              description: Unique request identifier — quote this in support requests
              example: req_a1b2c3d4e5f6
  responses:
    ValidationError:
      description: Request validation failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              type: VALIDATION_ERROR
              message: Invalid input
              request_id: req_a1b2c3d4e5f6
    AuthenticationError:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              type: AUTHENTICATION_ERROR
              message: Invalid or missing API key
              request_id: req_a1b2c3d4e5f6
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        API key passed as a Bearer token. Keys are prefixed: `sk_demo_*`
        (sandbox),

        `sk_live_*` (production), `sk_test_*` (staging).

````