---
title: "Create a part"
method: POST
path: "/maintenance/parts"
tags: ["Maintenance"]
---

# Create a part

`POST /maintenance/parts`

## Request

- Base URL: `https://api.samsara.com`
- URL: `https://api.samsara.com/maintenance/parts`
- Auth: HTTP bearer

Creates a part for the organization.

 <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).

To use this endpoint, select **Write Parts** under the Work Orders category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
 

 **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.

## Request body

- EntityPartDefinitionsServiceCreatePartRequestBody: Request body for creating a PartDefinition
  - `barcodeString` string: Barcode associated with the part definition.
  - `barcodeType` string: Type of barcode associated with the part definition.
  - `description` string: Description of the part definition.
  - `externalId` string: Customer-supplied external identifier for the part.
  - `isInventoryTracked` boolean: Whether inventory tracking is enabled for this part.
  - `manufacturerName` string: Name of the manufacturer for the part definition.
  - `manufacturerPartNumber` string: Manufacturer-supplied part number.
  - `name` string: Name of the part definition.
  - `partNumber` string, required: Customer-visible part number for the part.
  - `preferredVendorId` string: Unique identifier for the preferred vendor for this part definition.
  - `preferredVendorPartNumber` string: The preferred vendor's part number for this part definition.
  - `unitCost` CreatePartEntityPartDefinitionMoneyInputTypeRequestBody: Money object
    - `amount` string, required: Monetary amount as a decimal string in major currency units (e.g. "24.50").
    - `currency` string, required: ISO 4217 currency code, lowercased (e.g. "usd").
  - `vmrsCode` string: VMRS code associated with the part definition.

## Response `201`

Created response.

- EntityPartDefinitionsServiceCreatePartResponseBody
  - `data` EntityCreatePartTypeResponseBody, required: PartDefinition object
    - `archivedAtTime` string: Time when the part was archived.
    - `barcodeString` string: Barcode associated with the part definition.
    - `barcodeType` string: Type of barcode associated with the part definition.
    - `category` string: Category of the part definition.
    - `createdAtTime` string: Time when the part was created.
    - `deletedAtTime` string: Time when the part was deleted.
    - `description` string: Description of the part definition.
    - `externalId` string: Customer-supplied external identifier for the part.
    - `id` string: Unique identifier for the part.
    - `isInventoryTracked` boolean: Whether inventory tracking is enabled for this part.
    - `manufacturerName` string: Name of the manufacturer for the part definition.
    - `manufacturerPartNumber` string: Manufacturer-supplied part number.
    - `name` string: Name of the part definition.
    - `partNumber` string: Customer-visible part number for the part.
    - `partStatus` 'Unknown' | 'Active' | 'Archived' | 'Deleted': Status of the part. Valid values: `Unknown`, `Active`, `Archived`, `Deleted`
    - `preferredVendor` EntityCreatePartVendorRefTypeResponseBody: Reference to a Vendor
      - `id` string, required: The ID of the referenced Vendor.
    - `preferredVendorPartNumber` string: The preferred vendor's part number for this part definition.
    - `subcategory` string: Subcategory of the part definition.
    - `unitCost` CreatePartEntityPartDefinitionMoneyTypeResponseBody: Money object
      - `amount` string: Monetary amount as a decimal string in major currency units (e.g. "24.50").
      - `currency` string: ISO 4217 currency code, lowercased (e.g. "usd").
    - `unitOfMeasureType` 'Unknown' | 'Each' | 'Set' | 'Pack' | 'Box' | 'Pound' | 'Kilogram' | 'Ounce' | 'Liter' | 'Milliliter' | 'Gallon' | 'Quart' | 'FluidOunce' | 'Inch' | 'Foot' | 'Meter' | 'Yard' | 'SquareFoot' | 'SquareMeter' | 'Pint' | 'Hundred' | 'Roll': Unit of measure for the part. Valid values: `Unknown`, `Each`, `Set`, `Pack`, `Box`, `Pound`, `Kilogram`, `Ounce`, `Liter`, `Milliliter`, `Gallon`, `Quart`, `FluidOunce`, `Inch`, `Foot`, `Meter`, `Yard`, `SquareFoot`, `SquareMeter`, `Pint`, `Hundred`, `Roll`
    - `updatedAtTime` string: Time when the part was last updated.
    - `vmrsCode` string: VMRS code associated with the part definition.

## Other responses

- `401`: Unauthorized response.
- `404`: Not Found response.
- `405`: Method Not Allowed response.
- `413`: Content Too Large response.
- `429`: Too Many Requests response.
- `500`: Internal Server Error response.
- `501`: Not Implemented response.
- `502`: Bad Gateway response.
- `503`: Service Unavailable response.
- `504`: Gateway Timeout response.
- `default`: Bad Request response.

---

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