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

# Update a ticket

> Change a FlowIQ ticket from your own system: move its status, add a note, record who picked it up.

A ticket is raised when the AI hands a conversation to your team. When that work is tracked in another system as well (a CRM case, a helpdesk), use this endpoint to keep the FlowIQ ticket in step: mark it in progress when someone picks the case up, add notes, and resolve it when the case closes.

To read tickets, use [`list_tickets` / `get_ticket`](https://docs.flowapt.com/flowiq-api-reference/reporting-api#syncing-your-tickets). To be told when a ticket changes in FlowIQ, register a [ticket webhook](https://docs.flowapt.com/flowiq-api-reference/ticket-webhooks.md).

## Request

```
PATCH https://api.flowiq.live/v1/tickets/{ticket}
```

`POST` to the same address works too.

`{ticket}` is the ticket's `id`, or its number as your team sees it, for example `FLW-261122-001` (any case). If FlowIQ opened a case in your system for the ticket, the number is the `externalCaseNumber` it sent you.

Use an organisation API key with **write** permission (Settings, API Keys) as a Bearer token. The key decides which account you change; a ticket on another account answers `404`.

| Field | Type | |
| - | - | - |
| `status` | string | `open`, `in_progress`, `resolved` or `closed` |
| `note` | string, up to 1,000 characters | Added to the ticket's Notes as a dated line. With `resolved` / `closed` it is also the resolution note |
| `assigned_to` | string, up to 120 characters | The person in **your** system who picked the case up. Shown on the ticket as "Assigned to …" |
| `case_closed` | boolean | Only with `resolved` / `closed`: the case is already closed in your system, so FlowIQ does not send its own close back to you |

Send at least one of `status`, `note` or `assigned_to`.

```bash theme={null}
curl -X PATCH "https://api.flowiq.live/v1/tickets/FLW-261122-001" \
  -H "Authorization: Bearer fiq_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: case-50000100124-assigned" \
  -d '{ "status": "in_progress", "assigned_to": "Sam Smith" }'
```

## What FlowIQ does

* **Status:** the ticket moves and the change is recorded in its status history (`by: "api"`). Resolving stamps `resolved_at`; moving a resolved ticket back to `open` or `in_progress` counts as a reopen.
* **Notes:** `note` and `assigned_to` are written into the ticket's Notes, one line per call, for example `[2026-11-22 19:45, API] Assigned to Sam Smith`. That is what the team sees on the ticket in FlowIQ.
* **The AI:** if the account switches the AI back on when a ticket is resolved, resolving through this endpoint does the same.
* **Nothing is sent to the customer.**
* The change fires the usual [ticket webhooks](https://docs.flowapt.com/flowiq-api-reference/ticket-webhooks.md) (`ticket.updated`, `ticket.status_changed`, `ticket.resolved`, …).

Sending the status the ticket already has, with no note, changes nothing and answers `"updated": false`.

## Response

```json theme={null}
{
  "organization_id": "1d44e4c4-…",
  "updated": true,
  "changes": ["status", "notes", "external_assignee"],
  "previous_status": "open",
  "ai_reenabled": false,
  "ticket": {
    "id": "06dd19ac-b6f9-450d-9734-639ccf85ade0",
    "ticket_number": "FLW-261122-001",
    "status": "in_progress",
    "notes": "[2026-11-22 19:45, API] Assigned to Sam Smith",
    "status_history": [
      { "from": "open", "to": "in_progress", "at": "2026-11-22T17:45:00.000Z", "by": "api", "note": "Assigned to Sam Smith" }
    ]
  }
}
```

`ticket` is the full ticket, the same object [`get_ticket`](https://docs.flowapt.com/flowiq-api-reference/reporting-api#syncing-your-tickets) returns (shortened above).

## Errors

| HTTP | `code` | When |
| - | - | - |
| 400 | `validation_error` | A field is missing or malformed; `message` names it |
| 401 | `unauthorized` | Missing or invalid API key |
| 403 | `forbidden_scope` | The key has no **write** permission |
| 404 | `not_found` | No ticket with that id or number on this account |
| 409 / 422 | `idempotency_in_progress` / `idempotency_key_reused` | See [Conventions](https://docs.flowapt.com/flowiq-api-reference/conventions.md) |
| 429 | `rate_limited` | More than 60 changes a minute on one key |

Every answer carries `X-Request-Id`; quote it to support.

## Keeping a CRM case and a FlowIQ ticket in step

| In your system | Call |
| - | - |
| Someone picks the case up | `{ "status": "in_progress", "assigned_to": "Sam Smith" }` |
| A note on the case the FlowIQ team should see | `{ "note": "Courier booked for Friday" }` |
| The case is closed | `{ "status": "resolved", "note": "Replacement delivered", "case_closed": true }` |
| The case is reopened | `{ "status": "open", "note": "Customer says the frame is still loose" }` |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.