---
id: upload_tags
title: Upload Tags
sidebar_label: Upload Tags
---

export const Endpoint = ({children, color}) => ( <span style={{
      borderRadius: '2px',
      color: '#E83E8C',
    }}>{children}</span> );

<Endpoint>POST /upload/tags </Endpoint>: Uploading a file containing multiple tags <br></br>

```json
file: {FileName}.txt
```
**Note**: Repeated tags won't be created again

### Example Request
This is an **admin protected route**, a **valid admin JWT is required** in the header field
#### Header
```
Authorization: Bearer <KEY>
```
#### Body
```json
file: {FileName}.txt
```
#### File Format: 

The file must be in the format of
```
Tag1
Tag2
Tag3
Tag4
...
```
where each tag is separated by a newline. Tags with spaces at the front or at the end will be stripped out.

### Possible Responses
#### Immediate Success
```json
{
	"code": 1,
	"message": "successfully created tags",
	"data": {}
}
```
#### Failure
```json
{
	"code": -1,
	"message": "please contact an administrator",
	"data": {}
}
```