# Update a ticket

```http
PATCH https://trydimmi.com/api/v1/tickets/{ticket}
```

## Authorization

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

## Path parameters

- `ticket` (string, required): Id of the ticket, starting with tkt_, such as tkt_01jx2m8k4t. Find it with GET /tickets.

## Headers

- `If-Match` (string): If-Match: text.

## Body

- `accept_suggestions` (string[] | null): The keys of fields whose AI-suggested value should be saved as the field's value, as a list such as ["order_number", "reason"]. Keys with no suggestion are skipped.
- `assignee_id` (string): Id of the teammate (workspace member), starting with mem_, such as mem_01jx2m8k4t. Find it with GET /members.
- `description` (string): The description of the ticket, at most 20000 characters.
- `fields` (object): A JSON object of field values to change, keyed by the field keys of the ticket's type; other fields stay. A null removes a value. Dates are "YYYY-MM-DD", choices must be among the field's options, such as {"order_number": "A-1042", "reason": null}.
- `priority` (string): How urgent the ticket is: none, low, medium, high or urgent, such as "high". One of: `none`, `low`, `medium`, `high`, `urgent`.
- `sla_policy_id` (string): Id of the SLA policy, starting with sla_, such as sla_01jx2m8k4t. Find it with GET /sla-policies.
- `state_id` (string): Id of the ticket state, starting with tkts_, such as tkts_01jx2m8k4t. Find it with GET /ticket-states.
- `team_id` (string): Id of the team, starting with team_, such as team_01jx2m8k4t. Find it with GET /teams.
- `title` (string): The title of the ticket, at most 200 characters.
- `type_id` (string): Id of the ticket type, starting with tktt_, such as tktt_01jx2m8k4t. Find it with GET /ticket-types.
- `version` (integer): The version number of the ticket you last read, such as 7. When sent, the change is refused if the ticket has changed since. Leave out to change it regardless.

## Response 200 (OK)

