Skip to main content
Branches are top-level containers for learning topics. Each branch belongs to a user and contains a collection of topic nodes.

List Branches

curl "http://localhost:8000/api/branches?userId=00000000-0000-0000-0000-000000000000"
GET /api/branches Retrieve all branches for a user.

Query Parameters

userId
string
required
The UUID of the user whose branches to retrieve

Response

[]
array
Array of branch objects
id
string
Branch UUID
title
string
Branch name
userId
string
Owner user UUID
createdAt
string
ISO 8601 timestamp
updatedAt
string
ISO 8601 timestamp

Get Branch

curl "http://localhost:8000/api/branches/a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"
GET /api/branches/:id Retrieve a single branch by ID.

Path Parameters

id
string
required
Branch UUID

Response

id
string
Branch UUID
title
string
Branch name
userId
string
Owner user UUID
createdAt
string
ISO 8601 timestamp
updatedAt
string
ISO 8601 timestamp

Create Branch

curl -X POST http://localhost:8000/api/branches \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Data Structures",
    "userId": "00000000-0000-0000-0000-000000000000"
  }'
POST /api/branches Create a new branch.

Body Parameters

title
string
required
Name of the branch
userId
string
required
UUID of the user creating the branch

Response

Status: 201 Created Returns the created branch object.

Update Branch

curl -X PATCH http://localhost:8000/api/branches/a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Advanced Data Structures"
  }'
PATCH /api/branches/:id Update a branch’s title.

Path Parameters

id
string
required
Branch UUID

Body Parameters

title
string
New title for the branch

Response

Returns the updated branch object with a new updatedAt timestamp.

Delete Branch

curl -X DELETE http://localhost:8000/api/branches/a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d
DELETE /api/branches/:id Delete a branch and all associated data (nodes, edges, assessments, questions, answers, chat sessions, progress records).
This is a destructive operation that cascades through the entire learning graph. All child nodes, assessments, and student progress will be permanently deleted.

Path Parameters

id
string
required
Branch UUID

Response

Status: 204 No Content No response body on success.

Build docs developers (and LLMs) love