> ## Documentation Index
> Fetch the complete documentation index at: https://sentrydocs.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Issues & Events

> Query and update issues and events via the API

Issues (also called "groups") are aggregated error occurrences. Events are the individual error instances that make up an issue. Use these endpoints to list, filter, update, and delete issues, and to retrieve individual events.

***

## List issues for an organization

```
GET /api/0/organizations/{organization_id_or_slug}/issues/
```

Returns a paginated list of issues for the organization. By default, only `unresolved` issues are returned.

**Required scope:** `event:read`

### Query parameters

<ParamField query="query" type="string">
  A Sentry structured search query. For example, `is:unresolved assigned:me` or `is:ignored`. If omitted, defaults to `is:unresolved`.
</ParamField>

<ParamField query="status" type="string">
  Filter by status. One of `resolved`, `unresolved`, or `ignored`.
</ParamField>

<ParamField query="assignee" type="string">
  Filter by assignee. Use a username, user ID, or team name (prefixed with `#`).
</ParamField>

<ParamField query="project" type="integer">
  Filter by project ID. Can be repeated for multiple projects.
</ParamField>

<ParamField query="environment" type="string">
  Filter issues to a specific environment, e.g. `production`.
</ParamField>

<ParamField query="statsPeriod" type="string">
  The time window for stats included in the response. One of `24h` (default), `14d`, or `""` (disabled).
</ParamField>

<ParamField query="cursor" type="string">
  Pagination cursor. Use the value from the `Link` response header to fetch the next or previous page.
</ParamField>

### Example request

```bash theme={null}
curl "https://sentry.io/api/0/organizations/my-org/issues/?query=is:unresolved&environment=production" \
  -H "Authorization: Bearer sntrys_TOKEN"
```

### Example response

```json theme={null}
[
  {
    "id": "1",
    "shortId": "PUMP-STATION-1",
    "title": "This is an example Python exception",
    "culprit": "raven.scripts.runner in main",
    "level": "error",
    "status": "unresolved",
    "firstSeen": "2018-11-06T21:19:55Z",
    "lastSeen": "2018-11-06T21:19:55Z",
    "count": "1",
    "userCount": 0,
    "assignedTo": null,
    "isBookmarked": false,
    "isSubscribed": true,
    "isPublic": false,
    "project": {
      "id": "2",
      "name": "Pump Station",
      "slug": "pump-station"
    }
  }
]
```

***

## Retrieve an issue

```
GET /api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/
```

Returns detailed information about a single issue, including activity history, participant list, and event stats.

**Required scope:** `event:read`

### Path parameters

<ParamField path="organization_id_or_slug" type="string" required>
  The numeric ID or slug of the organization.
</ParamField>

<ParamField path="issue_id" type="string" required>
  The numeric ID of the issue.
</ParamField>

### Example request

```bash theme={null}
curl https://sentry.io/api/0/organizations/my-org/issues/1/ \
  -H "Authorization: Bearer sntrys_TOKEN"
```

### Example response

```json theme={null}
{
  "id": "1",
  "shortId": "PUMP-STATION-1",
  "title": "This is an example Python exception",
  "culprit": "raven.scripts.runner in main",
  "level": "error",
  "status": "unresolved",
  "statusDetails": {},
  "firstSeen": "2018-11-06T21:19:55Z",
  "lastSeen": "2018-11-06T21:19:55Z",
  "count": "1",
  "userCount": 0,
  "userReportCount": 0,
  "numComments": 0,
  "assignedTo": null,
  "isBookmarked": false,
  "isSubscribed": true,
  "isPublic": false,
  "project": {
    "id": "2",
    "name": "Pump Station",
    "slug": "pump-station"
  },
  "activity": [
    {
      "id": "0",
      "type": "first_seen",
      "data": {},
      "dateCreated": "2018-11-06T21:19:55Z",
      "user": null
    }
  ]
}
```

### Response fields

<ResponseField name="id" type="string">
  The numeric issue ID, returned as a string.
</ResponseField>

<ResponseField name="shortId" type="string">
  A short, human-readable ID that includes the project slug, e.g. `MY-PROJECT-123`.
</ResponseField>

<ResponseField name="title" type="string">
  The issue title, derived from the exception or error message.
</ResponseField>

<ResponseField name="level" type="string">
  The severity level: `fatal`, `error`, `warning`, `info`, or `debug`.
</ResponseField>

<ResponseField name="status" type="string">
  Current status: `unresolved`, `resolved`, or `ignored`.
</ResponseField>

<ResponseField name="firstSeen" type="string">
  ISO 8601 timestamp of when Sentry first saw this issue.
</ResponseField>

<ResponseField name="lastSeen" type="string">
  ISO 8601 timestamp of the most recent event for this issue.
</ResponseField>

