# Update a ticket type

```http
PATCH https://trydimmi.com/api/v1/ticket-types/{type}
```

## Authorization

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

## Path parameters

- `type` (string, required): Id of the ticket type, starting with tktt_, such as tktt_01jx2m8k4t. Find it with GET /ticket-types.

## Body

- `ai_auto_fill` (boolean): true to let the AI save its proposed values straight into every empty field of new tickets of this type; false to keep them as suggestions a teammate accepts, except for fields that have ai_auto on.
- `auto_resolve_days` (integer): A number of days, such as 7.
- `auto_resolve_message` (string): The message sent in the ticket's conversation when a waiting ticket of this type is resolved on its own after auto_resolve_days, such as "We closed this as we did not hear back." At most 2000 characters. When updating, send null to send no message.
- `company_sharing` (boolean): true to let verified customers also see tickets of this type opened by others in their own company; false to show each customer only their own.
- `customer_visible` (boolean): true to let customers open tickets of this type and see them; false to keep the type for the team only. A new type of kind customer starts with true, other kinds with false.
- `default_resolved_state_id` (string): Id of the ticket state, starting with tkts_, such as tkts_01jx2m8k4t. Find it with GET /ticket-states.
- `default_state_id` (string): Id of the ticket state, starting with tkts_, such as tkts_01jx2m8k4t. Find it with GET /ticket-states.
- `description` (string): The description of the ticket type, at most 500 characters.
- `icon` (string): An icon as one emoji, such as 📦.
- `inbox_id` (string): Id of the inbox, starting with inbox_, such as inbox_01jx2m8k4t. Find it with GET /inboxes.
- `kind` (string): What the type is for: customer (a customer's request tied to a conversation), back_office (work for another team) or tracker (gathers many reports of one problem), such as "customer". It is set when the type is added and never changes; when updating, a value sent here is ignored. One of: `customer`, `back_office`, `tracker`.
- `move_tickets` (object[] | null): When state_ids drops a state that still holds tickets of this type, where those tickets go: a list of objects with the dropped state and one of the kept states, such as [{"from_state_id": "tkts_...", "to_state_id": "tkts_..."}].
  - `from_state_id` (string, required): Id of a state that state_ids no longer lists, so the ticket type no longer uses it, but that still holds tickets of this type which must move. Starts with tkts_, such as tkts_01jx2m8k4t. Find it with GET /ticket-states.
  - `to_state_id` (string, required): Id of the state those tickets move to, one of the states state_ids keeps, starting with tkts_, such as tkts_01jx2m8k4t. Find it with GET /ticket-states.
- `name` (string): The name of the ticket type, at most 60 characters.
- `reopen_days` (integer): A number of days, such as 7.
- `state_ids` (string[] | null): Ids of ticket states, as a list, such as ["tkts_01jx2m8k4t"]. Find them with GET /ticket-states.
- `team_id` (string): Id of the team, starting with team_, such as team_01jx2m8k4t. Find it with GET /teams.

## Response 200 (OK)

- `data` (object, required)
  - `ai_auto_fill` (boolean, required): True when the AI fills in fields on this type's tickets.
  - `archived_at` (string | null, required): When the type was archived: no new tickets can use it, old ones keep it. Null while it is in use.
  - `auto_resolve_days` (integer | null, required): Days a ticket waits on the customer before it resolves itself, 1 to 90. Null when tickets never resolve themselves.
  - `auto_resolve_message` (string | null, required): Message sent to the customer in the ticket's conversation when the ticket resolves itself, up to 2000 characters. Null when none is sent.
  - `company_sharing` (boolean, required): True when everyone at the requester's company sees tickets of this type.
  - `customer_visible` (boolean, required): True when the messenger and customer portal show this type.
  - `default_resolved_state_id` (string | null, required): Id of the resolved state tickets of this type move to by default, such as tkts_.... Null when none is set.
  - `default_state_id` (string | null, required): Id of the state new tickets of this type start in, such as tkts_.... Null when none is set.
  - `description` (string, required): What this type is for, up to 500 characters. Empty when none is set.
  - `fields` (object[] | null, required): The type's fields, each with its key, data type and when it is required.
    - `ai_auto` (boolean, required): True when the AI may fill this field in by itself.
    - `ai_hint` (string | null, required): Guidance telling the AI how to fill this field, up to 500 characters. Null when none is set.
    - `archived_at` (string | null, required): When the field was archived: hidden from new work but kept on old tickets. Null while it is in use.
    - `currency` (string | null, required): Three-letter uppercase currency code for a currency field, such as USD. Null when none is set.
    - `data_type` (string, required): The type of value the field holds: short_text, long_text, number, decimal, currency, boolean, date, single_choice, multiple_choice, file, member or company.
    - `description` (string, required): Help text explaining the field, up to 300 characters. Empty when none is set.
    - `editable_customer` (boolean, required): True when the customer may change this field's value.
    - `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.
    - `key` (string, required): The field's key within its type, lowercase letters, digits and underscores, such as order_number. Use it as the key in a ticket's fields object.
    - `label` (string, required): The field's name as people see it, 1 to 80 characters.
    - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
    - `options` (string[] | null, required): The choices of a single_choice or multiple_choice field, as a list of strings. Empty for fields without choices.
    - `position` (integer, required): The field's place in its type's field order, lower first.
    - `required_create` (boolean, required): True when a teammate must give this field a value to create a ticket.
    - `required_create_customer` (boolean, required): True when a customer must give this field a value to create a ticket.
    - `required_resolve` (boolean, required): True when the field must have a value before the ticket can be resolved.
    - `show_when` (object, required)
      - `equals` (string[] | null): Values of the other field under which this one shows. Left out when any value is enough.
      - `field` (string, required): Key of the other ticket field that must have a value for this one to show.
    - `type_id` (string, required): Id of the ticket type the field belongs to, such as tktt_.... Send it wherever a ticket type is asked for.
    - `visible_customer` (boolean, required): True when the customer sees this field on their ticket.
  - `icon` (string, required): Name of the type's icon, lowercase with dashes, such as ticket.
  - `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.
  - `inbox_id` (string | null, required): Id of the inbox tickets of this type go to by default, such as inbox_.... Null when none is set.
  - `kind` (string, required): What tickets of this type are: customer (a customer's request), back_office (work for another team) or tracker (many reports of one problem).
  - `name` (string, required): The type's name, 1 to 60 characters.
  - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
  - `open_tickets` (integer, required): How many tickets of this type are open now.
  - `position` (integer, required): The type's place in the workspace's order of types, lower first.
  - `reopen_days` (integer, required): Days a resolved ticket can still be reopened, 0 to 90.
  - `state_ids` (string[] | null, required): Ids of the states this type may use, in its order, such as tkts_.... A ticket of this type can only move to one of these.
  - `team_id` (string | null, required): Id of the team tickets of this type go to by default, such as team_.... Null when none is set.
  - `tickets_by_state` (object, required): Count of this type's tickets in each state, trashed ones included, keyed by state id, such as {"tkts_...": 12}.
  - `total_tickets` (integer, required): How many tickets of this type exist in all.

## 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-types/{type}' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "ai_auto_fill": true,
  "auto_resolve_days": 123,
  "auto_resolve_message": "<string>",
  "company_sharing": true,
  "customer_visible": true,
  "default_resolved_state_id": "<string>",
  "default_state_id": "<string>",
  "description": "<string>",
  "icon": "<string>",
  "inbox_id": "<string>",
  "kind": "customer",
  "move_tickets": [
    {
      "from_state_id": "<string>",
      "to_state_id": "<string>"
    }
  ],
  "name": "<string>",
  "reopen_days": 123,
  "state_ids": [
    "<string>"
  ],
  "team_id": "<string>"
}'
```

## Example response

```json
{
  "data": {
    "ai_auto_fill": true,
    "archived_at": "2026-11-01T09:30:00Z",
    "auto_resolve_days": 123,
    "auto_resolve_message": "<string>",
    "company_sharing": true,
    "customer_visible": true,
    "default_resolved_state_id": "<string>",
    "default_state_id": "<string>",
    "description": "<string>",
    "fields": [
      {
        "ai_auto": true,
        "ai_hint": "<string>",
        "archived_at": "2026-11-01T09:30:00Z",
        "currency": "<string>",
        "data_type": "<string>",
        "description": "<string>",
        "editable_customer": true,
        "id": "<string>",
        "key": "<string>",
        "label": "<string>",
        "object": "<string>",
        "options": [
          "<string>"
        ],
        "position": 123,
        "required_create": true,
        "required_create_customer": true,
        "required_resolve": true,
        "show_when": {
          "equals": [],
          "field": "<string>"
        },
        "type_id": "<string>",
        "visible_customer": true
      }
    ],
    "icon": "<string>",
    "id": "<string>",
    "inbox_id": "<string>",
    "kind": "<string>",
    "name": "<string>",
    "object": "<string>",
    "open_tickets": 123,
    "position": 123,
    "reopen_days": 123,
    "state_ids": [
      "<string>"
    ],
    "team_id": "<string>",
    "tickets_by_state": {
      "<key>": 123
    },
    "total_tickets": 123
  }
}
```

---

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