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

# Discover workspace repositories

> Refreshes repositories for installations already linked to the authenticated, selected workspace. Uses each installation's saved Full or Lite tier and paginates all accessible repositories. Requires workspace membership. Does not grant GitHub access or create workspaces. Starts repository synchronization in the background; HTTP 200 does not confirm synchronization or setup completion. An empty discovered array means no linked active installation was processed. An installation with no accessible repositories returns an owner entry with an empty repos array.



## OpenAPI

````yaml /api-reference/openapi.json post /api/sync/discover
openapi: 3.1.0
info:
  title: LaneSync API
  description: >-
    REST API for LaneSync release governance — milestones, evidence, quality,
    and sync.
  version: 1.0.0
  contact:
    name: LaneSync
    url: https://lanesync.dev
servers:
  - url: https://lanesync.dev
    description: Hosted SaaS
security: []
tags:
  - name: Health
    description: Liveness and readiness
  - name: Auth
    description: GitHub OAuth and sessions
  - name: Dashboard
    description: Org-wide milestone views
  - name: Milestones
    description: Release pipeline and deploy gates
  - name: Repos
    description: Repository bootstrap and configuration
  - name: Sync
    description: GitHub sync triggers
  - name: Evidence
    description: CI evidence upload (no session)
  - name: Quality
    description: Quality scorecards and exports
  - name: Projects
    description: Multi-repo release projects
  - name: Team
    description: Workspace members and invites
  - name: Webhook
    description: GitHub App webhooks
  - name: Reviews
    description: Live evidence reviewer policy and eligibility
  - name: History
    description: Recorded shipped releases
  - name: MCP
    description: Remote MCP connection, OAuth, and personal keys
paths:
  /api/sync/discover:
    post:
      tags:
        - Sync
      summary: Discover workspace repositories
      description: >-
        Refreshes repositories for installations already linked to the
        authenticated, selected workspace. Uses each installation's saved Full
        or Lite tier and paginates all accessible repositories. Requires
        workspace membership. Does not grant GitHub access or create workspaces.
        Starts repository synchronization in the background; HTTP 200 does not
        confirm synchronization or setup completion. An empty discovered array
        means no linked active installation was processed. An installation with
        no accessible repositories returns an owner entry with an empty repos
        array.
      operationId: discoverRepositories
      responses:
        '200':
          description: >-
            Repository discovery completed; background sync may still be
            running.
          content:
            application/json:
              schema:
                type: object
                required:
                  - discovered
                properties:
                  discovered:
                    type: array
                    items:
                      type: object
                      required:
                        - owner
                        - repos
                      properties:
                        owner:
                          type: string
                        repos:
                          type: array
                          items:
                            type: string
              example:
                discovered:
                  - owner: example-org
                    repos:
                      - service-api
                      - web-app
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >-
            No selected workspace, invalid session, or user is not a workspace
            member.
        '500':
          description: >-
            Discovery failed, for example because installation credentials or
            GitHub access are unavailable.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      security:
        - sessionCookie: []
components:
  responses:
    Unauthorized:
      description: Missing or invalid session
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    sessionCookie:
      type: apiKey
      in: cookie
      name: connect.sid
      description: GitHub OAuth session cookie

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.