Skip to navigation

Merge Branch

Enqueue an async task to merge a branch into main.

When unresolved conflicts exist and no resolutions are supplied, the API returns 409 with code branch_merge_conflict and the conflict list in details. When resolutions are supplied but incomplete, the API returns 400 invalid_resolution listing the uncovered conflicts. Retry with a full resolutions array to resolve and merge in one step.

On success the branch is consumed and removed from GET .../branches.

Enterprise Only
This endpoint requires an Enterprise workspace with the page branching entitlement.

Required scope | branches:merge

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

site_idstringRequiredformat: "objectid"
Unique identifier for a Site
branch_idstringRequiredformat: "objectid"
Unique identifier for a Branch

Request

This endpoint expects an object.
resolutionslist of objectsOptional

Optional on the first attempt. When conflicts exist and this array is omitted or empty, the API returns 409 branch_merge_conflict with the conflict list in details. When resolutions are supplied but do not cover every conflict (type, id), the API returns 400 invalid_resolution listing the uncovered conflicts in details. Retry with a full resolutions array to resolve and merge in one step.

Response

Branch merge task accepted
taskIdstringformat: "uuid"
statusstring

Task state at enqueue time (typically queued).

nextActionslist of objects

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error