ModernLoop Internal API
Apigithub

Create a branch from a base ref

Write operation: mutates state in the upstream service.

curl -X POST "https://api.modernloop.dev/rest/v1/github/repos/string/string/branches" \  -H "Authorization: Bearer $MLOOP_INTERNAL_MCP_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "branch": "string"  }'
{  "ref": "string",  "sha": "string",  "url": "string"}
{  "error": {    "code": "string",    "message": "string",    "upstreamStatus": 0  }}
{  "error": {    "code": "string",    "message": "string",    "upstreamStatus": 0  }}
{  "error": {    "code": "string",    "message": "string",    "upstreamStatus": 0  }}
{  "error": {    "code": "string",    "message": "string",    "upstreamStatus": 0  }}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

owner*string

Repository owner (user or organization)

repo*string

Repository name

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

branch*string

Name for the new branch

Length1 <= length
fromBranch?string

Source branch to fork from (defaults to the repository default branch)

Response Body

application/json

application/json

application/json

application/json

application/json