LaraCopilot
LaraCopilot
API ReferenceEndpointsGitHub

Link GitHub repository

Links an existing GitHub repository to a generated project. Use this after the agency end user has connected GitHub and chosen a repo.

POST
/github/project/{projectId}/link
AuthorizationBearer <token>

In: header

Path Parameters

projectId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://builder.laracopilot.com/api/v1/github/project/string/link" \  -H "Content-Type: application/json" \  -d '{    "external_user_id": "string",    "repo_owner": "string",    "repo_name": "string"  }'
{
  "success": true,
  "message": "GitHub repository linked successfully.",
  "data": {
    "project_id": "string",
    "github_login": "string",
    "repo_url": "string",
    "branch": "string"
  },
  "errors": null
}
{
  "success": true,
  "message": "GitHub connection not found for the provided external user.",
  "data": null,
  "errors": null
}
{
  "message": "string",
  "errors": {
    "property1": [
      "string"
    ],
    "property2": [
      "string"
    ]
  }
}