Need help? Get answers from the docs with Omni's in-app AI! Log in to your Omni instance and open the Omni Agent in the sidebar.
curl --request POST \
--url https://{instance}.omniapp.co/api/v1/models/{modelId}/branch/{branchName}/merge \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"delete_branch": true,
"publish_drafts": true,
"commit_message": "Merged revenue metrics branch via CI/CD pipeline",
"force_override_git_settings": false
}
'{
"success": true,
"published_drafts_count": 2,
"failed_drafts_count": 0,
"git_synced": true
}Merges a model branch into the shared model.
curl --request POST \
--url https://{instance}.omniapp.co/api/v1/models/{modelId}/branch/{branchName}/merge \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"delete_branch": true,
"publish_drafts": true,
"commit_message": "Merged revenue metrics branch via CI/CD pipeline",
"force_override_git_settings": false
}
'{
"success": true,
"published_drafts_count": 2,
"failed_drafts_count": 0,
"git_synced": true
}For PR-required and git follower models, direct merges via API are rejected by default as they would bypass the intended git workflow. You can use theDocumentation Index
Fetch the complete documentation index at: https://docs.omni.co/llms.txt
Use this file to discover all available pages before exploring further.
force_override_git_settings parameter to override this check when necessary, but git will not be synced to avoid force-pushing to main.
force_override_git_settings parameter requires Connection Admin or Organization Admin permissions. Users with lesser permissions will receive a 403 Forbidden error when attempting to use this parameter.| Model Configuration | Default Behavior | With force_override_git_settings: true |
|---|---|---|
| No git | Merge succeeds, no git sync | N/A |
| Git enabled (no PR required) | Merge succeeds, syncs to git | N/A |
| Git + PR required | Rejected with 400 error | Merge succeeds, no git sync |
| Git + git follower | Rejected with 400 error | Merge succeeds, no git sync |
Can be either an Organization API Key or Personal Access Token (PAT).
Include in the Authorization header as: Bearer YOUR_TOKEN
The unique identifier of the model
The name of the branch to merge
Delete the branch after merging
When enabled, publish branch-attached drafts when merging
Custom commit message for git sync. Defaults to "branch <name> merged via API"
"Merged revenue metrics branch via CI/CD pipeline"
Requires Connection Admin or Organization Admin permissions. Users with lesser permissions will receive a 403 Forbidden error when attempting to use this parameter.
Allow merge for PR-required or git-follower models. When enabled, the merge will succeed but git will not be synced to avoid force-pushing to main.
Branch merged successfully
Was this page helpful?