# Tags API

<Aside type="note">
To set tag values for HWIDs and UserIDs, use the [/setTags](/developer/api-reference/device-api#settags) method from Device API.
</Aside>

## addTag

`POST` `https://api.pushwoosh.com/json/1.3/addTag`

Creates a tag in your account.

#### Request body

| Name                                       | Type    | Description                                                                                              |
| ------------------------------------------ | ------- | -------------------------------------------------------------------------------------------------------- |
| auth\*     | string  | [API access token](/developer/api-reference/api-identifiers/#api-access-token) from Pushwoosh Control Panel.                                                           |
| tag\*      | object  | Tag parameters.                                                                                          |
| tag.name\* | string  | Tag name.                                                                                                |
| tag.type\* | integer | Tag type. See possible values below.                                                                     |
| tag.user\_specific | boolean | When `true`, the tag value is stored at the user level and shared across all of a user's devices when set by UserID. When `false` (default), the tag is device-level and set per HWID. |

<Tabs>
<TabItem label="200">
```json
{
  "status_code": 200,
  "status_message": "OK",
  "response": {
    "result": true
  }
}
```
</TabItem>
</Tabs>



```json title="Example"
{
  "request": {
    "auth": "yxoPUlwqm…………pIyEX4H", // required. API access token from Pushwoosh Control Panel
    "tag": {
      "name": "TAG_NAME",           // required.
      "type": 1,                    // required. See possible values below
      "user_specific": false        // optional. true = user-level tag (shared across all devices); false = device-level tag (default)
    }
  }
}
```

**Possible tag value types:**

* 1 - Integer
* 2 - String
* 3 - List
* 4 - Date
* 5 - Boolean
* 6 - Decimal. Ex: 19.95
* 7 - Version. Ex: "1.0.0.0"



## deleteTag

`POST` `https://api.pushwoosh.com/json/1.3/deleteTag`

Completely removes a tag with all the associated information from the database.

#### Request body

| Name                                       | Type   | Description                                    |
| ------------------------------------------ | ------ | ---------------------------------------------- |
| auth\*     | string | [API access token](/developer/api-reference/api-identifiers/#api-access-token) from Pushwoosh Control Panel. |
| tag\*      | object | Tag parameters.                                |
| tag.name\* | string | Name of a [tag](/developer/api-reference/api-identifiers/#tag) to delete.                       |

<Tabs>
<TabItem label="200">
```json
{
  "status_code": 200,
  "status_message": "OK",
  "response": {
    "result": true
  }
}
```
</TabItem>
</Tabs>



```json title="Example"
{
  "request": {
    "auth": "yxoPUlwqm…………pIyEX4H", // required. API access token from Pushwoosh Control Panel
    "tag": {
      "name": "TAG_NAME"            // required. Name of a tag to delete
    }
  }
}


```

## listTags

`POST` `https://api.pushwoosh.com/json/1.3/listTags`

Retrieves a list of tags on the account.

#### Request body

| Name                                   | Type   | Description                                    |
| -------------------------------------- | ------ | ---------------------------------------------- |
| auth\* | string | [API access token](/developer/api-reference/api-identifiers/#api-access-token) from Pushwoosh Control Panel. |

<Tabs>
<TabItem label="200">
```json
{
  "status_code": 200,
  "status_message": "OK", 
  "response": {
    "tags": [{
      "name":"Language",
      "type":2
    }, {
      "name":"List tag",
      "type":3
    }]
  }
}
```
</TabItem>
</Tabs>



```json title="Example"
{
  "request":{
    "auth": "yxoPUlwqm…………pIyEX4H" // API access token from Pushwoosh Control Panel
  }
} 
```

**Tag types**:

* 1 - Integer
* 2 - String
* 3 - List
* 4 - Date
* 5 - Boolean
* 6 - Decimal. Ex: 19.95
* 7 - Version. Ex: "1.0.0.0"