> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ionworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a cell component by ID

> Update an existing cell component identified by its ID.

Only components in the current organization can be updated (not system components).



## OpenAPI

````yaml https://api.ionworks.com/openapi.json patch /cell_components/{component_id}
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.ionworks.com
    description: Production
security: []
paths:
  /cell_components/{component_id}:
    patch:
      tags:
        - Cell Components
      summary: Update a cell component by ID
      description: >-
        Update an existing cell component identified by its ID.


        Only components in the current organization can be updated (not system
        components).
      operationId: update_cell_component_cell_components__component_id__patch
      parameters:
        - name: component_id
          in: path
          required: true
          schema:
            type: string
            title: Component Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCellComponent'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CellComponent'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    UpdateCellComponent:
      properties:
        component_type:
          anyOf:
            - $ref: '#/components/schemas/ComponentType'
            - type: 'null'
          description: New component type
        material_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Material Id
          description: New material ID
        properties:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Properties
          description: New properties
      type: object
      title: UpdateCellComponent
      description: Model for updating an existing cell component. All fields are optional.
    CellComponent:
      properties:
        component_type:
          $ref: '#/components/schemas/ComponentType'
          description: Type of the component
        material_id:
          type: string
          title: Material Id
          description: ID of the material
        properties:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Properties
          description: >-
            Application properties using Quantity format for numerics. Example:
            {'diameter': {'value': 14, 'unit': 'mm'}, 'binder': 'PVDF'}
        id:
          type: string
          title: Id
          description: Unique identifier for the component
        organization_id:
          type: string
          title: Organization Id
          description: Organization ID of the component
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Id
          description: >-
            Project the component is scoped to, derived from the cell
            specification(s) that reference it. Null when the component is
            shared across multiple projects or is org-global.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Timestamp when the component was created
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: Timestamp when the component was last updated
      type: object
      required:
        - component_type
        - material_id
        - id
        - organization_id
        - created_at
        - updated_at
      title: CellComponent
      description: Model representing a cell component as returned by the API.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ComponentType:
      type: string
      enum:
        - cathode
        - anode
        - electrolyte
        - separator
        - case
        - cell
      title: ComponentType
      description: Enum for cell component types.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````