> For the complete documentation index, see [llms.txt](https://api-docs.roundhr.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-docs.roundhr.com/round-api/api-reference/candidates/tags.md).

# 지원자 태그

## 태그 목록 조회

<mark style="color:green;">`GET`</mark> `https://api.roundhr.com/v1/candidates/{candidate_code}/tags`

지원자에게 부여된 태그 목록을 반환합니다.

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Path Parameters**

| Name            | Type   | 필수         | Description |
| --------------- | ------ | ---------- | ----------- |
| candidate\_code | string | `required` | 지원자 고유 코드   |

**응답 예제**

{% tabs %}
{% tab title="200" %}

```json
[
   {
      "id": 1,
      "name": "핵심인재",
      "created_at": "2024-09-02T18:56:37+09:00",
      "updated_at": "2024-09-02T18:56:37+09:00"
   },
   {
      "id": 2,
      "name": "경력3년이상",
      "created_at": "2024-09-03T10:30:00+09:00",
      "updated_at": "2024-09-03T10:30:00+09:00"
   }
]
```

{% endtab %}
{% endtabs %}

***

## 태그 추가

<mark style="color:yellow;">`POST`</mark> `https://api.roundhr.com/v1/candidates/{candidate_code}/tags`

지원자에게 태그를 추가합니다. 존재하지 않는 태그명인 경우 새로 생성됩니다.

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Path Parameters**

| Name            | Type   | 필수         | Description |
| --------------- | ------ | ---------- | ----------- |
| candidate\_code | string | `required` | 지원자 고유 코드   |

**Body Parameters**

| Name | Type   | 필수         | Description          |
| ---- | ------ | ---------- | -------------------- |
| name | string | `required` | 태그명 (공백은 자동으로 제거됩니다) |

**요청 예제**

```json
{
   "name": "핵심인재"
}
```

**응답 예제**

{% tabs %}
{% tab title="200" %}

```json
{
   "id": 1,
   "name": "핵심인재",
   "created_at": "2024-09-02T18:56:37+09:00",
   "updated_at": "2024-09-02T18:56:37+09:00"
}
```

{% endtab %}
{% endtabs %}

***

## 태그 삭제

<mark style="color:red;">`DELETE`</mark> `https://api.roundhr.com/v1/candidates/{candidate_code}/tags/{id}`

지원자에게서 태그를 제거합니다. 해당 태그가 다른 지원자에게도 사용되지 않는 경우 태그 자체가 삭제됩니다.

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Path Parameters**

| Name            | Type    | 필수         | Description |
| --------------- | ------- | ---------- | ----------- |
| candidate\_code | string  | `required` | 지원자 고유 코드   |
| id              | integer | `required` | 태그 ID       |

**응답 예제**

{% tabs %}
{% tab title="200" %}

```json
{}
```

{% endtab %}

{% tab title="404" %}

```json
{
   "error": "not_found",
   "message": "Resource not found"
}
```

{% endtab %}
{% endtabs %}

***

## 응답 필드 설명

| Field       | Type    | Description |
| ----------- | ------- | ----------- |
| id          | integer | 태그 고유 ID    |
| name        | string  | 태그명         |
| created\_at | string  | 생성 일시       |
| updated\_at | string  | 수정 일시       |
