> ## 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.

# Create an inspection

> Create an inspection

### Request body

`CreateInspectionRequest`

<ParamField body="inspection_type" type="string" required>
  One of `receiving`, `in_process`, `final`, `random`.
</ParamField>

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

<ParamField body="items" type="CreateInspectionItemRequest[]" />

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

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

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

### Responses

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

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

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.stateset.com/api/v1/quality/inspections' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "inspection_type": "string",
    "inspector_id": null,
    "items": [
      {
        "lot_number": null,
        "quantity_to_inspect": "string",
        "serial_number": null,
        "sku": "string"
      }
    ],
    "notes": null,
    "reference_id": "string",
    "reference_type": "string"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "created_at": "string",
    "id": "string",
    "inspection_number": "string",
    "inspection_type": "string",
    "notes": null,
    "reference_id": "string",
    "reference_type": "string",
    "status": "string"
  }
  ```
</ResponseExample>
