Create or link a project
const url = 'https://example.com/api/projects';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"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"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”object
object
GitHub repo in owner/repo format.
Example
TeamK2K/app-apphandoffOptional branch override. Empty means default branch.
Optional relative scan root inside the repo, such as apps/backend or apps/frontend.
Frontend/Lovable repo (owner/repo); alias of sourceRepo
Example
acme/my-lovable-appLegacy alias of frontendRepo (owner/repo)
Example
acme/my-lovable-appTarget Next.js repo (owner/repo); legacy convert output
Example
acme/my-nextjs-appBackend repo (owner/repo)
Example
acme/my-backendResponses
Section titled “ Responses ”Created or updated project
object
object
Legacy alias of frontendRepo
object
GitHub repo in owner/repo format.
Example
TeamK2K/app-apphandoffOptional branch override. Empty means default branch.
Optional relative scan root inside the repo, such as apps/backend or apps/frontend.
Invalid request
object
Human-readable error message
Stable machine-readable error code for client branching
First validation message per field path
object
Structured validation issues (Zod)
object
Seconds until rate limit resets (429 responses)
Not authenticated
object
Human-readable error message
Stable machine-readable error code for client branching
First validation message per field path
object
Structured validation issues (Zod)
object
Seconds until rate limit resets (429 responses)
True if re-linking GitHub may fix the issue
Forbidden
object
Human-readable error message
Stable machine-readable error code for client branching
First validation message per field path
object
Structured validation issues (Zod)
object
Seconds until rate limit resets (429 responses)