Update a branch mapping (JSON Merge Patch).
PATCH/api/v1/github-repositories/{github_repository_id}/branch-mappings/{github_branch_mapping_id}connectors:write
Renames the branch, changes its number prefix or turns it on and off. A branch name another mapping of the repository uses is refused.
| Scope | connectors:write (sensitive) |
| Asynchronous | No |
| MCP tool | update_github_repository_branch_mapping |
| Portal permissions | manage_github_branch_mappings |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
github_repository_id | path | string | Required | |
github_branch_mapping_id | path | string | Required | |
Docwize-Version | header | string (date) | Optional | |
If-Match | header | string | Optional |
Request body
| Content type | Type |
|---|---|
application/json | GitHubBranchMappingPatchInput |
application/merge-patch+json | GitHubBranchMappingPatchInput |
Responses
| Status | Description | Body |
|---|---|---|
200 | Success. | application/json GitHubBranchMapping or object |
400 | invalid_version, malformed_json | application/problem+json Problem |
401 | token_expired, unauthenticated | application/problem+json Problem |
403 | forbidden, insufficient_scope, token_owner_inactive | application/problem+json Problem |
404 | not_found | application/problem+json Problem |
405 | method_not_allowed | application/problem+json Problem |
406 | not_acceptable | application/problem+json Problem |
409 | conflict | application/problem+json Problem |
412 | precondition_failed | application/problem+json Problem |
413 | payload_too_large | application/problem+json Problem |
415 | unsupported_media_type | application/problem+json Problem |
421 | wrong_region | application/problem+json Problem |
422 | validation_failed | application/problem+json Problem |
500 | internal_error | application/problem+json Problem |
503 | tenant_unavailable, unavailable | application/problem+json Problem |
504 | timeout | application/problem+json Problem |
Errors
The problem codes this operation can answer with. Each code links to its page.
Schemas
GitHubBranchMapping
| Field | Type | Required | Description |
|---|---|---|---|
branch_name | string | Required | |
github_branch_mapping_id | string | Required | |
github_repository_id | string | Required | |
is_enabled | boolean | Required | |
last_synced_at | string (date-time) or null | Required | |
last_synced_sha | string or null | Required | |
number_prefix | string or null | Required | Empty falls back to the repository's prefix. |
GitHubBranchMappingPatchInput
| Field | Type | Required | Description |
|---|---|---|---|
branch_name | string or null | Optional | |
github_branch_mapping_id | string or null | Optional | |
github_repository_id | string or null | Optional | |
is_enabled | boolean or null | Optional | |
last_synced_at | string (date-time) or null | Optional | |
last_synced_sha | string or null | Optional | |
number_prefix | string or null | Optional |