# Riferimento API: Supporto

Supporto: ogni operazione dell'API v1 con scope, parametri, esempi in curl, JavaScript e Python e le risposte. Autenticazione, errori, paginazione, limiti di frequenza e idempotenza sono nella [panoramica del riferimento API](/docs/api-reference); vedi anche gli [SDK](/docs/sdks) e la [riga di comando](/docs/cli).

> Provalo con la tua chiave: crea una chiave API nella console, esegui `export APIDLY_API_KEY=...` nel terminale e incolla uno degli esempi curl qui sotto. I valori degli esempi sono indicativi. In questa pagina non c'è alcun campo per inserire una chiave.

Le descrizioni delle operazioni e dei campi provengono dalla definizione dell'API e sono in inglese.

| Operazione | Scope richiesto | Riepilogo |
| --- | --- | --- |
| `GET /support/tickets` | `read` | Ticket di supporto dell'organizzazione, con l'attività più recente per prima |
| `POST /support/tickets` | `servers` | Aprire un ticket di supporto |
| `GET /support/tickets/{id}` | `read` | Un ticket con i suoi messaggi, dal più vecchio |
| `POST /support/tickets/{id}/messages` | `servers` | Rispondere a un ticket |
| `POST /support/tickets/{id}/close` | `servers` | Chiudere un ticket |

### GET /support/tickets

Ticket di supporto dell'organizzazione, con l'attività più recente per prima

**Scope richiesto:** `read`

**Parametri**

| Nome | In | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | no |  |
| `cursor` | query | string | no |  |
| `status` | query | `open` \| `pending` \| `closed` | no |  |

**Richiesta di esempio (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()
```

**Strumento da riga di comando:** `apidly support` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (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"
}
```

Stati di errore: `400`, `401`, `403`, `429`.

### POST /support/tickets

Aprire un ticket di supporto

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 richiesto:** `servers`

**Corpo della richiesta**

| Nome | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- |
| `subject` | string | sì |  |
| `category` | string | no |  |
| `priority` | `low` \| `normal` \| `high` | no |  |
| `message` | string | sì |  |
| `serverId` | string | no |  |

**Richiesta di esempio (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")
```

**Strumento da riga di comando:** `apidly support` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (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"
  }
}
```

Stati di errore: `400`, `401`, `403`, `429`.

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

Un ticket con i suoi messaggi, dal più vecchio

**Scope richiesto:** `read`

**Parametri**

| Nome | In | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- | --- |
| `id` | path | string | sì |  |

**Richiesta di esempio (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")
```

**Strumento da riga di comando:** `apidly support` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (200)

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

Stati di errore: `401`, `403`, `404`, `429`.

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

Rispondere a un ticket

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

**Scope richiesto:** `servers`

**Parametri**

| Nome | In | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- | --- |
| `id` | path | string | sì |  |

**Corpo della richiesta**

| Nome | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- |
| `message` | string | sì |  |

**Richiesta di esempio (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")
```

**Strumento da riga di comando:** `apidly support` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (201)

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

Stati di errore: `400`, `401`, `403`, `404`, `409`, `429`.

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

Chiudere un ticket

**Scope richiesto:** `servers`

**Parametri**

| Nome | In | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- | --- |
| `id` | path | string | sì |  |

**Richiesta di esempio (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")
```

**Strumento da riga di comando:** `apidly support` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (200)

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

Stati di errore: `401`, `403`, `404`, `429`.
