# Issues

> To-dos extracted from customer conversations — list, create, dedupe, update.

Issues are the structured backlog GetResolved builds from your customer conversations. Each issue has a UUID and a human-readable `shortcode` (e.g. `GET-005`). Both can be used as the `{id}` path parameter.

## GET /issues

List issues across one or more products.

```bash
curl "https://app.getresolved.ai/api/v1/issues?status=pending,in_progress&priority=high,urgent" \
  -H "Authorization: Bearer gr_..."
```

**Query parameters**

- `product_id` — restrict to one product
- `status` — comma-separated: `pending`, `in_progress`, `icebox`, `done`, `released`, `dismissed`
- `priority` — comma-separated: `low`, `normal`, `high`, `urgent`
- `assignee_id` — comma-separated member ids, or the literal string `none` for unassigned
- `limit` — default 50, max 200
- `offset` — default 0

## POST /issues

Create an issue. The `shortcode` is generated automatically.

```bash
curl https://app.getresolved.ai/api/v1/issues \
  -H "Authorization: Bearer gr_..." \
  -H "Content-Type: application/json" \
  -d '{
    "product_id": "prd_123",
    "title": "Filter dropdown closes when scrolling",
    "priority": "high"
  }'
```

**Body**

- `product_id` (required)
- `title` (required)
- `description` (optional)
- `status` (optional, default `pending`)
- `priority` (optional, default `normal`)
- `assignee_id` (optional)

Returns `201` with the created issue.

## POST /issues/maybe

Deduplicating create. The same body as `POST /issues`, but GetResolved first asks an AI to compare the candidate against pending and in-progress issues for the product (matching across paraphrasing and translation).

- **Match found** — returns `200` with `{ data: <existing_issue>, matched_existing: true, api_source_id }`.
- **No match** — creates the issue and returns `201` with `{ data: <new_issue>, matched_existing: false, api_source_id }`.

Either way, the request is logged in `issue_api_sources` for provenance.

```bash
curl https://app.getresolved.ai/api/v1/issues/maybe \
  -H "Authorization: Bearer gr_..." \
  -H "Content-Type: application/json" \
  -d '{
    "product_id": "prd_123",
    "title": "Search results vanish when typing fast"
  }'
```

## GET /issues/{id}

Get an issue with its linked conversations. `{id}` accepts the UUID or the shortcode.

```bash
curl https://app.getresolved.ai/api/v1/issues/GET-005 \
  -H "Authorization: Bearer gr_..."
```

## PATCH /issues/{id}

Update an issue. `{id}` accepts the UUID or the shortcode.

```bash
curl -X PATCH https://app.getresolved.ai/api/v1/issues/GET-005 \
  -H "Authorization: Bearer gr_..." \
  -H "Content-Type: application/json" \
  -d '{
    "status": "in_progress",
    "assignee_id": "me"
  }'
```

**Body**

- `status` (optional)
- `priority` (optional)
- `assignee_id` (optional) — a member id, the literal string `"me"` to assign to the API key's owning member, or `null` to unassign
- `resolution_comment` (optional) — a string, or `null` to clear

## Quickstart recipes

```bash
# List pending issues
curl "https://app.getresolved.ai/api/v1/issues?status=pending" -H "Authorization: Bearer gr_..."

# Start working
curl -X PATCH https://app.getresolved.ai/api/v1/issues/GET-005 \
  -H "Authorization: Bearer gr_..." -H "Content-Type: application/json" \
  -d '{"status":"in_progress"}'

# Leave a fix note and mark done
curl -X PATCH https://app.getresolved.ai/api/v1/issues/GET-005 \
  -H "Authorization: Bearer gr_..." -H "Content-Type: application/json" \
  -d '{"status":"done","resolution_comment":"fixed in v2.4"}'
```

