> ## 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.

# Get incident timeline

> Retrieve the timeline feed for a specific incident, including state changes, comments and system events.

## Restrictions

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


## OpenAPI

````yaml /api-reference/on-call.openapi.en.json post /incident/feed
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/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/feed:
    post:
      tags:
        - On-call/Incidents
      summary: Get incident timeline
      description: >-
        Retrieve the timeline feed for a specific incident, including state
        changes, comments and system events.
      operationId: incidentFeed
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListIncidentFeedRequest'
            example:
              incident_id: 69da451ef77b1b51f40e83ee
              p: 1
              limit: 20
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/ListIncidentFeedResponse'
              example:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                data:
                  has_next_page: true
                  items:
                    - ref_id: 69da451ef77b1b51f40e83ee
                      type: i_new
                      detail:
                        severity: Critical
                        title: CPU usage high - web-server-01
                      account_id: 2451002751131
                      creator_id: 0
                      created_at: 1775912222661
                      updated_at: 1775912222661
                    - ref_id: 69da451ef77b1b51f40e83ee
                      type: i_notify
                      detail:
                        rid: 5e9ccfabcd154b41a0005fd0f52b674b
                        msg_id: naFudJYCawBWsChdV6ErPH
                        fire_type: fire
                        escalate_rule_id: '000000000000000000000000'
                        layer_idx: 0
                        by: email
                        persons:
                          - person_id: 2476444212131
                      account_id: 2451002751131
                      creator_id: 0
                      created_at: 1775972130174
                      updated_at: 1775972130174
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    ListIncidentFeedRequest:
      type: object
      description: Filters for the incident timeline query.
      required:
        - incident_id
      properties:
        incident_id:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
          description: Incident ID (MongoDB ObjectID).
        p:
          type: integer
          format: int64
          minimum: 1
          description: Page number starting at 1.
        limit:
          type: integer
          format: int64
          minimum: 1
          maximum: 100
          default: 20
          description: Page size, at most 100.
        asc:
          type: boolean
          description: Ascending chronological order when true.
        types:
          type: array
          items:
            $ref: '#/components/schemas/IncidentFeedType'
          description: Optional filter restricting the returned entries to specific types.
    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
    ListIncidentFeedResponse:
      type: object
      description: Page of incident timeline entries.
      required:
        - has_next_page
        - items
      properties:
        has_next_page:
          type: boolean
          description: True when more entries are available.
        items:
          type: array
          items:
            $ref: '#/components/schemas/IncidentFeedItem'
          description: Timeline entries for the current page.
    IncidentFeedType:
      type: string
      description: >-
        Incident timeline entry type. Each value identifies one lifecycle event;
        the matching `detail` payload shape is determined by this field.
        Incident types are prefixed with `i_`.


        | Type | Meaning |

        |---|---|

        | `i_new` | Incident Created: A new incident was created automatically
        or manually. |

        | `i_assign` | Assigned: Incident was assigned to responders. |

        | `i_a_rspd` | Responder Added: Additional responders joined the
        incident. |

        | `i_notify` | Notification dispatched through a channel at a specific
        escalation level. |

        | `i_storm` | Alert storm threshold reached on the incident. |

        | `i_snooze` | Notifications snoozed for a given duration. |

        | `i_wake` | Snooze cancelled and notifications resumed. |

        | `i_ack` | Acknowledged: Responder confirmed they are working on the
        incident. |

        | `i_unack` | Acknowledgement removed. |

        | `i_comm` | Comment: Responder logged progress or key information. |

        | `i_rslv` | Resolved: Incident was marked as resolved. |

        | `i_reopen` | Reopened: Resolved incident was reopened, possibly due to
        recurrence. |

        | `i_merge` | Merged: Multiple related incidents were merged into one. |

        | `i_r_title` | Title updated. |

        | `i_r_desc` | Description updated. |

        | `i_r_impact` | Impact updated. |

        | `i_r_rc` | Root cause updated. |

        | `i_r_rsltn` | Resolution updated. |

        | `i_r_severity` | Severity Changed: Incident severity level was
        adjusted. |

        | `i_r_field` | Custom field value updated. |

        | `i_m_flapping` | Incident muted by flapping detection. |

        | `i_m_reply` | Mute reply marker on a comment. |

        | `i_custom` | Action: Automated action or script was triggered. |

        | `i_wr_create` | War Room Created: Chat group was created for
        collaborative response. |

        | `i_wr_delete` | War room chat group deleted. |

        | `i_auto_refresh` | Card auto-refresh event posted back to the
        timeline. |

        | `a_merge` | Alert Merged: An alert was merged into an existing
        incident. |
      enum:
        - i_new
        - i_assign
        - i_a_rspd
        - i_notify
        - i_storm
        - i_snooze
        - i_wake
        - i_ack
        - i_unack
        - i_comm
        - i_rslv
        - i_reopen
        - i_merge
        - i_r_title
        - i_r_desc
        - i_r_impact
        - i_r_rc
        - i_r_rsltn
        - i_r_severity
        - i_r_field
        - i_m_flapping
        - i_m_reply
        - i_custom
        - i_wr_create
        - i_wr_delete
        - i_auto_refresh
        - a_merge
    IncidentFeedItem:
      type: object
      description: >-
        Single incident timeline entry. The `detail` field is discriminated by
        `type`; see the per-type `FeedDetail*` schemas.
      required:
        - ref_id
        - type
        - detail
        - account_id
        - creator_id
        - created_at
        - updated_at
      properties:
        ref_id:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
          description: ObjectID of the source alert or incident this entry references.
        type:
          $ref: '#/components/schemas/IncidentFeedType'
        detail:
          description: Type-specific payload. The concrete shape is determined by `type`.
          oneOf:
            - $ref: '#/components/schemas/FeedDetailIncidentNew'
            - $ref: '#/components/schemas/FeedDetailIncidentAssign'
            - $ref: '#/components/schemas/FeedDetailIncidentAddRspd'
            - $ref: '#/components/schemas/FeedDetailIncidentNotify'
            - $ref: '#/components/schemas/FeedDetailIncidentStorm'
            - $ref: '#/components/schemas/FeedDetailIncidentSnooze'
            - $ref: '#/components/schemas/FeedDetailIncidentWake'
            - $ref: '#/components/schemas/FeedDetailIncidentAck'
            - $ref: '#/components/schemas/FeedDetailIncidentUnack'
            - $ref: '#/components/schemas/FeedDetailIncidentComment'
            - $ref: '#/components/schemas/FeedDetailIncidentResolve'
            - $ref: '#/components/schemas/FeedDetailIncidentReopen'
            - $ref: '#/components/schemas/FeedDetailIncidentMerge'
            - $ref: '#/components/schemas/FeedDetailIncidentResetTitle'
            - $ref: '#/components/schemas/FeedDetailIncidentResetDescription'
            - $ref: '#/components/schemas/FeedDetailIncidentResetImpact'
            - $ref: '#/components/schemas/FeedDetailIncidentResetRootCause'
            - $ref: '#/components/schemas/FeedDetailIncidentResetResolution'
            - $ref: '#/components/schemas/FeedDetailIncidentResetSeverity'
            - $ref: '#/components/schemas/FeedDetailIncidentResetField'
            - $ref: '#/components/schemas/FeedDetailIncidentMuteByFlapping'
            - $ref: '#/components/schemas/FeedDetailIncidentMuteReply'
            - $ref: '#/components/schemas/FeedDetailIncidentCustomAction'
            - $ref: '#/components/schemas/FeedDetailIncidentWarRoomCreate'
            - $ref: '#/components/schemas/FeedDetailIncidentWarRoomDelete'
            - $ref: '#/components/schemas/FeedDetailIncidentAutoRefreshCard'
          discriminator:
            propertyName: type
            mapping:
              i_new:
                $ref: '#/components/schemas/FeedDetailIncidentNew'
              i_assign:
                $ref: '#/components/schemas/FeedDetailIncidentAssign'
              i_a_rspd:
                $ref: '#/components/schemas/FeedDetailIncidentAddRspd'
              i_notify:
                $ref: '#/components/schemas/FeedDetailIncidentNotify'
              i_storm:
                $ref: '#/components/schemas/FeedDetailIncidentStorm'
              i_snooze:
                $ref: '#/components/schemas/FeedDetailIncidentSnooze'
              i_wake:
                $ref: '#/components/schemas/FeedDetailIncidentWake'
              i_ack:
                $ref: '#/components/schemas/FeedDetailIncidentAck'
              i_unack:
                $ref: '#/components/schemas/FeedDetailIncidentUnack'
              i_comm:
                $ref: '#/components/schemas/FeedDetailIncidentComment'
              i_rslv:
                $ref: '#/components/schemas/FeedDetailIncidentResolve'
              i_reopen:
                $ref: '#/components/schemas/FeedDetailIncidentReopen'
              i_merge:
                $ref: '#/components/schemas/FeedDetailIncidentMerge'
              i_r_title:
                $ref: '#/components/schemas/FeedDetailIncidentResetTitle'
              i_r_desc:
                $ref: '#/components/schemas/FeedDetailIncidentResetDescription'
              i_r_impact:
                $ref: '#/components/schemas/FeedDetailIncidentResetImpact'
              i_r_rc:
                $ref: '#/components/schemas/FeedDetailIncidentResetRootCause'
              i_r_rsltn:
                $ref: '#/components/schemas/FeedDetailIncidentResetResolution'
              i_r_severity:
                $ref: '#/components/schemas/FeedDetailIncidentResetSeverity'
              i_r_field:
                $ref: '#/components/schemas/FeedDetailIncidentResetField'
              i_m_flapping:
                $ref: '#/components/schemas/FeedDetailIncidentMuteByFlapping'
              i_m_reply:
                $ref: '#/components/schemas/FeedDetailIncidentMuteReply'
              i_custom:
                $ref: '#/components/schemas/FeedDetailIncidentCustomAction'
              i_wr_create:
                $ref: '#/components/schemas/FeedDetailIncidentWarRoomCreate'
              i_wr_delete:
                $ref: '#/components/schemas/FeedDetailIncidentWarRoomDelete'
              i_auto_refresh:
                $ref: '#/components/schemas/FeedDetailIncidentAutoRefreshCard'
        account_id:
          type: integer
          format: int64
          description: Account ID.
        creator_id:
          type: integer
          format: int64
          description: User ID of the actor. `0` means system-generated.
        deleted_at:
          type: integer
          format: int64
          description: Soft-delete timestamp (ms). Zero if not deleted.
        created_at:
          type: integer
          format: int64
          description: Creation timestamp in milliseconds.
        updated_at:
          type: integer
          format: int64
          description: Last update timestamp in milliseconds.
    ErrorResponse:
      type: object
      description: Response envelope for errors. `error` is required; `data` is absent.
      properties:
        request_id:
          type: string
          example: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
        error:
          $ref: '#/components/schemas/DutyError'
      required:
        - request_id
        - error
    FeedDetailIncidentNew:
      type: object
      description: Detail payload for `i_new`.
      properties:
        severity:
          $ref: '#/components/schemas/FeedSeverity'
        title:
          type: string
          description: Initial incident title.
        reporter_email:
          type: string
          description: Email of the reporter when the incident was created externally.
      title: i_new
    FeedDetailIncidentAssign:
      type: object
      description: >-
        Detail payload for `i_assign`. Extends `AssignedTo` with the set of
        target member IDs.
      allOf:
        - $ref: '#/components/schemas/AssignedTo'
        - type: object
          properties:
            to:
              type: array
              items:
                type: integer
                format: int64
              description: Member IDs that received the assignment.
      title: i_assign
    FeedDetailIncidentAddRspd:
      type: object
      description: Detail payload for `i_a_rspd`.
      properties:
        to:
          type: array
          items:
            type: integer
            format: int64
          description: Member IDs added as responders.
      title: i_a_rspd
    FeedDetailIncidentNotify:
      type: object
      description: Detail payload for `i_notify`.
      required:
        - layer_idx
      properties:
        rid:
          type: string
          description: Notification record ID.
        msg_id:
          type: string
          description: Upstream message ID returned by the delivery channel.
        fire_type:
          type: string
          enum:
            - fire
            - refire
          description: Whether this is the first fire or a refire.
        escalate_rule_name:
          type: string
          description: Escalation rule display name.
        escalate_rule_id:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
          description: Escalation rule ID (MongoDB ObjectID).
        layer_idx:
          type: integer
          description: Escalation level index used for this notification.
        by:
          type: string
          description: Delivery channel or method label.
        persons:
          type: array
          items:
            $ref: '#/components/schemas/NotifyPerson'
          description: Per-person delivery records.
        chats:
          type: array
          items:
            $ref: '#/components/schemas/NotifyChat'
          description: Per-chat delivery records.
        robots:
          type: array
          items:
            $ref: '#/components/schemas/NotifyRobot'
          description: Per-robot delivery records.
      title: i_notify
    FeedDetailIncidentStorm:
      type: object
      description: Detail payload for `i_storm`.
      properties:
        threshold:
          type: integer
          description: Storm threshold that was reached.
      title: i_storm
    FeedDetailIncidentSnooze:
      type: object
      description: Detail payload for `i_snooze`.
      properties:
        minutes:
          type: integer
          format: int64
          description: Snooze duration in minutes.
      title: i_snooze
    FeedDetailIncidentWake:
      type: object
      description: Detail payload for `i_wake`.
      properties:
        snoozedBefore:
          type: integer
          format: int64
          description: Unix timestamp at which the prior snooze was scheduled to end.
      title: i_wake
    FeedDetailIncidentAck:
      type: object
      description: Detail payload for `i_ack`.
      properties:
        progress:
          type: string
          description: Progress note entered at acknowledgement.
      title: i_ack
    FeedDetailIncidentUnack:
      type: object
      description: Detail payload for `i_unack`.
      properties:
        progress:
          type: string
          description: Progress note entered when acknowledgement was removed.
      title: i_unack
    FeedDetailIncidentComment:
      type: object
      description: Detail payload for `i_comm`.
      properties:
        comment:
          type: string
          description: Comment body.
        mute_reply:
          type: boolean
          description: Whether replies to this comment are muted.
      title: i_comm
    FeedDetailIncidentResolve:
      type: object
      description: Detail payload for `i_rslv`.
      required:
        - from
      properties:
        from:
          type: string
          enum:
            - voice
            - console
            - card
            - wcard
            - event
            - autorslv
            - autorefresh
            - escalation
          description: Source that triggered the resolve action.
      title: i_rslv
    FeedDetailIncidentReopen:
      type: object
      description: Detail payload for `i_reopen`.
      properties:
        reason:
          type: string
          description: Reason why the incident was reopened.
      title: i_reopen
    FeedDetailIncidentMerge:
      type: object
      description: Detail payload for `i_merge`.
      properties:
        comment:
          type: string
          description: Merge comment.
        source_incidents:
          type: array
          items:
            $ref: '#/components/schemas/IncidentShort'
          description: Source incidents that were merged.
        target_incident:
          $ref: '#/components/schemas/IncidentShort'
        owner_id:
          type: integer
          format: int64
          description: Member ID that performed the merge.
        title:
          type: string
          description: Resulting incident title.
        remove_source_incidents:
          type: boolean
          description: True if the source incidents were removed after merging.
        source_responders:
          type: array
          items:
            type: integer
            format: int64
          description: Responder member IDs carried over from the source incidents.
      title: i_merge
    FeedDetailIncidentResetTitle:
      type: object
      description: Detail payload for `i_r_title`.
      properties:
        from:
          type: string
          description: Previous title.
        to:
          type: string
          description: New title.
      title: i_r_title
    FeedDetailIncidentResetDescription:
      type: object
      description: Detail payload for `i_r_desc`. No fields.
      properties: {}
      additionalProperties: false
      title: i_r_desc
    FeedDetailIncidentResetImpact:
      type: object
      description: Detail payload for `i_r_impact`. No fields.
      properties: {}
      additionalProperties: false
      title: i_r_impact
    FeedDetailIncidentResetRootCause:
      type: object
      description: Detail payload for `i_r_rc`. No fields.
      properties: {}
      additionalProperties: false
      title: i_r_rc
    FeedDetailIncidentResetResolution:
      type: object
      description: Detail payload for `i_r_rsltn`. No fields.
      properties: {}
      additionalProperties: false
      title: i_r_rsltn
    FeedDetailIncidentResetSeverity:
      type: object
      description: Detail payload for `i_r_severity`.
      properties:
        from:
          $ref: '#/components/schemas/FeedSeverity'
        to:
          $ref: '#/components/schemas/FeedSeverity'
      title: i_r_severity
    FeedDetailIncidentResetField:
      type: object
      description: Detail payload for `i_r_field`.
      required:
        - field_name
      properties:
        field_name:
          type: string
          description: Name of the custom field that was updated.
        to:
          description: New value of the custom field. Type depends on the field definition.
      title: i_r_field
    FeedDetailIncidentMuteByFlapping:
      type: object
      description: Detail payload for `i_m_flapping`.
      properties:
        max_changes:
          type: integer
          description: Maximum state changes allowed within the window.
        in_mins:
          type: integer
          description: Window length in minutes.
        mute_mins:
          type: integer
          description: Mute duration in minutes once flapping is detected.
      title: i_m_flapping
    FeedDetailIncidentMuteReply:
      type: object
      description: Detail payload for `i_m_reply`. No fields.
      properties: {}
      additionalProperties: false
      title: i_m_reply
    FeedDetailIncidentCustomAction:
      type: object
      description: Detail payload for `i_custom`.
      properties:
        integration_id:
          type: integer
          format: int64
          description: Integration ID that executed the action.
        integration_name:
          type: string
          description: Integration display name.
      title: i_custom
    FeedDetailIncidentWarRoomCreate:
      type: object
      description: Detail payload for `i_wr_create`.
      properties:
        integration_id:
          type: integer
          format: int64
          description: Integration ID that hosts the war room chat group.
        chat_id:
          type: string
          description: Chat group identifier.
        chat_name:
          type: string
          description: Chat group display name.
        plugin_type:
          type: string
          description: Chat integration plugin type.
        integration_name:
          type: string
          description: Integration display name.
        share_link:
          type: string
          description: Shareable join link for the war room.
      title: i_wr_create
    FeedDetailIncidentWarRoomDelete:
      type: object
      description: Detail payload for `i_wr_delete`.
      properties:
        integration_id:
          type: integer
          format: int64
          description: Integration ID that hosted the war room chat group.
        chat_id:
          type: string
          description: Chat group identifier.
        chat_name:
          type: string
          description: Chat group display name.
        plugin_type:
          type: string
          description: Chat integration plugin type.
        integration_name:
          type: string
          description: Integration display name.
      title: i_wr_delete
    FeedDetailIncidentAutoRefreshCard:
      type: object
      description: Detail payload for `i_auto_refresh`. No fields.
      properties: {}
      additionalProperties: false
      title: i_auto_refresh
    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
    FeedSeverity:
      type: string
      enum:
        - Ok
        - Critical
        - Warning
        - Info
      description: Severity level.
    AssignedTo:
      type: object
      description: >-
        Incident assignment target. Either `person_ids` or `escalate_rule_id`
        must be provided.
      properties:
        person_ids:
          type: array
          items:
            type: integer
            format: int64
          minItems: 1
          maxItems: 100
          description: Member IDs to assign directly.
        escalate_rule_id:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
          description: Escalation rule ID (MongoDB ObjectID) to drive assignment.
        layer_idx:
          type: integer
          description: Current level index within the escalation rule.
        type:
          type: string
          description: >-
            Assignment type: `assign` direct assignment, `reassign`
            reassignment, `escalate` escalation-rule driven, `reopen` automatic
            reassignment on reopen.
          enum:
            - assign
            - reassign
            - escalate
            - reopen
        emails:
          type: array
          items:
            type: string
            format: email
          minItems: 1
          maxItems: 100
          description: Email recipients, used by integrations such as ServiceNow.
        escalate_rule_name:
          type: string
          description: Escalation rule display name, filled by the server.
        assigned_at:
          type: integer
          format: int64
          description: Unix timestamp (seconds) when the assignment was made.
        id:
          type: string
          description: Opaque assignment ID generated by the server.
    NotifyPerson:
      type: object
      description: Notification delivery record for a single person recipient.
      properties:
        person_id:
          type: integer
          format: int64
          description: Recipient member ID.
        failed_reason:
          type: string
          description: Failure reason if delivery did not succeed.
    NotifyChat:
      type: object
      description: Notification delivery record for a chat group recipient.
      properties:
        data_source_id:
          type: integer
          format: int64
          description: Integration data source ID used to send the notification.
        chat_id:
          type: string
          description: Chat group identifier.
        chat_name:
          type: string
          description: Chat group display name.
        failed_reason:
          type: string
          description: Failure reason if delivery did not succeed.
    NotifyRobot:
      type: object
      description: Notification delivery record for a robot webhook recipient.
      properties:
        token:
          type: string
          description: Robot token or identifier.
        alias:
          type: string
          description: Robot alias.
        failed_reason:
          type: string
          description: Failure reason if delivery did not succeed.
    IncidentShort:
      type: object
      description: Brief incident reference embedded in an alert.
      properties:
        incident_id:
          type: string
          description: Incident ID (ObjectID hex string).
        title:
          type: string
          description: Incident title.
        progress:
          type: string
          description: Incident progress — one of `Triggered`, `Processing`, `Closed`.
    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.

````