# CreateItemTags

Create tags for a item

`POST /api/v2/companies/{companyId}/items/{itemId}/tags`

**API:** AvaTax API
**Tag:** Items
**API Version:** v2
**Base URL:** https://sandbox-rest.avatax.com/
**Content-Type:** `application/json`
**Accepts:** `application/json`
**Authentication:** API Key (`Authorization` in header) or OAuth 2.0 or Basic (username + license key)

Source: https://developer.avalara.com/products/crossborder/api/methods/Items/CreateItemTags/

## Description

Creates one or more new `Tag` objects attached to this Item.
            
Item tags puts multiple labels for an item. So that item can be easily grouped by these tags.

### Security Policies

* This API requires one of the following user roles: AccountAdmin, AccountOperator, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `companyId` | integer | path | Yes | The ID of the company that defined these items |
| `itemId` | integer | path | Yes | The ID of the item as defined by the company that owns this tag. |
| `X-Avalara-Client` | string | header | No | Identifies the software you are using to call this API.  For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . |

## Request Body

**Schema:** `ItemTagDetailInputModel[]`

| Property | Type | Required | Description |
|---|---|---|---|
| `tagName` | string | **Yes** | The tag name. Example: `Import_Restricted`. |
| `itemId` | integer | No | The unique ID number of this item. Example: `151284220`. |
| `companyId` | integer | No | The unique ID number of the company that owns this item. Example: `8010687`. |

## Responses

| Status | Description | Schema |
|---|---|---|
| 201 | Created |  |
| 400 | Bad Request |  |
| 401 | Unauthorized |  |
| 404 | Not Found |  |

## Example Request

```bash
curl -X POST "https://sandbox-rest.avatax.com/api/v2/companies/{companyId}/items/{itemId}/tags" \
  -H "Authorization: Basic <credentials>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '[
  {
    "tagName": "Import_Restricted",
    "itemId": 151284220,
    "companyId": 8010687
  }
]'
```