# List tickets

`GET /v1/projects/{project_id}/tickets`

Requires role member or higher.

## Authentication

A session token: `Authorization: Bearer <session token>`, or the session cookie in the browser. Requires role `member` or higher.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `cursor` | query | string | no |  |
| `limit` | query | integer | no |  |
| `severity` | query |  | no |  |
| `group_id` | query | string | no | Only this group's tickets; a group of another project is 422. |
| `reference` | query | boolean | no | true: only the tickets marked as a reference; false: only the others. |
| `project_id` | path | string | yes |  |

## Responses

### 200

Tickets, newest first.

`application/json`

```json
{
  "additionalProperties": false,
  "description": "Tickets, newest first.",
  "properties": {
    "data": {
      "items": {
        "additionalProperties": false,
        "description": "A ticket without its text and facts.",
        "properties": {
          "category": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "delivery": {
            "anyOf": [
              {
                "enum": [
                  "immediate"
                ],
                "type": "string"
              },
              {
                "enum": [
                  "digest"
                ],
                "type": "string"
              }
            ]
          },
          "group_id": {
            "pattern": "^grp_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "type": "string"
          },
          "id": {
            "pattern": "^tkt_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "type": "string"
          },
          "reason": {
            "anyOf": [
              {
                "enum": [
                  "new"
                ],
                "type": "string"
              },
              {
                "enum": [
                  "spike"
                ],
                "type": "string"
              },
              {
                "enum": [
                  "regression"
                ],
                "type": "string"
              },
              {
                "enum": [
                  "recurrence"
                ],
                "type": "string"
              }
            ]
          },
          "reference_marked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the team marked this ticket as a reference; null if it is not one. Marking does not change the ticket or its retention."
          },
          "severity": {
            "anyOf": [
              {
                "enum": [
                  "critical"
                ],
                "type": "string"
              },
              {
                "enum": [
                  "high"
                ],
                "type": "string"
              },
              {
                "enum": [
                  "medium"
                ],
                "type": "string"
              },
              {
                "enum": [
                  "low"
                ],
                "type": "string"
              }
            ]
          },
          "source": {
            "anyOf": [
              {
                "enum": [
                  "llm"
                ],
                "type": "string"
              },
              {
                "enum": [
                  "template"
                ],
                "type": "string"
              }
            ]
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "group_id",
          "reason",
          "severity",
          "category",
          "delivery",
          "source",
          "title",
          "created_at",
          "reference_marked_at"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "data",
    "next_cursor"
  ],
  "type": "object"
}
```

### 401

unauthorized: no valid session, or the email is not verified.

Problem type: [unauthorized](https://docs.dlogify.com/errors/unauthorized.md).

### 404

not-found: the resource does not exist, or the caller is not a member of its organization.

Problem type: [not-found](https://docs.dlogify.com/errors/not-found.md).

### 422

validation-failed: the request does not match the schema.

Problem type: [validation-failed](https://docs.dlogify.com/errors/validation-failed.md).

### 429

rate-limited: per-user management request limit.

Problem type: [rate-limited](https://docs.dlogify.com/errors/rate-limited.md).

## Example

```bash
curl -X GET "https://api.dlogify.com/v1/projects/{project_id}/tickets" \
  -H "Authorization: Bearer $DLOGIFY_SESSION"
```

Source: https://docs.dlogify.com/api/tickets/listTickets
