# Reorder ticket states

```http
PATCH https://trydimmi.com/api/v1/ticket-states
```

## Authorization

Send an API token as `Authorization: Bearer <token>`.
The token needs: `settings:write`.

## Body

- `state_ids` (string[] | null, required): Ids of ticket states, as a list, such as ["tkts_01jx2m8k4t"]. Find them with GET /ticket-states.

## Response 200 (OK)

- `data` (object[] | null, required): The items, as a list; empty when there are none.
  - `archived_at` (string | null, required): When the state was archived: hidden from new work but kept on old tickets. Null while it is in use.
  - `customer_label` (string, required): What the customer sees when their ticket is in this state, such as We're on it.
  - `group` (string, required): The fixed group that says what the state means: submitted, in_progress, waiting_customer, waiting_team or resolved.
  - `id` (string, required): The id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.
  - `name` (string, required): The state's name as the team sees it, 1 to 60 characters.
  - `notify_customer` (boolean, required): True when moving a ticket into this state tells the customer.
  - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
  - `position` (integer, required): The state's place in the workspace's order of states, lower first.
  - `purpose` (string | null, required): Marks a state dimmi itself moves tickets to: close_loop, being_worked_on, wont_fix or investigating. Null for ordinary states.

## Response default (Error)

- `code` (string, required): Stable code for programs to tell errors apart, such as validation_failed or internal_error.
- `errors` (object): Each rejected field mapped to its messages. Only present when the input was invalid.
- `message` (string, required): What went wrong, in words safe to show a person.

## Example request

```bash
curl --request PATCH \
  --url 'https://trydimmi.com/api/v1/ticket-states' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "state_ids": [
    "<string>"
  ]
}'
```

## Example response

```json
{
  "data": [
    {
      "archived_at": "2026-11-01T09:30:00Z",
      "customer_label": "<string>",
      "group": "<string>",
      "id": "<string>",
      "name": "<string>",
      "notify_customer": true,
      "object": "<string>",
      "position": 123,
      "purpose": "<string>"
    }
  ]
}
```

---

Index of all dimmi docs: https://trydimmi.com/llms.txt (full text: https://trydimmi.com/llms-full.txt)
