Create or update a pull request for a model branch
Push a branch's model contents to Git and create or update 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
Request
- Base URLhttps://blobsrus.omniapp.co/api
- URLhttps://blobsrus.omniapp.co/api/v1/models/{modelId}/git/commit
- AuthHTTP bearer
Path parameters
The unique identifier of the shared model, or a shared extension model in the Develop independently branch workflow.
Request body
Example request
{
"branch_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"commit_message": "Add new customer dimension",
"allow_branch_exists": true
}Response
Commit operation completed successfully
Example response
{
"pr_url": "https://github.com/myorg/repo/compare/main...feature?expand=1",
"git_sha": "abc123def456",
"in_sync": true,
"did_sync": true
}Changes
No recorded changes to this operation across all 2 revisions of this API.