---
title: "Patch Component"
method: PATCH
path: "/v1/components/{component_id}"
tags: ["v1", "components"]
---

# Patch Component

`PATCH /v1/components/{component_id}`

## Request

- Base URL: `https://thrustlab.com`
- URL: `https://thrustlab.com/v1/components/{component_id}`
- Auth: HTTP bearer

Update an editable field on a user-owned custom component.

Body fields are optional: `name` (1-255 chars), `spec_json` (replaces
entire spec_json on write, no deep merge).

Type, source, visibility, user_id, and base_component_id are not
editable through /v1/.

Returns the updated component resource (200), with the same non-blocking
`warnings` behavior as create (a physically implausible spec value is
flagged, not rejected). A motor `spec_json` gets the same 400 as on create
when its `iq_nominal` is too high to be a no-load current.

Permissions: owner can modify their own private customs; cross-user
or public-catalog access returns 403/404.

## Path parameters

- `component_id` string, required

## Request body

- ComponentPatch
  - `name` string, nullable
  - `spec_json` object, nullable

## Response `200`

Successful Response

- ComponentWriteResponse: Create/patch response: the component resource plus optional warnings. ``warnings`` is omitted (null) when every spec value looks plausible.
  - `base_component_id` string, uuid, nullable, required
  - `created_at` string, date-time, required
  - `id` string, required
  - `name` string, required
  - `object` string
  - `source` string, required
  - `spec_json` object, required
  - `type` string, required
  - `updated_at` string, date-time, required
  - `user_id` string, uuid, nullable, required
  - `visibility` string, required
  - `warnings` ComponentWriteWarning[], nullable
    - `code` string, required
    - `message` string, required
    - `object` string
    - `param` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/thrustlab/apis/thrustlab-api.md) · [All operations](https://skmtc.dev/thrustlab/apis/thrustlab-api/llms.txt) · [OpenAPI document](https://skmtc.dev/thrustlab/apis/thrustlab-api/revisions/c19717e52529?raw)