<ResponseField name="count" type="string">
  Total number of events in this issue, returned as a string.
</ResponseField>

<ResponseField name="userCount" type="integer">
  Number of distinct users who have experienced this issue.
</ResponseField>

<ResponseField name="assignedTo" type="string | null">
  Username or team name of the current assignee, or `null` if unassigned.
</ResponseField>

<ResponseField name="activity" type="array">
  A log of state changes and comments on the issue.
</ResponseField>

***

## Update an issue

```
PUT /api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/
```

Updates attributes on a single issue. Only the fields you include in the request body are changed.

**Required scope:** `event:write`

### Request body

<ParamField body="status" type="string">
  The new status for the issue. One of `resolved`, `resolvedInNextRelease`, `unresolved`, or `ignored`.
</ParamField>

<ParamField body="statusDetails" type="object">
  Additional context about the resolution. Relevant when `status` is `resolved` or `ignored`.

  <Expandable title="statusDetails fields">
    <ParamField body="inRelease" type="string">
      The version of the release in which this issue is resolved.
    </ParamField>

    <ParamField body="inNextRelease" type="boolean">
      Set to `true` to resolve the issue in the next release based on last seen version.
    </ParamField>

    <ParamField body="inCommit" type="string">
      The commit hash where the issue was resolved.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="assignedTo" type="string">
  The username or team name to assign the issue to. Use `""` to unassign.
</ParamField>

<ParamField body="hasSeen" type="boolean">
  Mark the issue as seen or unseen for the authenticated user.
</ParamField>

<ParamField body="isBookmarked" type="boolean">
  Bookmark or unbookmark the issue for the authenticated user.
</ParamField>

<ParamField body="isSubscribed" type="boolean">
  Subscribe or unsubscribe the authenticated user from workflow notifications.
</ParamField>

<ParamField body="isPublic" type="boolean">
  Make the issue publicly viewable (`true`) or private (`false`).
</ParamField>

### Example: resolve an issue

```bash theme={null}
curl -X PUT https://sentry.io/api/0/organizations/my-org/issues/12345/ \
  -H "Authorization: Bearer sntrys_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"status": "resolved"}'
```

### Example: assign an issue

```bash theme={null}
curl -X PUT https://sentry.io/api/0/organizations/my-org/issues/12345/ \
  -H "Authorization: Bearer sntrys_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"assignedTo": "jane@example.com"}'
```

### Example: ignore an issue for 30 minutes

```bash theme={null}
curl -X PUT https://sentry.io/api/0/organizations/my-org/issues/12345/ \
  -H "Authorization: Bearer sntrys_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"status": "ignored", "statusDetails": {"ignoreDuration": 30}}'
```

***

## Delete an issue

```
DELETE /api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/
```

Permanently removes an issue and all of its events. This action cannot be undone.

**Required scope:** `event:admin`

Returns `202 Accepted` on success.

***

## List project issues

```
GET /api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/issues/
```

Returns a list of issues scoped to a specific project.

**Required scope:** `event:read`

<Note>
  This endpoint is deprecated. Use `GET /api/0/organizations/{org}/issues/` with a `project` query parameter instead. The organization-level endpoint supports all the same filters and additional functionality.
</Note>

### Query parameters

<ParamField query="query" type="string">
  A structured search query. Defaults to `is:unresolved` if not provided.
</ParamField>

<ParamField query="statsPeriod" type="string">
  Time window for issue stats. One of `24h` (default), `14d`, or `""` (disabled).
</ParamField>

<ParamField query="cursor" type="string">
  Pagination cursor from the `Link` response header.
</ParamField>

***

## Retrieve an event

```
GET /api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/events/{event_id}/
```

Returns the full data for a single event, including the exception, stack trace, breadcrumbs, and tags.

**Required scope:** `event:read`

### Path parameters

<ParamField path="event_id" type="string" required>
  The UUID of the event.
</ParamField>

### Example request

```bash theme={null}
curl https://sentry.io/api/0/projects/my-org/my-project/events/abc123/ \
  -H "Authorization: Bearer sntrys_TOKEN"
```

***

## List issue hashes

```
GET /api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/hashes/
```

Returns the fingerprint hashes that are grouped into this issue. Each hash represents a unique event fingerprint that Sentry has bucketed under this issue.

**Required scope:** `event:read`

### Example request

```bash theme={null}
curl https://sentry.io/api/0/organizations/my-org/issues/12345/hashes/ \
  -H "Authorization: Bearer sntrys_TOKEN"
```

### Example response

```json theme={null}
[
  {
    "id": "9999aaaabbbbcccc",
    "latestEvent": {
      "eventID": "9999aaaabbbbcccc11112222",
      "groupID": "12345",
      "title": "This is an example Python exception"
    }
  }
]
```
