Create or update a pull request for a model branch
This endpoint requires Modeler or Connection Admin permisisons.
Pushes a branch’s model contents to git and creates or updates a pull request. This mirrors the Create Pull Request / Update Pull Request buttons in Omni allowing API consumers and AI agents to drive the pull request workflow programmatically.
By default, the endpoint automatically detects whether the git branch exists. If a branch doesn’t exist, a successful request will create a new git branch and open a pull request. If a branch does exist, a commit will be added to the branch.
The allow_branch_exists and require_branch_exists parameters constrain this behavior:
- Create or update mode (default) - Auto-detects and handles both scenarios
- Create-only mode (
allow_branch_exists: false) - Fails if the git branch already exists - Update-only mode (
require_branch_exists: true) - Fails if the git branch doesn’t exist
Documentation Index
Fetch the complete documentation index at: https://docs.omni.co/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Can be either an Organization API Key or Personal Access Token (PAT).
Include in the Authorization header as: Bearer YOUR_TOKEN
Path Parameters
The unique identifier of the shared model.
Body
UUID of the Omni branch to commit.
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Commit message for the git commit.
"Add new customer dimension"
Set false to fail if git branch already exists (Create-only mode).
true
Set true to fail if git branch doesn't exist (Update-only mode).
false
Response
Commit operation completed successfully
URL of the created or updated pull request.
"https://github.com/myorg/repo/compare/main...feature?expand=1"
The git SHA of the commit.
"abc123def456"
Whether the shared model is currently in sync with its configured default git branch.
true
Whether a sync operation was performed between the shared model and its configured default git branch.
true