- `data` (object, required)
  - `assignee_id` (string | null, required): Id of the teammate who works the ticket, such as mem_...; null when nobody is assigned.
  - `close_loop` (boolean, required): True when the ticket is marked to close the loop with its customers; false by default.
  - `company_id` (string | null, required): Id of the company the ticket belongs to, such as cmp_...; null for none.
  - `contact_id` (string | null, required): Id of the customer the ticket belongs to, such as ctc_...; null for none.
  - `conversation_id` (string | null, required): Id of the conversation a customer ticket is tied to, where its replies live, such as conv_...; null for other kinds.
  - `created_at` (string, required): When it was created, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
  - `created_by_type` (string, required): Who made the ticket: member, contact, agent, workflow, integration or system.
  - `customer_visible` (boolean, required): True when the customer can see the ticket.
  - `deleted_at` (string | null, required): When the ticket was deleted; null while it is live.
  - `description` (string, required): The ticket's description, up to 20000 characters; empty when none was written.
  - `external_id` (string | null, required): The caller's own id for the ticket, unique in the workspace, so a retry finds the ticket it already made; null when none was sent.
  - `fields` (object, required): The ticket's field values, keyed by each field's key; empty when none are set.
  - `group` (string, required): Group of the ticket's state: 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.
  - `impact` (object)
    - `companies` (integer, required): How many companies the tracker reaches through its linked conversations.
    - `conversations` (integer, required): How many conversations are linked to the tracker.
    - `customers` (integer, required): How many customers the tracker reaches through its linked conversations.
    - `revenue` (number, required): Total monthly revenue of the companies reached, read from each company's monthly_spend or mrr attribute; a company with neither counts as 0.
  - `inbox_id` (string, required): Id of the inbox the ticket belongs to, such as inbox_....
  - `issues` (object[] | null, required): The issues in outside trackers that stand behind the ticket; empty for none.
    - `created_at` (string, required): When it was created, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
    - `deployed_at` (string | null, required): When the issue's fix was seen deployed. Null until then.
    - `done_at` (string | null, required): When the issue was seen done in its tool. Null until then.
    - `external_id` (string, required): The issue's or incident's own id in the provider's tool.
    - `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.
    - `installation_id` (string | null, required): Id of the connected integration the issue is read through, such as itg_.... Null when that integration is gone or none is used.
    - `key` (string, required): The issue's short key as its tool shows it, such as ENG-123.
    - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
    - `provider` (string, required): The tool the issue or incident lives in: linear, jira, github, incident_io, rootly or pagerduty.
    - `severity` (string, required): The issue's or incident's severity as the provider names it. Empty when none is known.
    - `status` (string, required): The issue's status as its tool names it, as last seen, such as In Progress. Empty when not yet read.
    - `status_group` (string, required): What dimmi maps the issue's status to: backlog, unstarted, started, done or canceled.
    - `sync_error` (string | null, required): Why the last check of the issue failed. Null when it worked.
    - `synced_at` (string | null, required): When the issue was last checked against its tool. Null when never checked.
    - `team_id` (string, required): The provider's own id of the team the issue belongs to. Empty when not known.
    - `team_name` (string, required): Name of the team the issue belongs to in its tool. Empty when not known.
    - `ticket_id` (string, required): Id of the ticket the issue is linked to, such as tkt_....
    - `title` (string, required): The issue's title as last seen in its tool. Empty when not yet read.
    - `url` (string, required): Web address of the issue in its tool.
    - `warning` (string | null, required): A problem a person should know about, such as a Linear team the app cannot see. Null when there is none.
  - `kind` (string, required): Kind of ticket: customer (tied to one conversation), back_office or tracker.
  - `linked_conversations` (integer, required): How many conversations are linked to the ticket.
  - `links` (object[] | null): The ticket's links to other tickets and conversations. Only present when one ticket is read on its own.
    - `conversation_id` (string | null, required): Id of the conversation the link points to, such as conv_.... Null when the link points to another ticket instead.
    - `created_at` (string, required): When it was created, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
    - `from_ticket_id` (string, required): Id of the ticket the link starts from, such as tkt_....
    - `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.
    - `kind` (string, required): What the link means: back_office (work behind a customer ticket), tracker (a report of a tracked problem), follow_up or related.
    - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
    - `ticket` (object, required)
      - `assignee_id` (string | null, required): Id of the teammate the linked ticket is assigned to, starting with mem_. Null when nobody holds it.
      - `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.
      - `kind` (string, required): The linked ticket's kind: customer, back_office or tracker.
      - `reference` (string, required): The linked ticket's number as the team reads it, such as T-142.
      - `state` (object, required)
        - `customer_label` (string, required): What the customer sees when their ticket is in this state.
        - `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.
      - `title` (string, required): The linked ticket's title.
      - `type_name` (string, required): Name of the linked ticket's type.
      - `updated_at` (string, required): When it last changed, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
    - `to_ticket_id` (string | null, required): Id of the ticket the link points to, such as tkt_.... Null when the link points to a conversation instead.
  - `number` (integer, required): The ticket's number within the workspace; the reference is T- followed by it.
  - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
  - `priority` (string, required): The ticket's priority: none, low, medium, high or urgent.
  - `reference` (string, required): The ticket's reference as the team reads it, such as T-482.
  - `resolved_at` (string | null, required): When the ticket was resolved; null while it is not.
  - `sla_clocks` (object[] | null): The service level clocks on the ticket. Only present when one ticket is read on its own.
    - `breached_at` (string | null, required): When the clock passed its due time unmet; null if it has not.
    - `conversation_id` (string | null, required): Id of the conversation the clock runs on, such as conv_...; null when it runs on a ticket.
    - `due_at` (string, required): When the target must be met, counting only the policy's open hours.
    - `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.
    - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
    - `paused_at` (string | null, required): When the clock was paused; null while it is not paused.
    - `policy_id` (string, required): Id of the service level policy the clock follows, such as sla_....
    - `started_at` (string, required): When the clock started.
    - `state` (string, required): Where the clock stands: running, paused, met, breached or canceled.
    - `stopped_at` (string | null, required): When the clock ended; null while it still runs or is paused.
    - `target` (string, required): What the clock promises: first_reply, next_reply, follow_up or resolution.
    - `ticket_id` (string | null, required): Id of the ticket the clock runs on, such as tkt_...; null when it runs on a plain conversation.
    - `warn_at` (string | null, required): When the team is warned ahead of the due time; null when no warning is set.
  - `sla_policy_id` (string | null, required): Id of the service level policy the ticket follows, such as sla_...; null for none.
  - `state` (object, required)
    - `customer_label` (string, required): What the customer sees when their ticket is in this state.
    - `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.
  - `state_id` (string, required): Id of the ticket's state, such as tkts_.... Send it wherever a ticket state is asked for.
  - `state_since` (string, required): When the ticket entered its current state.
  - `suggestions` (object, required): Field values the AI proposed, keyed by field key, waiting until a person accepts them; empty for none.
  - `team_id` (string | null, required): Id of the team the ticket is assigned to, such as team_...; null for none.
  - `title` (string, required): The ticket's title, up to 200 characters.
  - `type` (object, required)
    - `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.
    - `kind` (string, required): What the ticket is: customer, back_office or tracker.
    - `name` (string, required): The ticket type's name.
  - `type_id` (string, required): Id of the ticket's type, such as tktt_.... Send it wherever a ticket type is asked for.
  - `updated_at` (string, required): When it last changed, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
  - `version` (integer, required): Number that goes up on every change. Send it back when editing so an edit made against an older copy is refused.

## 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/tickets/{ticket}' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "accept_suggestions": [
    "<string>"
  ],
  "assignee_id": "<string>",
  "description": "<string>",
  "fields": {
    "<key>": null
  },
  "priority": "none",
  "sla_policy_id": "<string>",
  "state_id": "<string>",
  "team_id": "<string>",
  "title": "<string>",
  "type_id": "<string>",
  "version": 123
}'
```

