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

# Add a component

> Add a component

### Path parameters

<ParamField path="id" type="string" required>
  BOM ID
</ParamField>

### Request body

`CreateBomComponentRequest`

<ParamField body="component_product_id" type="string,null" />

<ParamField body="component_sku" type="string,null" />

<ParamField body="name" type="string" required />

<ParamField body="notes" type="string,null" />

<ParamField body="position" type="string,null" />

<ParamField body="quantity" type="string" required>
  Decimal quantity as a string.
</ParamField>

<ParamField body="unit_of_measure" type="string,null" />

### Responses

<ResponseField name="201" type="BomComponentResponse" />

<ResponseField name="400" type="ErrorBody" />

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.stateset.com/api/v1/boms/{id}/components' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "component_product_id": null,
    "component_sku": null,
    "name": "string",
    "notes": null,
    "position": null,
    "quantity": "string",
    "unit_of_measure": null
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "bom_id": "string",
    "component_sku": null,
    "id": "string",
    "name": "string",
    "notes": null,
    "position": null,
    "quantity": "string",
    "unit_of_measure": "string"
  }
  ```
</ResponseExample>
