Skip to content

Scan backend and Lovable repos

POST
/scan
curl --request POST \
--url https://example.com/api/scan \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "repoFullName": "example", "backendRepoId": 1, "branch": "example", "appSubDir": "example", "projectId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "lovableRepo": "example", "lovableRepoId": 1, "lovableBranch": "example" }'

Two-repo scanning: backend (OpenAPI-first) plus optional Lovable output (design tokens, mismatches). Stores context on the project if projectId is provided.

Media type application/json
object
repoFullName

Backend repo (owner/repo)

string
backendRepoId

GitHub repo ID (alternative to repoFullName)

integer
branch
string
appSubDir
string
projectId
string format: uuid
lovableRepo

Lovable output repo (owner/repo)

string
lovableRepoId
integer
lovableBranch
string

Scan results

Media type application/json
object
context
required

BackendContext from scanning

object
lovableContext

FrontendScanContext including mismatches (if lovableRepo provided)

object | null
stored
required
boolean

Invalid request

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number

Not authenticated

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number
reconnect

True if re-linking GitHub may fix the issue

boolean

Forbidden

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number

Not found

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number