---
title: "Create a schematic line segment"
method: POST
path: "/api/v0/components/{component_id}/schematic/line-segments"
tags: ["Components"]
---

# Create a schematic line segment

`POST /api/v0/components/{component_id}/schematic/line-segments`

## Path parameters

- `component_id` string, required

## Query parameters

- `vc_id` string, required — Public ID of the target visual component

## Request body

- CreateLineSegmentRequest
  - `id` string, uuid4, required
  - `start` string, required
  - `end` string, required
  - `pixel_path` array[], nullable
    - integer[]
  - `bbox` BoundingBox
    - `x0` integer, required
    - `y0` integer, required
    - `x1` integer, required
    - `y1` integer, required
    - `dpi` integer
    - `class_name` string, nullable
    - `text` string, nullable
    - `confidence` number, nullable
  - `stroke` StrokeAppearance — How a drawn line LOOKS, measured off the page image. Every field is a measurement of ink, so every field is optional: a stroke traced through a colour-blind fallback has no `color`, and one too short to hold a full dash period has no `pattern`. `width_px` and `dash_array` are in the pixels of the page image the trace ran on (`PAGE_IMAGE_DPI`), the same frame as a segment's `pixel_path`. This says nothing about what the line IS. A drawing's key maps an appearance to a kind of line, and that mapping is neither stored here nor needed to record what was measured.
    - `color` string, nullable
    - `pattern` 'solid' | 'dashed' | 'dotted' | 'dash_dot' | 'dash_dot_dot', nullable
    - `width_px` number, nullable
    - `dash_array` number[], nullable

## Response `200`

Successful Response

- SchematicLineSegment — An edge between ports, junctions, and/or terminals. Wire/response shape only — the runtime equivalent is a `Coupling` carrying a `SegmentPayload`. Flow direction lives on the payload, not the wire-level segment.
  - `id` string, required
  - `start` string, required
  - `end` string, required
  - `pixel_path` array[], nullable
    - integer[]
  - `bbox` BoundingBox
    - `x0` integer, required
    - `y0` integer, required
    - `x1` integer, required
    - `y1` integer, required
    - `dpi` integer
    - `class_name` string, nullable
    - `text` string, nullable
    - `confidence` number, nullable
  - `stroke` StrokeAppearance — How a drawn line LOOKS, measured off the page image. Every field is a measurement of ink, so every field is optional: a stroke traced through a colour-blind fallback has no `color`, and one too short to hold a full dash period has no `pattern`. `width_px` and `dash_array` are in the pixels of the page image the trace ran on (`PAGE_IMAGE_DPI`), the same frame as a segment's `pixel_path`. This says nothing about what the line IS. A drawing's key maps an appearance to a kind of line, and that mapping is neither stored here nor needed to record what was measured.
    - `color` string, nullable
    - `pattern` 'solid' | 'dashed' | 'dotted' | 'dash_dot' | 'dash_dot_dot', nullable
    - `width_px` number, nullable
    - `dash_array` number[], nullable
  - `arrow_id` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/outerport/apis/outerport-api.md) · [All operations](https://skmtc.dev/outerport/apis/outerport-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/outerport/outerport-api/revisions/f565b46daaea/schema)
