---
title: "Get all tickets"
url: https://docs.gleap.ai/en/reference/rest-api/get-tickets
method: GET
path: "/tickets"
api: "API Reference"
tag: "Ticket"
operationId: "GetTickets"
updatedAt: "2026-11-01T18:40:15.677Z"
language: en
---

# Get all tickets

`GET https://api.gleap.io/v3/tickets`

Get all tickets in a project with support for filtering, sorting, and pagination.

**Filtering:**

-   Filter by type: `type=BUG` or `type=BUG,FEATURE_REQUEST`
-   Filter by status: `status=OPEN`
-   Filter by priority key: `priority=HIGH` or `priority=HIGH,MEDIUM`. Keys are LOW, MEDIUM, HIGH or a board's custom priority key (listed by GET /projects/ticket-types)
-   Filter by archived state: archived tickets are hidden by default; pass `ignoreArchived=true` to include them, or `ignoreArchived=true&archived=true` for archived tickets only
-   Filter by spam: `isSpam=false`
-   Filter the archive by archive date: `startDate` / `endDate` (ISO 8601) narrow the archive, spam and waiting-on-customer views to tickets archived within that range. Ignored on the non-archive views, where `archivedAt` is unset.
-   Filter by update or creation time: `updatedAt>=2026-10-01T00:00:00Z&updatedAt<=2026-10-08T00:00:00Z` (`>=`, `>`, `<=`, `<` work on `updatedAt` and `createdAt`). Use UTC with a `Z` suffix: a `+hh:mm` offset is decoded as a space and matches nothing.

**Never listed:** tickets merged into another ticket as duplicates, and spam unless `isSpam=true`. Without a `type`, only the project's boards (GET /ticket-types) and `BOT` are listed, so tickets whose board was deleted and survey responses need an explicit `type`. For a complete export use GET /tickets/csv-export without `type`.

**Sorting:**

-   Sort by creation date: `sort=-createdAt` (newest first) or `sort=createdAt` (oldest first)
-   Sort by priority: `sort=priority` (most urgent first, in the board's priority order) or `sort=-priority` (least urgent first)
-   Sort by updated date: `sort=-updatedAt`
-   Default sort (no `sort` param): most recent activity first (`lastNotification` descending)
-   Archived, spam and waiting-on-customer views always sort by `archivedAt` descending; a `sort` param is ignored there

**Pagination:**

-   Limit results: `limit=20` (default: 500, max: 500)
-   Skip results: `skip=0` (for pagination: `skip=(page-1)*limit`)

**Retention — read this before building an export:**

-   `type=BOT` conversations (AI conversations that never reached a human) are closed and archived about 3 days after they are created, and permanently deleted 30 days after that. Roughly the last 33 days are available; older AI-only conversations no longer exist and cannot be exported or restored.
-   Every other ticket type is permanently deleted 365 days after it was archived, or after the project's custom archive window if one is configured. Unarchived tickets are never deleted by retention.
-   Projects with "Keep forever" on (Pro and up) keep every archived ticket except `type=BOT` conversations, which still follow the 30-day window.
-   A conversation handed over to a human stops being `type=BOT` (it becomes `INQUIRY` or the type the handover assigns) and from then on follows the longer window above.
-   Ticket history entries have their own 180-day window — see GET /tickets/{ticketId}/history.

## Authorization

- `Authorization` (header, required): `Bearer <token>`

## Headers

- `project` (string, required)

## Example request

```bash
curl --request GET \
  --url https://api.gleap.io/v3/tickets \
  --header 'Authorization: Bearer <token>' \
  --header 'project: <project>'
```

## Responses

### 200 (`application/json`)

Ok

```json
{
  "tickets": [
    {
      "_id": "507f1f77bcf86cd799439011",
      "id": "507f1f77bcf86cd799439011",
      "title": "Login button not working",
      "formData": {
        "description": "Users cannot log in when clicking the login button"
      },
      "type": "BUG",
      "status": "OPEN",
      "priority": "HIGH",
      "createdAt": "2024-01-15T10:30:00.000Z",
      "updatedAt": "2024-01-15T11:45:00.000Z",
      "processingUser": {
        "_id": "507f1f77bcf86cd799439012",
        "email": "support@example.com",
        "firstName": "John",
        "lastName": "Doe"
      },
      "session": {
        "_id": "507f1f77bcf86cd799439013",
        "email": "user@example.com"
      },
      "latestComment": {
        "_id": "507f1f77bcf86cd799439014",
        "data": {
          "content": "Any update on this issue?"
        }
      }
    }
  ],
  "count": 1,
  "totalCount": 42
}
```
