# CreateItem

Use this function to create an item record.

### Properties <a href="#properties" id="properties"></a>

**Authentication**

Authentication values used to connect to the Xero server.

**Item**

Item to create.

Mandatory fields:

* **Code**: User defined item code (max length = 30).

Mandatory fields on a tracked inventory item:

* **InventoryAssetAccountCode**: The inventory asset account for the item. The account must be of type 'INVENTORY'. The [COGSAccountCode](https://developer.xero.com/documentation/api/items#COGS) in PurchaseDetails is also required to create a tracked item.

### Output <a href="#output" id="output"></a>

**Item**

The item created.

### Links <a href="#links" id="links"></a>

[Xero Developer: Items (PUT)](https://developer.xero.com/documentation/api/items#PUT)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.linx.software/reference/plugins/xero/content/items/createitem.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
