# API başvurusu: Destek

Destek: API v1'in tüm işlemleri; gerekli scope, parametreler, curl, JavaScript ve Python örnekleri ve yanıtlarla. Kimlik doğrulama, hatalar, sayfalama, sınırlar ve idempotentlik [API başvurusuna genel bakış](/docs/api-reference) sayfasındadır; ayrıca [SDK'lara](/docs/sdks) ve [komut satırına](/docs/cli) bakın.

> Anahtarınızla deneyin: konsolda bir API anahtarı oluşturun, terminalde `export APIDLY_API_KEY=...` komutunu çalıştırın ve aşağıdaki curl örneklerinden birini yapıştırın. Örnek değerler örnek amaçlıdır. Bu sayfada anahtar girilecek bir alan yoktur.

İşlem ve alan açıklamaları API tanımından gelir ve İngilizcedir.

| İşlem | Gereken scope | Özet |
| --- | --- | --- |
| `GET /support/tickets` | `read` | Kuruluşun destek talepleri, en son etkinlik önce |
| `POST /support/tickets` | `servers` | Destek talebi aç |
| `GET /support/tickets/{id}` | `read` | Mesajlarıyla tek bir talep, en eski önce |
| `POST /support/tickets/{id}/messages` | `servers` | Bir talebi yanıtla |
| `POST /support/tickets/{id}/close` | `servers` | Bir talebi kapat |

### GET /support/tickets

Kuruluşun destek talepleri, en son etkinlik önce

**Gereken scope:** `read`

**Parametreler**

| Ad | Yeri | Tür | Zorunlu | Açıklama |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | hayır |  |
| `cursor` | query | string | hayır |  |
| `status` | query | `open` \| `pending` \| `closed` | hayır |  |

**Örnek istek (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()
```

**Komut satırı aracı:** `apidly support` ([CLI başvurusu](/docs/cli))

**Örnek yanıt** (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"
}
```

Hata durumları: `400`, `401`, `403`, `429`.

### POST /support/tickets

Destek talebi aç

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.

**Gereken scope:** `servers`

**İstek gövdesi**

| Ad | Tür | Zorunlu | Açıklama |
| --- | --- | --- | --- |
| `subject` | string | evet |  |
| `category` | string | hayır |  |
| `priority` | `low` \| `normal` \| `high` | hayır |  |
| `message` | string | evet |  |
| `serverId` | string | hayır |  |

**Örnek istek (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")
```

**Komut satırı aracı:** `apidly support` ([CLI başvurusu](/docs/cli))

**Örnek yanıt** (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"
  }
}
```

Hata durumları: `400`, `401`, `403`, `429`.

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

Mesajlarıyla tek bir talep, en eski önce

**Gereken scope:** `read`

**Parametreler**

| Ad | Yeri | Tür | Zorunlu | Açıklama |
| --- | --- | --- | --- | --- |
| `id` | path | string | evet |  |

**Örnek istek (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")
```

**Komut satırı aracı:** `apidly support` ([CLI başvurusu](/docs/cli))

**Örnek yanıt** (200)

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

Hata durumları: `401`, `403`, `404`, `429`.

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

Bir talebi yanıtla

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

**Gereken scope:** `servers`

**Parametreler**

| Ad | Yeri | Tür | Zorunlu | Açıklama |
| --- | --- | --- | --- | --- |
| `id` | path | string | evet |  |

**İstek gövdesi**

| Ad | Tür | Zorunlu | Açıklama |
| --- | --- | --- | --- |
| `message` | string | evet |  |

**Örnek istek (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")
```

**Komut satırı aracı:** `apidly support` ([CLI başvurusu](/docs/cli))

**Örnek yanıt** (201)

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

Hata durumları: `400`, `401`, `403`, `404`, `409`, `429`.

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

Bir talebi kapat

**Gereken scope:** `servers`

**Parametreler**

| Ad | Yeri | Tür | Zorunlu | Açıklama |
| --- | --- | --- | --- | --- |
| `id` | path | string | evet |  |

**Örnek istek (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")
```

**Komut satırı aracı:** `apidly support` ([CLI başvurusu](/docs/cli))

**Örnek yanıt** (200)

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

Hata durumları: `401`, `403`, `404`, `429`.