## Example response

```json
{
  "data": {
    "assignee_id": "<string>",
    "close_loop": true,
    "company_id": "<string>",
    "contact_id": "<string>",
    "conversation_id": "<string>",
    "created_at": "2026-11-01T09:30:00Z",
    "created_by_type": "<string>",
    "customer_visible": true,
    "deleted_at": "2026-11-01T09:30:00Z",
    "description": "<string>",
    "external_id": "<string>",
    "fields": {
      "<key>": null
    },
    "group": "<string>",
    "id": "<string>",
    "impact": {
      "companies": 123,
      "conversations": 123,
      "customers": 123,
      "revenue": 123.45
    },
    "inbox_id": "<string>",
    "issues": [
      {
        "created_at": "2026-11-01T09:30:00Z",
        "deployed_at": "2026-11-01T09:30:00Z",
        "done_at": "2026-11-01T09:30:00Z",
        "external_id": "<string>",
        "id": "<string>",
        "installation_id": "<string>",
        "key": "<string>",
        "object": "<string>",
        "provider": "<string>",
        "severity": "<string>",
        "status": "<string>",
        "status_group": "<string>",
        "sync_error": "<string>",
        "synced_at": "2026-11-01T09:30:00Z",
        "team_id": "<string>",
        "team_name": "<string>",
        "ticket_id": "<string>",
        "title": "<string>",
        "url": "<string>",
        "warning": "<string>"
      }
    ],
    "kind": "<string>",
    "linked_conversations": 123,
    "links": [
      {
        "conversation_id": "<string>",
        "created_at": "2026-11-01T09:30:00Z",
        "from_ticket_id": "<string>",
        "id": "<string>",
        "kind": "<string>",
        "object": "<string>",
        "ticket": {
          "assignee_id": "<string>",
          "id": "<string>",
          "kind": "<string>",
          "reference": "<string>",
          "state": {},
          "title": "<string>",
          "type_name": "<string>",
          "updated_at": "2026-11-01T09:30:00Z"
        },
        "to_ticket_id": "<string>"
      }
    ],
    "number": 123,
    "object": "<string>",
    "priority": "<string>",
    "reference": "<string>",
    "resolved_at": "2026-11-01T09:30:00Z",
    "sla_clocks": [
      {
        "breached_at": "2026-11-01T09:30:00Z",
        "conversation_id": "<string>",
        "due_at": "2026-11-01T09:30:00Z",
        "id": "<string>",
        "object": "<string>",
        "paused_at": "2026-11-01T09:30:00Z",
        "policy_id": "<string>",
        "started_at": "2026-11-01T09:30:00Z",
        "state": "<string>",
        "stopped_at": "2026-11-01T09:30:00Z",
        "target": "<string>",
        "ticket_id": "<string>",
        "warn_at": "2026-11-01T09:30:00Z"
      }
    ],
    "sla_policy_id": "<string>",
    "state": {
      "customer_label": "<string>",
      "group": "<string>",
      "id": "<string>",
      "name": "<string>"
    },
    "state_id": "<string>",
    "state_since": "2026-11-01T09:30:00Z",
    "suggestions": {
      "<key>": null
    },
    "team_id": "<string>",
    "title": "<string>",
    "type": {
      "icon": "<string>",
      "id": "<string>",
      "kind": "<string>",
      "name": "<string>"
    },
    "type_id": "<string>",
    "updated_at": "2026-11-01T09:30:00Z",
    "version": 123
  }
}
```

---

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