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.
Authorization
http 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"
]
}
}Get GitHub connection
Returns the GitHub connection details for a specific external user.
Push project to GitHub
Pushes the current project code to GitHub. If repo details are provided, LaraCopilot checks whether the repository exists and creates it if missing before pushing. If repo details are omitted, the repository already linked to the project is used.