# Referensi API: Dukungan

Dukungan: semua operasi API v1 dengan scope yang diperlukan, parameter, contoh dalam curl, JavaScript, dan Python, serta responsnya. Autentikasi, kesalahan, penomoran halaman, batas laju, dan idempotensi ada di [ikhtisar referensi API](/docs/api-reference); lihat juga [SDK](/docs/sdks) dan [baris perintah](/docs/cli).

> Coba dengan kunci Anda: buat kunci API di konsol, jalankan `export APIDLY_API_KEY=...` di terminal, lalu tempel salah satu contoh curl di bawah. Nilai contoh hanya ilustrasi. Halaman ini tidak memiliki kolom untuk memasukkan kunci.

Deskripsi operasi dan kolom berasal dari definisi API dan berbahasa Inggris.

| Operasi | Scope yang diperlukan | Ringkasan |
| --- | --- | --- |
| `GET /support/tickets` | `read` | Tiket dukungan organisasi, aktivitas terbaru lebih dulu |
| `POST /support/tickets` | `servers` | Buka tiket dukungan |
| `GET /support/tickets/{id}` | `read` | Satu tiket beserta pesannya, terlama lebih dulu |
| `POST /support/tickets/{id}/messages` | `servers` | Balas tiket |
| `POST /support/tickets/{id}/close` | `servers` | Tutup tiket |

### GET /support/tickets

Tiket dukungan organisasi, aktivitas terbaru lebih dulu

**Scope yang diperlukan:** `read`

**Parameter**

| Nama | Di | Tipe | Wajib | Deskripsi |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | tidak |  |
| `cursor` | query | string | tidak |  |
| `status` | query | `open` \| `pending` \| `closed` | tidak |  |

**Contoh permintaan (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()
```

**Alat baris perintah:** `apidly support` ([Referensi CLI](/docs/cli))

**Contoh respons** (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"
}
```

Status kesalahan: `400`, `401`, `403`, `429`.

### POST /support/tickets

Buka tiket dukungan

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.

**Scope yang diperlukan:** `servers`

**Isi permintaan**

| Nama | Tipe | Wajib | Deskripsi |
| --- | --- | --- | --- |
| `subject` | string | ya |  |
| `category` | string | tidak |  |
| `priority` | `low` \| `normal` \| `high` | tidak |  |
| `message` | string | ya |  |
| `serverId` | string | tidak |  |

**Contoh permintaan (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")
```

**Alat baris perintah:** `apidly support` ([Referensi CLI](/docs/cli))

**Contoh respons** (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"
  }
}
```

Status kesalahan: `400`, `401`, `403`, `429`.

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

Satu tiket beserta pesannya, terlama lebih dulu

**Scope yang diperlukan:** `read`

**Parameter**

| Nama | Di | Tipe | Wajib | Deskripsi |
| --- | --- | --- | --- | --- |
| `id` | path | string | ya |  |

**Contoh permintaan (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")
```

**Alat baris perintah:** `apidly support` ([Referensi CLI](/docs/cli))

**Contoh respons** (200)

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

Status kesalahan: `401`, `403`, `404`, `429`.

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

Balas tiket

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

**Scope yang diperlukan:** `servers`

**Parameter**

| Nama | Di | Tipe | Wajib | Deskripsi |
| --- | --- | --- | --- | --- |
| `id` | path | string | ya |  |

**Isi permintaan**

| Nama | Tipe | Wajib | Deskripsi |
| --- | --- | --- | --- |
| `message` | string | ya |  |

**Contoh permintaan (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")
```

**Alat baris perintah:** `apidly support` ([Referensi CLI](/docs/cli))

**Contoh respons** (201)

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

Status kesalahan: `400`, `401`, `403`, `404`, `409`, `429`.

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

Tutup tiket

**Scope yang diperlukan:** `servers`

**Parameter**

| Nama | Di | Tipe | Wajib | Deskripsi |
| --- | --- | --- | --- | --- |
| `id` | path | string | ya |  |

**Contoh permintaan (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")
```

**Alat baris perintah:** `apidly support` ([Referensi CLI](/docs/cli))

**Contoh respons** (200)

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

Status kesalahan: `401`, `403`, `404`, `429`.
