Create (fork) a branch
const url = 'https://api.aerandil.com/v1/branches';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.aerandil.com/v1/branches \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example" }'Fork a new open branch at the head of the caller-tenant’s event stream. Sibling delta tables carry copy-on-first-write overlay rows; the base plane pays zero tax. At most one open branch per name per tenant — a merged or discarded branch frees its name. Accepts Idempotency-Key. Requires objects:write.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Opaque idempotency token (Stripe-shape). Repeated POSTs with the same key replay the original response within the cache TTL rather than creating a duplicate object.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Unique among the tenant’s open branches.
Examplegenerated
{ "name": "example"}Responses
Section titled “Responses”Branch forked.
object
The caller-tenant’s event-stream head seq at fork (fork-from-head only).
Present on a merged branch: the correlation id stamped on the branch.merged event and shared by every replayed main-log write, tying the merge record to the replayed events.
Example
{ "status": "open"}A branch with this name is already open.
Invalid branch name.