Overview
Branching creates a zero-copy fork of a document. The branch is a fully independent document with its own ID, nodes, and lifecycle — mutations on the branch never affect the original. Think of it likegit branch: fork, experiment, compare.
Create a branch
201 Created):
List branches
List all branches of a document using thebranched_from filter:
limit, after, before, order).
Delete a branch
Branches are regular documents. Delete them the same way:Branch + Ingest (replace)
The most common workflow: branch a document, push corrected data withmode: "replace",
then compare completions.
Git semantics
| Git | OkraPDF | Endpoint |
|---|---|---|
git branch feature | Create branch | POST /v1/documents/:id/branch |
git branch | List branches | GET /v1/documents?branched_from=:id |
git branch -d feature | Delete branch | DELETE /document/:id |
git merge feature | Merge branch | Coming soon |