Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/wtyler2505/ProtoPulse/llms.txt

Use this file to discover all available pages before exploring further.

The circuit API covers everything needed to build and manipulate a schematic inside ProtoPulse. It is split across 13 routers registered in server/circuit-routes/: circuit designs, component instances, nets, wires, netlist generation, hierarchical sheets, auto-routing, expansion, import, export, and simulations. This page covers the five most commonly used resource groups — designs, instances, nets, wires, ERC, and auto-routing — with request schemas and curl examples for every operation.
All circuit endpoints require a valid X-Session-Id header. See REST API Overview for authentication details.

Circuit designs

A circuit design is the top-level container for a schematic. Every project can have multiple circuit designs (for example, separate sheets for power supply and signal processing). Circuit designs belong to a project and can optionally have a parentDesignId to form a hierarchical sheet tree.

Endpoints

GET /api/projects/:projectId/circuitsReturns all circuit designs for a project.
curl http://localhost:5000/api/projects/1/circuits \
  -H "X-Session-Id: $SESSION"
{
  "data": [
    {
      "id": 1,
      "projectId": 1,
      "name": "Main Circuit",
      "description": null,
      "settings": {},
      "version": 3,
      "createdAt": "2026-01-10T09:00:00.000Z",
      "updatedAt": "2026-01-12T14:30:00.000Z"
    }
  ],
  "total": 1
}

Component instances

A component instance is a placed occurrence of a component part inside a circuit design. It carries position and rotation coordinates for three views: schematic, breadboard, and PCB. Reference designators (R1, C2, U3) are auto-generated if you omit them or send a placeholder ending in ?.

Endpoints

GET /api/circuits/:circuitId/instancesReturns all instances in a circuit design. Paginated (limit, offset, sort).
curl "http://localhost:5000/api/circuits/1/instances?limit=100" \
  -H "X-Session-Id: $SESSION"

Nets

A net is an electrical connection that links component pins. Nets carry a type (signal, power, ground, or bus), an optional voltage label, and structured data for segments (which pins are connected), wire labels, and visual style.

Endpoints

GET /api/circuits/:circuitId/netsReturns all nets in a circuit. Paginated.
curl http://localhost:5000/api/circuits/1/nets \
  -H "X-Session-Id: $SESSION"

Wires

A wire is the visual representation of a segment of a net in a specific view. Wires belong to a net and store an ordered array of {x, y} points defining the wire path. The same net can have multiple wires in the schematic view and separate wires in the breadboard or PCB view.

Endpoints

GET /api/circuits/:circuitId/wiresReturns all wires in a circuit across all views.
curl http://localhost:5000/api/circuits/1/wires \
  -H "X-Session-Id: $SESSION"

Electrical Rule Check

POST /api/projects/:projectId/circuits/:id/erc (via the circuit design router) Runs the Electrical Rule Check engine against a circuit design and returns a list of ERC violations. The ERC engine checks for unconnected pins, conflicting net driver types, floating power rails, missing decoupling capacitors on power pins, and other electrical correctness issues. Results are also written to the validation_issues table for the project.
curl -X POST http://localhost:5000/api/projects/1/circuits/1/erc \
  -H "X-Session-Id: $SESSION" \
  -H "Content-Type: application/json" \
  -d '{}'
{
  "violations": [
    {
      "severity": "error",
      "message": "Pin U1.VCC is unconnected",
      "instanceId": 4,
      "pinId": "VCC"
    },
    {
      "severity": "warning",
      "message": "Net VCC has no power source driver",
      "netId": 3
    }
  ],
  "passedCount": 12,
  "failedCount": 2
}
ERC must pass before Gerber export. The export endpoint runs a DRC/ERC gate and returns 422 Unprocessable Entity if violations are present. Fix all error-severity violations before exporting manufacturing files.

Auto-route

POST /api/projects/:projectId/circuits/:id/autoroute Triggers the server-side PCB auto-router, which attempts to connect all component instances on the PCB layout view by generating wire segments for each net. The router uses a grid-based 90-degree routing algorithm.
gridSize
number
default:"10"
Routing grid pitch in canvas units.
clearance
number
default:"5"
Minimum clearance between traces in canvas units.
curl -X POST http://localhost:5000/api/projects/1/circuits/1/autoroute \
  -H "X-Session-Id: $SESSION" \
  -H "Content-Type: application/json" \
  -d '{"gridSize": 10, "clearance": 5}'
The response contains the count of nets that were successfully routed and any that could not be completed:
{
  "routedNets": 8,
  "unroutedNets": 1,
  "message": "Auto-routing complete. 1 net could not be routed — manual routing required."
}
After auto-routing, run the ERC endpoint to verify that no pin connections were missed, and review the PCB layout view to confirm that trace clearance rules are met before exporting Gerbers.

Inline netlist

GET /api/circuits/:circuitId/netlist Generates and returns a netlist for the circuit in JSON format, listing all nets with their connected instance/pin pairs. This is useful for programmatic connectivity analysis without triggering a full export.
curl http://localhost:5000/api/circuits/1/netlist \
  -H "X-Session-Id: $SESSION"
{
  "circuitId": 1,
  "nets": [
    {
      "id": 3,
      "name": "VCC",
      "netType": "power",
      "connections": [
        {"instanceId": 1, "refDes": "U1", "pinId": "VCC"},
        {"instanceId": 2, "refDes": "C1", "pinId": "+"}
      ]
    }
  ]
}

Build docs developers (and LLMs) love