Skip to main content
POST
/
api
/
projects
/
{projectId}
/
branches
/
{branchId}
/
commit
Branch commit
curl --request POST \
  --url https://api.example.com/api/projects/{projectId}/branches/{branchId}/commit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "message": "<string>",
  "baseCommitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "changes": [],
  "resolutions": [
    {
      "path": "<string>",
      "resolution": "useLeft",
      "content": "<unknown>",
      "hash": "<string>"
    }
  ]
}
'
{
  "success": true,
  "commitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "stats": {
    "totalFiles": 123,
    "reusedContent": 123,
    "newContent": 123
  }
}

Authorizations

Authorization
string
header
required

Personal access token is obtained through your profile

Path Parameters

projectId
string<uuid>
required

Project ID

branchId
required

Branch ID or "main" for the default branch

Body

application/json
message
string
required
Minimum string length: 1
baseCommitId
string<uuid>
changes
object[]
resolutions
object[]

Response

200 - application/json

Commit result

Commit result

success
boolean
required

Whether the commit was successful

commitId
string<uuid>
required

ID of the newly created commit

stats
object
required

Commit statistics