curl --request POST \
--url https://api.example.com/api/projects/{projectId}/branches/{branchId}/merge \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "<string>",
"resolutions": []
}
'{
"success": true,
"requiresApproval": true,
"message": "<string>",
"changeRequestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mergeCommitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"changes": [
{
"type": "added",
"file": "<unknown>",
"from": "<unknown>",
"to": "<unknown>"
}
],
"stats": {
"filesAdded": 123,
"filesDeleted": 123,
"filesModified": 123,
"totalChanges": 123,
"filesRenamed": 123
}
}Merges a branch into main, or creates a change request if approval is required.
curl --request POST \
--url https://api.example.com/api/projects/{projectId}/branches/{branchId}/merge \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "<string>",
"resolutions": []
}
'{
"success": true,
"requiresApproval": true,
"message": "<string>",
"changeRequestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mergeCommitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"changes": [
{
"type": "added",
"file": "<unknown>",
"from": "<unknown>",
"to": "<unknown>"
}
],
"stats": {
"filesAdded": 123,
"filesDeleted": 123,
"filesModified": 123,
"totalChanges": 123,
"filesRenamed": 123
}
}Personal access token is obtained through your profile
Project ID
Branch ID or "main" for the default branch
Merge result
Merge result
Whether the operation was successful
Whether approval is required for the merge
Human-readable result message
ID of created change request
ID of the merge commit
List of merged changes
Show child attributes
Change statistics
Show child attributes
Was this page helpful?