## GET /api/v2/support/tickets

**List support tickets**

Return support ticket summaries visible to the account. Use `data[].id` from this endpoint to fetch details, add replies, close, or reopen a ticket. List summaries intentionally omit `body`, `attachments`, and `messages`; use `GET /api/v2/support/tickets/{id}` for the conversation.

### Related Endpoints

- `POST /api/v2/support/tickets`: Create support ticket
- `GET /api/v2/support/tickets/{id}`: Get support ticket
- `POST /api/v2/support/tickets/{id}/messages`: Reply to support ticket

### Headers

- `Accept`: application/json
- `Authorization`: Bearer YOUR_API_KEY
- Required API scope: `read:support`

### Parameters

- `limit` (query, integer) [min: 1, max: 100]: Maximum support tickets to return in this page.
- `cursor` (query, string): Opaque cursor from `nextCursor` for the next page.
- `status` (query, string): Filter tickets by normalized status.
  Allowed values: open, answered, customer_reply, in_progress, on_hold, closed
- `departmentSlug` (query, string): Customer-facing support department slug. Discover valid values from GET /api/v2/support/departments; do not guess slugs from department names. Example: `general-web-hosting`

### Request Example

```bash
curl -X GET "https://cloud.hostup.se/api/v2/support/tickets" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
```

### Response Schema

- `data` (array<object>, optional)
- `data[].id` (string, required) Example: `tkt_01hxa3b4c5d6e7f8g9h0j1k2m3`
- `data[].number` (string, required): Customer-facing support ticket number. Normally numeric; public IDs are exposed separately as id. Example: `149943`
- `data[].subject` (string,null, required) Example: `Question about my VPS`
- `data[].status` (string, required) Example: `open`
  Allowed values: open, answered, customer_reply, in_progress, on_hold, closed, unknown
- `data[].priority` (string, required) Example: `low`
  Allowed values: low, medium, high, urgent, critical
- `data[].departmentSlug` (string, required) Example: `billing`
- `data[].departmentName` (string,null, required) Example: `Billing`
- `data[].createdAt` (string,null, required) Example: `2026-04-27T11:45:00.000Z`
- `data[].updatedAt` (string,null, required) Example: `2026-04-27T12:05:00.000Z`
- `data[].lastMessageAt` (string,null, required) Example: `2026-04-27T12:05:00.000Z`
- `data[].ccEmails` (array<string>, required) Example: `["ops@example.com"]`
- `data[].requesterName` (string,null, required) Example: `Jane Example`
- `data[].messageCount` (integer, required) Example: `2`
- `data[].linkedServices` (array<object>, required)
- `data[].linkedServices[].serviceType` (string, required) Example: `vps`
- `data[].linkedServices[].serviceId` (string,null, required) Example: `vps_01hxa3b4c5d6e7f8g9h0j1k2m3`
- `data[].linkedServices[].serviceName` (string,null, required) Example: `app-01`
- `data[].linkedServices[].details` (object,null, required) Example: `{"status":"active","planName":"VPS XS","ipAddress":"192.0.2.10"}`
- `hasMore` (boolean, optional) Example: `false`
- `nextCursor` (string,null, optional) Example: `null`

### Responses

#### 200 - Cursor-paginated list.
```json
{
  "data": [
    {
      "id": "tkt_01hxa3b4c5d6e7f8g9h0j1k2m3",
      "number": "149943",
      "subject": "Question about my hosting account",
      "status": "answered",
      "priority": "low",
      "departmentSlug": "general-web-hosting",
      "departmentName": "General - Web hosting",
      "createdAt": "2026-04-27T11:45:00.000Z",
      "updatedAt": "2026-04-27T12:05:00.000Z",
      "lastMessageAt": "2026-04-27T12:05:00.000Z",
      "ccEmails": [],
      "requesterName": "Jane Example",
      "messageCount": 2,
      "linkedServices": [
        {
          "serviceType": "hosting",
          "serviceId": "acct_01hxa3b4c5d6e7f8g9h0j1k2m3",
          "serviceName": "example.com",
          "details": {
            "status": "Active",
            "hostname": "example.com",
            "nextDueAt": "2026-04-27T12:34:56.000Z",
            "autoRenew": true
          }
        }
      ]
    }
  ],
  "hasMore": false,
  "nextCursor": null
}
```

#### 400 - Invalid request. The response body is an RFC 7807 Problem Details document.
```json
{
  "type": "https://developer.hostup.se/errors/invalid_request",
  "title": "Invalid request",
  "status": 400,
  "detail": "The request body failed validation.",
  "code": "invalid_request",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z",
  "errors": [
    {
      "pointer": "/items/0/domainName",
      "detail": "`domainName` is required.",
      "code": "invalid_request"
    }
  ]
}
```

#### 401 - Unauthorized. Authentication is required.
```json
{
  "type": "https://developer.hostup.se/errors/unauthorized",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Authentication is required.",
  "code": "unauthorized",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```

#### 403 - Forbidden. The caller lacks a required scope or does not own the resource.
```json
{
  "type": "https://developer.hostup.se/errors/forbidden",
  "title": "Forbidden",
  "status": 403,
  "detail": "The caller lacks a required scope or does not own the resource.",
  "code": "forbidden",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```

#### 404 - Not found. The resource does not exist or is not owned by the caller.
```json
{
  "type": "https://developer.hostup.se/errors/not_found",
  "title": "Not found",
  "status": 404,
  "detail": "The requested resource could not be found.",
  "code": "not_found",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```

#### 429 - Rate limited. Retry after the limit resets. 429 responses include `Retry-After` seconds plus `X-RateLimit-*` headers.
```json
{
  "type": "https://developer.hostup.se/errors/rate_limit_exceeded",
  "title": "Too many requests",
  "status": 429,
  "detail": "Too many requests. Retry after the limit resets.",
  "code": "rate_limit_exceeded",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```

#### 500 - Internal error. Retry later or contact support if the issue persists.
```json
{
  "type": "https://developer.hostup.se/errors/internal_error",
  "title": "Internal server error",
  "status": 500,
  "detail": "An unexpected error occurred. Retry later or contact support if the issue persists.",
  "code": "internal_error",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```
