---
title: "Update a ticket"
method: PATCH
path: "/v1/tickets/{ticket_id}"
tags: ["Tickets"]
---

# Update a ticket

`PATCH /v1/tickets/{ticket_id}`

## Request

- Base URL: `https://api.capacity.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.capacity.com/v1/tickets/{ticket_id}`
- Auth: one of:
  - API key in header `x-capacity-id`
  - HTTP bearer

Update a ticket.

## Path parameters

- `ticket_id` string, required

## Request body

- object
  - `assigned_user` string: Name of assigned user
  - `description` string: Ticket description
  - `due_date` string: Ticket due date
  - `priority_id` integer: Ticket priority
  - `project_uuid` string: Uuid of the ticket's project
  - `reporter_email` string: Email of reporter
  - `status_id` integer: Ticket status
  - `tags` string[]: List of ticket tags
  - `ticket_type_id` integer: Ticket type
  - `title` string: Ticket title
  - `should_check_for_required_custom_fields_on_close` boolean: If true, the ticket will be checked for required custom fields when attempting to close
  - `custom_fields` object: Custom field values to update on the ticket. Supports both simple fields and dependent (parent-child) fields. **Simple fields**: Direct key-value pairs where keys are field names and values can be strings, numbers, arrays, or null. **Dependent fields**: Use nested structure with "value" for parent and "dependent_fields" for children. **Null values**: Use null to clear/deselect fields. Empty strings in arrays are treated as cleared. **Dependent Field Behavior**: Consider a "Color" parent field with options [Blue, Red, Green] and "Shade" child field with: - Blue → [Navy, Turquoise, Sky Blue] - Red → [Crimson, Scarlet, Cherry] - Green → [Emerald, Lime, Forest] **Important**: When changing parent values, you cannot change both parent and child in the same request. Example - To change from "Blue → Navy" to "Red → Crimson": 1. First request: `{"color_field": {"value": "Red"}}` (child becomes null) 2. Second request: `{"color_field": {"value": "Red", "dependent_fields": {"shade_field": ["Crimson"]}}}` This ensures dependent validation works correctly.

## Response `200`

The updated ticket

- object
  - `body` object: Json body data in the request
  - `parameters` object: Query parameters in the request
  - `result` TicketSchema
    - `id` string: ID of the ticket
    - `project_uuid` string: Uuid of the ticket's project
    - `title` string: Ticket title
    - `ticket_type_id` integer: Ticket type
    - `description` string: Ticket description
    - `reporter_uuid` string: Uuid of ticket reporter
    - `reporter_email` string: Email of ticket reporter
    - `reporter_name` string: Name of ticket reporter
    - `priority_id` integer: Ticket priority
    - `due_date` string: Ticket due date
    - `assigned_user` string: Uuid of assigned user
    - `correspondence_email` string: Email of correspondence
    - `tags` string[]: Ticket tags
    - `file_attachments` string[]: File UUIDs attached to the ticket

## Other responses

- `400`: The request contains malformed data or violates data integrity

---

[API](https://skmtc.dev/capacity/apis/capacity-api-docs.md) - [All operations](https://skmtc.dev/capacity/apis/capacity-api-docs/llms.txt) - [OpenAPI document](https://skmtc.dev/capacity/apis/capacity-api-docs/revisions/74c85bb61004?raw)
