Skip to content

Create or link a project

POST
/projects
curl --request POST \
--url https://example.com/api/projects \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "repos": [ { "repoSlug": "TeamK2K/app-apphandoff", "role": "backend", "branch": "example", "appSubDir": "example" } ], "frontendRepo": "acme/my-lovable-app", "sourceRepo": "acme/my-lovable-app", "targetRepo": "acme/my-nextjs-app", "backendRepo": "acme/my-backend" }'

Creates a new project or updates an existing one with explicit repo rows or legacy frontend/backend repo fields.

Media type application/json
object
name
string
repos
Array<object>
>= 1 items <= 4 items
object
repoSlug
required

GitHub repo in owner/repo format.

string
Example
TeamK2K/app-apphandoff
role
required
string
Allowed values: backend frontend shared monorepo
branch

Optional branch override. Empty means default branch.

string
appSubDir

Optional relative scan root inside the repo, such as apps/backend or apps/frontend.

string | null
frontendRepo

Frontend/Lovable repo (owner/repo); alias of sourceRepo

string
Example
acme/my-lovable-app
sourceRepo

Legacy alias of frontendRepo (owner/repo)

string
Example
acme/my-lovable-app
targetRepo

Target Next.js repo (owner/repo); legacy convert output

string
Example
acme/my-nextjs-app
backendRepo

Backend repo (owner/repo)

string
Example
acme/my-backend

Created or updated project

Media type application/json
object
project
required
object
id
required
string format: uuid
name
required
string
frontendRepo
required
string
sourceRepo
required

Legacy alias of frontendRepo

string
targetRepo
string | null
backendRepo
string | null
repos
required
Array
object
repoSlug
required

GitHub repo in owner/repo format.

string
Example
TeamK2K/app-apphandoff
role
required
string
Allowed values: backend frontend shared monorepo
branch

Optional branch override. Empty means default branch.

string
appSubDir

Optional relative scan root inside the repo, such as apps/backend or apps/frontend.

string | null
id
string format: uuid
repoId
integer | null
ordinal
integer
commitSha
string | null
createdAt
required
string format: date-time

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