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

# Update a work item

> Partially update a work item's title, description, status, or priority.

## Restrictions

| Aspect      | Value                                                         |
| ----------- | ------------------------------------------------------------- |
| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |
| Permissions | **Incidents Manage** (`on-call`)                              |

## Usage

* Requires the On-call Pro license.
* Partial patch: omitted fields stay unchanged; an explicit `null` clears the field.
* Optimistic locking — `version` must match the item's current version; a mismatch returns a conflict error.
* Assignees, `item_type`, and the incident/post-mortem anchors cannot be changed here — use the dedicated endpoints.
* Audited — changes are recorded in the audit log.


## OpenAPI

````yaml /api-reference/on-call.openapi.en.json post /incident/work-item/update
openapi: 3.1.0
info:
  title: Flashduty Open API
  description: >-
    Public HTTP API for the Flashduty incident management platform — incidents,
    notification templates, channels, schedules, monitors, RUM, and platform
    administration. Every operation is authenticated with an `app_key` query
    parameter issued from the Flashduty console under Account → APP Keys.
    Responses follow a uniform envelope: `{ request_id, data }` on success, `{
    request_id, error }` on failure.
  version: 1.0.0
servers:
  - url: https://api.flashcat.cloud
    description: Flashduty Open API
security:
  - AppKeyAuth: []
tags:
  - name: On-call/Incidents
    description: ''
  - name: On-call/Channels
    description: ''
  - name: On-call/Alerts
    description: >-
      Search, inspect, and act on alerts. Manage card views and alert processing
      pipelines.
  - name: On-call/Integrations
    description: ''
  - name: On-call/IM integrations
    description: IM integration queries, such as which integrations have war room enabled.
  - name: On-call/Schedules
    description: ''
  - name: On-call/Licenses
    description: ''
  - name: On-call/Calendars
    description: ''
  - name: On-call/Notification templates
    description: ''
  - name: On-call/Alert enrichment
    description: Custom fields, enrichment rules, and data mapping (schema, data, API).
  - name: On-call/Analytics
    description: ''
  - name: On-call/Status pages
    description: ''
  - name: On-call/Changes
    description: ''
