# API 레퍼런스: 지원

지원: API v1의 모든 작업을 필요한 스코프, 매개변수, curl·JavaScript·Python 예시와 응답으로 설명합니다. 인증, 오류, 페이지 나누기, 속도 제한, 멱등성은 [API 레퍼런스 개요](/docs/api-reference)를 참고하세요. [SDK](/docs/sdks)와 [명령줄 도구](/docs/cli)도 확인해 보세요.

> 내 키로 시도해 보기: 콘솔에서 API 키를 만들고 터미널에서 `export APIDLY_API_KEY=...`를 실행한 다음 아래 curl 예시를 붙여 넣으세요. 예시 값은 설명용입니다. 이 페이지에는 키를 입력하는 곳이 없습니다.

작업과 필드 설명은 API 정의에서 가져오며 영어로 되어 있습니다.

| 작업 | 필요한 스코프 | 요약 |
| --- | --- | --- |
| `GET /support/tickets` | `read` | 조직의 지원 티켓(최근 활동순) |
| `POST /support/tickets` | `servers` | 지원 티켓 열기 |
| `GET /support/tickets/{id}` | `read` | 메시지가 포함된 티켓 하나(오래된 순) |
| `POST /support/tickets/{id}/messages` | `servers` | 티켓에 답변 |
| `POST /support/tickets/{id}/close` | `servers` | 티켓 닫기 |

### GET /support/tickets

조직의 지원 티켓(최근 활동순)

**필요한 스코프:** `read`

**매개변수**

| 이름 | 위치 | 유형 | 필수 | 설명 |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | 아니요 |  |
| `cursor` | query | string | 아니요 |  |
| `status` | query | `open` \| `pending` \| `closed` | 아니요 |  |

**요청 예시 (curl)**

```bash
curl "https://apidly.com/api/v1/support/tickets?limit=20" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.support.listTickets({ limit: 20 });
```

**Python (SDK)**

```python
client.support.list_tickets()
```

**명령줄 도구:** `apidly support` ([CLI 레퍼런스](/docs/cli))

**응답 예시** (200)

```json
{
  "tickets": [
    {
      "id": "example",
      "subject": "example",
      "category": "example",
      "status": "open",
      "priority": "example",
      "openedBy": "example",
      "createdAt": "2026-11-21T10:00:00.000Z",
      "updatedAt": "2026-11-21T10:00:00.000Z"
    }
  ],
  "nextCursor": "example"
}
```

오류 상태: `400`, `401`, `403`, `429`.

### POST /support/tickets

지원 티켓 열기

Staff answer by e-mail and in the console. `priority` is `low`, `normal` or `high`. `serverId` is added to the text as the related server.

**필요한 스코프:** `servers`

**요청 본문**

| 이름 | 유형 | 필수 | 설명 |
| --- | --- | --- | --- |
| `subject` | string | 예 |  |
| `category` | string | 아니요 |  |
| `priority` | `low` \| `normal` \| `high` | 아니요 |  |
| `message` | string | 예 |  |
| `serverId` | string | 아니요 |  |

**요청 예시 (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/support/tickets" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"subject":"example","message":"example"}'
```

**JavaScript (SDK)**

```js
await apidly.support.createTicket({
  subject: "example",
  message: "example"
});
```

**Python (SDK)**

```python
client.support.create_ticket(subject="example", message="example")
```

**명령줄 도구:** `apidly support` ([CLI 레퍼런스](/docs/cli))

**응답 예시** (201)

```json
{
  "ticket": {
    "id": "example",
    "subject": "example",
    "category": "example",
    "status": "open",
    "priority": "example",
    "openedBy": "example",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "updatedAt": "2026-11-21T10:00:00.000Z"
  }
}
```

오류 상태: `400`, `401`, `403`, `429`.

### GET /support/tickets/{id}

메시지가 포함된 티켓 하나(오래된 순)

**필요한 스코프:** `read`

**매개변수**

| 이름 | 위치 | 유형 | 필수 | 설명 |
| --- | --- | --- | --- | --- |
| `id` | path | string | 예 |  |

**요청 예시 (curl)**

```bash
curl "https://apidly.com/api/v1/support/tickets/support_example" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.support.getTicket("support_example");
```

**Python (SDK)**

```python
client.support.get_ticket("support_example")
```

**명령줄 도구:** `apidly support` ([CLI 레퍼런스](/docs/cli))

**응답 예시** (200)

```json
{
  "ticket": {
    "key": null
  }
}
```

오류 상태: `401`, `403`, `404`, `429`.

### POST /support/tickets/{id}/messages

티켓에 답변

Reopens the ticket. 409 `ticket_closed` on a closed ticket.

**필요한 스코프:** `servers`

**매개변수**

| 이름 | 위치 | 유형 | 필수 | 설명 |
| --- | --- | --- | --- | --- |
| `id` | path | string | 예 |  |

**요청 본문**

| 이름 | 유형 | 필수 | 설명 |
| --- | --- | --- | --- |
| `message` | string | 예 |  |

**요청 예시 (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/support/tickets/support_example/messages" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message":"example"}'
```

**JavaScript (SDK)**

```js
await apidly.support.reply("support_example", "example");
```

**Python (SDK)**

```python
client.support.reply("support_example", message="example")
```

**명령줄 도구:** `apidly support` ([CLI 레퍼런스](/docs/cli))

**응답 예시** (201)

```json
{
  "message": {
    "key": null
  }
}
```

오류 상태: `400`, `401`, `403`, `404`, `409`, `429`.

### POST /support/tickets/{id}/close

티켓 닫기

**필요한 스코프:** `servers`

**매개변수**

| 이름 | 위치 | 유형 | 필수 | 설명 |
| --- | --- | --- | --- | --- |
| `id` | path | string | 예 |  |

**요청 예시 (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/support/tickets/support_example/close" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.support.close("support_example");
```

**Python (SDK)**

```python
client.support.close("support_example")
```

**명령줄 도구:** `apidly support` ([CLI 레퍼런스](/docs/cli))

**응답 예시** (200)

```json
{
  "ok": false
}
```

오류 상태: `401`, `403`, `404`, `429`.