paths:
  /incident/work-item/update:
    post:
      tags:
        - On-call/Incidents
      summary: Update a work item
      description: Partially update a work item's title, description, status, or priority.
      operationId: incidentWorkItemUpdate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateWorkItemRequest'
            example:
              work_item_id: wi_9fK2mNqRtVwXyZaBcDeFgH
              version: 1
              title: >-
                Roll back the v2.14 deployment on web-server-01 and
                web-server-02
              status: in_progress
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/WorkItemMutationResult'
              example:
                request_id: 01J8XQ3E5Z7JM2NTFQ5YJ8P9R4
                data:
                  item:
                    work_item_id: wi_68MHnkWBiyjrh6uhkxUyiZ
                    item_type: follow_up
                    incident_id: 6a5f1e28807515413b384bce
                    post_mortem_id: 51d65cd9525c369379ba471b5512df63
                    title: Follow-ups assigned to Bowen and Weili
                    status: done
                    source_kind: native
                    version: 2
                    assignee_ids:
                      - 3790925372131
                      - 4756301322131
                      - 5068740052131
                    created_by: 5329873302131
                    updated_by: 3790925372131
                    created_at_seconds: 1785495329
                    updated_at_seconds: 1785496384
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    UpdateWorkItemRequest:
      type: object
      description: >-
        Partial patch for a work item. Omitted fields stay unchanged; an
        explicit `null` clears the field.
      required:
        - work_item_id
        - version
      properties:
        work_item_id:
          type: string
          maxLength: 128
          description: Work item ID (opaque string, max 128 characters).
        version:
          type: integer
          format: int64
          description: >-
            Current item version for optimistic locking. Must match the stored
            version.
        title:
          type:
            - string
            - 'null'
          description: New title (max 512 characters).
          maxLength: 512
        description:
          type:
            - string
            - 'null'
          description: New description (max 65,535 characters).
          maxLength: 65535
        status:
          type:
            - string
            - 'null'
          description: New client-defined status (max 64 characters).
          maxLength: 64
        priority:
          type:
            - string
            - 'null'
          description: New client-defined priority (max 64 characters).
          maxLength: 64
    SuccessEnvelope:
      type: object
      description: >-
        Success response envelope. On every 2xx response, `request_id`
        identifies the call (also mirrored in the `Flashcat-Request-Id` header)
        and `data` holds the endpoint-specific payload. Failure responses use a
        different shape — see `ErrorResponse`.
      properties:
        request_id:
          type: string
          description: >-
            Unique ID for this request. Mirrored in the Flashcat-Request-Id
            response header. Include it when reporting issues.
          example: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
        data:
          description: Endpoint-specific payload. See each operation's 200 response schema.
      required:
        - request_id
        - data
    WorkItemMutationResult:
      type: object
      description: Result of mutating a work item.
      properties:
        item:
          $ref: '#/components/schemas/WorkItemItem'
        added_assignee_ids:
          type: array
          items:
            type: integer
            format: int64
          description: Assignee member IDs that were newly added (and notified).
        removed_assignee_ids:
          type: array
          items:
            type: integer
            format: int64
          description: Assignee member IDs that were removed (never notified).
        idempotent_replay:
          type: boolean
          description: >-
            True when the call replayed an earlier request with the same
            idempotency key.
    WorkItemItem:
      type: object
      description: >-
        A structured incident work item (action or post-mortem follow-up) with
        its assignees.
      required:
        - work_item_id
        - item_type
        - incident_id
        - title
        - status
        - source_kind
        - version
        - assignee_ids
        - created_by
        - updated_by
        - created_at_seconds
        - updated_at_seconds
      properties:
        work_item_id:
          type: string
          maxLength: 128
          description: Work item ID (opaque string, max 128 characters).
        item_type:
          type: string
          enum:
            - action
            - follow_up
          description: >-
            `action` for an item anchored to an active incident; `follow_up` for
            a post-mortem follow-up.
        incident_id:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
          description: Incident ID (MongoDB ObjectID) the item is anchored to.
        post_mortem_id:
          type: string
          description: >-
            Post-mortem ID (32-character hex string). Present on follow-up items
            once bound to a post-mortem.
        title:
          type: string
          maxLength: 512
          description: Item title (max 512 characters).
        description:
          type: string
          maxLength: 65535
          description: Optional longer description (max 65,535 characters).
        status:
          type: string
          maxLength: 64
          description: >-
            Client-defined status (max 64 characters). There is no fixed state
            machine.
        priority:
          type: string
          maxLength: 64
          description: Optional client-defined priority (max 64 characters).
        source_kind:
          type: string
          enum:
            - native
            - legacy_follow_up
          description: >-
            `native` for items created through this API; `legacy_follow_up` for
            items migrated from legacy post-mortem follow-ups.
        legacy_source_id:
          type: string
          description: >-
            Original identifier of the legacy follow-up this item was migrated
            from. Present only when `source_kind` is `legacy_follow_up`.
        version:
          type: integer
          format: int64
          description: Optimistic-locking version, incremented on every mutation.
        assignee_ids:
          type: array
          items:
            type: integer
            format: int64
          description: >-
            Member IDs of the current assignees. Never null; an empty array
            means unassigned.
        created_by:
          type: integer
          format: int64
          description: Member ID of the creator.
        updated_by:
          type: integer
          format: int64
          description: Member ID of the last updater.
        converted_by:
          type: integer
          format: int64
          description: >-
            Member ID of the operator who converted the action into a follow-up.
            Present only after conversion.
        converted_at_seconds:
          type: integer
          format: int64
          description: >-
            Conversion time as a Unix timestamp in seconds. Present only after
            conversion.
        created_at_seconds:
          type: integer
          format: int64
          description: Creation time as a Unix timestamp in seconds.
        updated_at_seconds:
          type: integer
          format: int64
          description: Last update time as a Unix timestamp in seconds.
    ErrorResponse:
      type: object
      description: Response envelope for errors. `error` is required; `data` is absent.
      properties:
        request_id:
          type: string
          example: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
          description: >-
            Unique trace ID of this request; include it when reporting issues so
            logs can be located.
        error:
          $ref: '#/components/schemas/DutyError'
      required:
        - request_id
        - error
    DutyError:
      type: object
      description: >-
        Error payload inside the response envelope. Present only on non-2xx
        responses.
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
          description: >-
            Human-readable error message, localized by the caller's
            Accept-Language. May contain field names, IDs, or other context from
            the failing request.
          example: The specified parameter template_id is not valid.
      required:
        - code
        - message
    ErrorCode:
      type: string
      description: >-
        Flashduty error code enum. Every failed API response sets `error.code`
        to one of these stable wire strings. HTTP status is informational — the
        authoritative signal is the enum value.


        | Code | HTTP | Meaning |

        |---|---|---|

        | `OK` | 200 | Reserved — not returned on real errors. |

        | `InvalidParameter` | 400 | A required parameter is missing or failed
        validation. |

        | `BadRequest` | 400 | Generic 400 used when no more specific code fits.
        |

        | `InvalidContentType` | 400 | The `Content-Type` header is not
        `application/json`. |

        | `ResourceNotFound` | 400 | The referenced resource does not exist.
        Note: returned as HTTP 400, not 404 (historical choice). |

        | `NoLicense` | 400 | The feature is license-gated and no active license
        was found. |

        | `ReferenceExist` | 400 | Deletion blocked — other entities still
        reference this resource. |

        | `Unauthorized` | 401 | `app_key` is missing, invalid, or expired. |

        | `BalanceNotEnough` | 402 | Billing-gated operation with insufficient
        account balance. |

        | `AccessDenied` | 403 | Authenticated but lacking the permission
        required for this operation. |

        | `RouteNotFound` | 404 | The request URL path is not a known route. |

        | `MethodNotAllowed` | 405 | The HTTP method is not allowed on this
        otherwise-known path. |

        | `UndonedOrderExist` | 409 | An outstanding billing order blocks this
        new one. Wait and retry. |

        | `RequestLocked` | 423 | Operation temporarily locked due to repeated
        failures. |

        | `EntityTooLarge` | 413 | Request body exceeds the configured max size.
        |

        | `RequestTooFrequently` | 429 | Rate limit hit — API-global,
        per-account, or per-integration. |

        | `RequestVerifyRequired` | 428 | Second-factor verification required
        but not supplied. |

        | `DangerousOperation` | 428 | High-risk operation requires MFA
        verification. |

        | `InternalError` | 500 | Unhandled server-side error. Include
        `request_id` in the bug report. |

        | `ServiceUnavailable` | 503 | A backend dependency is unavailable. Try
        again later. |
      enum:
        - OK
        - InvalidParameter
        - BadRequest
        - InvalidContentType
        - ResourceNotFound
        - NoLicense
        - ReferenceExist
        - Unauthorized
        - BalanceNotEnough
        - AccessDenied
        - RouteNotFound
        - MethodNotAllowed
        - UndonedOrderExist
        - RequestLocked
        - EntityTooLarge
        - RequestTooFrequently
        - RequestVerifyRequired
        - DangerousOperation
        - InternalError
        - ServiceUnavailable
      x-enumDescriptions:
        OK: Reserved — not returned on real errors.
        InvalidParameter: A required parameter is missing or failed validation.
        BadRequest: Generic 400 used when no more specific code fits.
        InvalidContentType: The `Content-Type` header is not `application/json`.
        ResourceNotFound: >-
          The referenced resource does not exist. Note: returned as HTTP 400,
          not 404 (historical choice).
        NoLicense: The feature is license-gated and no active license was found.
        ReferenceExist: Deletion blocked — other entities still reference this resource.
        Unauthorized: '`app_key` is missing, invalid, or expired.'
        BalanceNotEnough: Billing-gated operation with insufficient account balance.
        AccessDenied: Authenticated but lacking the permission required for this operation.
        RouteNotFound: The request URL path is not a known route.
        MethodNotAllowed: The HTTP method is not allowed on this otherwise-known path.
        UndonedOrderExist: An outstanding billing order blocks this new one. Wait and retry.
        RequestLocked: Operation temporarily locked due to repeated failures.
        EntityTooLarge: Request body exceeds the configured max size.
        RequestTooFrequently: Rate limit hit — API-global, per-account, or per-integration.
        RequestVerifyRequired: Second-factor verification required but not supplied.
        DangerousOperation: High-risk operation requires MFA verification.
        InternalError: Unhandled server-side error. Include `request_id` in the bug report.
        ServiceUnavailable: A backend dependency is unavailable. Try again later.
      example: InvalidParameter
  responses:
    BadRequest:
      description: Invalid request — usually a missing or malformed parameter.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingParameter:
              value:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                error:
                  code: InvalidParameter
                  message: The specified parameter is not valid.
    Unauthorized:
      description: Missing or invalid app_key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingAppKey:
              value:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                error:
                  code: Unauthorized
                  message: You are unauthorized.
    TooManyRequests:
      description: >-
        Rate limit hit. Either the global API limit, a per-account limit, or a
        per-integration limit.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            rateLimited:
              value:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                error:
                  code: RequestTooFrequently
                  message: Request too frequently.
    ServerError:
      description: Unexpected server-side error. Include the request_id when reporting.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            internal:
              value:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                error:
                  code: InternalError
                  message: >-
                    We encountered an internal error, and it has been reported.
                    Please try again later.
  securitySchemes:
    AppKeyAuth:
      type: apiKey
      in: query
      name: app_key
      description: >-
        App key issued from the Flashduty console under Account → APP Keys.
        Required on every public API call. Keep it secret — it grants the same
        access as the owning account.

````