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

# List past incidents

> List historical incidents related to the current incident for reference during triage.

## Restrictions

| Aspect      | Value                                                       |
| ----------- | ----------------------------------------------------------- |
| Rate limits | **100 requests/minute**; **20 requests/second** per account |
| Permissions | **Incidents Read** (`on-call`)                              |


## OpenAPI

````yaml /api-reference/on-call.openapi.en.json post /incident/past/list
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/past/list:
    post:
      tags:
        - On-call/Incidents
      summary: List past incidents
      description: >-
        List historical incidents related to the current incident for reference
        during triage.
      operationId: incidentPastList
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListPastIncidentsRequest'
            example:
              incident_id: 69da451ef77b1b51f40e83ee
              limit: 5
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/ListPastIncidentsResponse'
              example:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                data:
                  items: []
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    ListPastIncidentsRequest:
      type: object
      description: Parameters for the similar-past-incidents query.
      required:
        - incident_id
      properties:
        incident_id:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
          description: Reference incident ID (MongoDB ObjectID).
        limit:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
          maximum: 100
          default: 5
          description: Maximum number of similar incidents to return.
    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
    ListPastIncidentsResponse:
      type: object
      description: List of similar historical incidents, ranked by relevance.
      required:
        - items
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/PastIncidentItem'
          description: Similar past incidents with similarity scores.
    PastIncidentItem:
      allOf:
        - $ref: '#/components/schemas/IncidentInfo'
        - type: object
          required:
            - score
          properties:
            score:
              type: number
              format: float
              description: Similarity score from the vector search.
    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
    IncidentInfo:
      type: object
      description: Detailed incident record.
      required:
        - incident_id
        - account_id
        - channel_id
        - integration_id
        - integration_ids
        - integration_types
        - dedup_key
        - equals_md5
        - start_time
        - end_time
        - last_time
        - ack_time
        - close_time
        - creator_id
        - closer_id
        - owner_id
        - incident_status
        - incident_severity
        - progress
        - title
        - description
        - ai_summary
        - impact
        - root_cause
        - resolution
        - num
        - created_at
        - updated_at
        - snoozed_before
        - group_method
        - ever_muted
        - labels
        - fields
        - assigned_to
        - alert_cnt
        - active_alert_cnt
        - alert_event_cnt
        - responders
        - account_name
        - account_locale
        - account_time_zone
        - channel_name
        - channel_status
        - detail_url
        - silence_url
        - post_mortem_id
        - images
        - manual_overrides
      properties:
        incident_id:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
          description: Incident ID (MongoDB ObjectID).
        account_id:
          type: integer
          format: int64
          description: Account ID that owns the incident.
        channel_id:
          type: integer
          format: int64
          description: Channel ID. 0 for standalone incidents.
        integration_id:
          type: integer
          format: int64
          description: First integration associated with the incident.
        integration_ids:
          type: array
          items:
            type: integer
            format: int64
          description: All integration IDs contributing alerts to this incident.
        integration_types:
          type: array
          items:
            type: string
          description: Integration type strings for all contributing integrations.
        dedup_key:
          type: string
          description: Deduplication key used to coalesce alerts.
        equals_md5:
          type: string
          description: MD5 hash used for content-equality checks.
        start_time:
          type: integer
          format: int64
          description: Unix timestamp (seconds) when the incident started.
        end_time:
          type: integer
          format: int64
          description: Unix timestamp (seconds) when the incident ended. 0 if still active.
        last_time:
          type: integer
          format: int64
          description: Unix timestamp (seconds) of the most recent update.
        ack_time:
          type: integer
          format: int64
          description: >-
            Unix timestamp (seconds) when the incident was first acknowledged. 0
            if unacknowledged.
        close_time:
          type: integer
          format: int64
          description: >-
            Unix timestamp (seconds) when the incident was closed. 0 if still
            open.
        creator_id:
          type: integer
          format: int64
          description: >-
            Member ID that created the incident. 0 if auto-created by the
            system.
        closer_id:
          type: integer
          format: int64
          description: Member ID that closed the incident. 0 if auto-closed.
        owner_id:
          type: integer
          format: int64
          description: Primary owner member ID. 0 if none.
        incident_status:
          type: string
          enum:
            - Critical
            - Warning
            - Info
            - Ok
          description: Current incident status, derived from alert statuses.
        incident_severity:
          type: string
          enum:
            - Critical
            - Warning
            - Info
            - Ok
          description: Configured incident severity.
        progress:
          type: string
          enum:
            - Triggered
            - Processing
            - Closed
          description: Incident progress state.
        title:
          type: string
          description: Incident title.
        description:
          type: string
          description: Incident description.
        ai_summary:
          type: string
          description: AI-generated summary of the incident.
        impact:
          type: string
          description: Impact description.
        root_cause:
          type: string
          description: Root cause analysis.
        resolution:
          type: string
          description: Resolution notes.
        num:
          type: string
          description: Short display identifier; not guaranteed unique.
        frequency:
          type: string
          description: 'Frequency bucket for recurrence analysis: `frequent` or `rare`.'
          enum:
            - frequent
            - rare
        deleted_at:
          type: integer
          format: int64
          description: Soft-delete timestamp (seconds). Zero if not deleted.
        created_at:
          type: integer
          format: int64
          description: Creation timestamp (seconds).
        updated_at:
          type: integer
          format: int64
          description: Last update timestamp (seconds).
        snoozed_before:
          type: integer
          format: int64
          description: >-
            Unix timestamp (seconds) until which notifications are snoozed. 0 if
            not snoozed.
        group_method:
          type: string
          description: 'Alert grouping method: `i` intelligent, `p` pattern, `n` none.'
          enum:
            - i
            - p
            - 'n'
        ever_muted:
          type: boolean
          description: Whether the incident has ever been silenced.
        labels:
          type: object
          additionalProperties:
            type: string
          description: Labels propagated from alerts.
        fields:
          type: object
          additionalProperties: true
          description: Custom field values keyed by field name.
        assigned_to:
          $ref: '#/components/schemas/AssignedTo'
          description: Current assignment target for the incident.
        reporter_email:
          type: string
          description: Reporter email for manually created incidents.
        alert_cnt:
          type: integer
          format: int64
          description: Total count of alerts merged into this incident.
        active_alert_cnt:
          type: integer
          format: int64
          description: Count of alerts currently in Critical/Warning/Info state.
        alert_event_cnt:
          type: integer
          format: int64
          description: Total raw alert event count across all merged alerts.
        alerts:
          type: array
          items:
            $ref: '#/components/schemas/AlertInfo'
          description: >-
            Embedded alerts, only populated for notification templates and
            custom actions.
        closer:
          $ref: '#/components/schemas/PersonShort'
          description: Closer member info.
        creator:
          $ref: '#/components/schemas/PersonShort'
          description: Creator member info.
        owner:
          $ref: '#/components/schemas/PersonShort'
          description: Owner member info. May be deprecated.
          deprecated: true
        responders:
          type: array
          items:
            $ref: '#/components/schemas/Responder'
          description: Current responders with assignment/acknowledgement state.
        account_name:
          type: string
          description: Account name.
        account_locale:
          type: string
          description: Account locale.
        account_time_zone:
          type: string
          description: Account time zone.
        channel_name:
          type: string
          description: Channel display name.
        channel_status:
          type: string
          description: Channel status.
        detail_url:
          type: string
          description: Web console URL for the incident.
        silence_url:
          type: string
          description: Quick-silence URL for this incident.
        links:
          type: array
          items:
            $ref: '#/components/schemas/LinkItem'
          description: Channel-level link integrations rendered for this incident.
        integration_type:
          type: string
          description: >-
            First alert's integration type string, used by the detail page for
            label mappings.
        post_mortem_id:
          type: string
          description: >-
            Associated post-mortem ID, if any. One incident can only link to a
            single post-mortem.
        images:
          type: array
          items:
            $ref: '#/components/schemas/Image'
          description: Attached images.
        manual_overrides:
          type: array
          items:
            type: string
          description: Fields that were manually overridden after auto-population.
        data_source_id:
          type: integer
          format: int64
          description: Deprecated. Use `integration_id` instead.
          deprecated: true
        data_source_ids:
          type: array
          items:
            type: integer
            format: int64
          description: Deprecated. Use `integration_ids` instead.
          deprecated: true
        data_source_type:
          type: string
          description: Deprecated. Use `integration_type` instead.
          deprecated: true
        data_source_types:
          type: array
          items:
            type: string
          description: Deprecated. Use `integration_types` instead.
          deprecated: true
    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
    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.
    AlertInfo:
      type: object
      description: Detailed alert item.
      required:
        - alert_id
        - integration_id
        - data_source_id
        - channel_id
        - account_id
        - description
        - title
        - title_rule
        - alert_key
        - alert_severity
        - alert_status
        - start_time
        - last_time
        - end_time
        - labels
        - ever_muted
        - created_at
        - updated_at
        - integration_name
        - integration_type
        - integration_ref_id
        - channel_name
        - channel_status
        - responder_name
        - responder_email
        - event_cnt
        - images
        - data_source_name
        - data_source_ref_id
      properties:
        alert_id:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
          description: Alert ID (MongoDB ObjectID).
        integration_id:
          type: integer
          format: int64
          description: Integration ID that produced the alert.
        data_source_id:
          type: integer
          format: int64
          description: Deprecated. Use `integration_id` instead.
        channel_id:
          type: integer
          format: int64
          description: Channel ID.
        account_id:
          type: integer
          format: int64
          description: Account ID.
        description:
          type: string
          description: Alert description.
        title:
          type: string
          description: Alert title.
        title_rule:
          type: string
          description: Title rendering rule.
        alert_key:
          type: string
          description: Deduplication key used to merge events into the alert.
        alert_severity:
          type: string
          enum:
            - Critical
            - Warning
            - Info
            - Ok
          description: Current severity.
        alert_status:
          type: string
          enum:
            - Critical
            - Warning
            - Info
            - Ok
          description: Current status.
        start_time:
          type: integer
          format: int64
          description: Unix timestamp (seconds) when the alert first fired.
        last_time:
          type: integer
          format: int64
          description: Unix timestamp (seconds) of the most recent event.
        end_time:
          type: integer
          format: int64
          description: >-
            Unix timestamp (seconds) when the alert recovered. 0 if still
            active.
        labels:
          type: object
          additionalProperties:
            type: string
          description: Alert labels.
        ever_muted:
          type: boolean
          description: Whether this alert has ever been silenced.
        deleted_at:
          type: integer
          format: int64
          description: Soft-delete timestamp (seconds). Zero if not deleted.
        created_at:
          type: integer
          format: int64
          description: Creation timestamp (seconds).
        updated_at:
          type: integer
          format: int64
          description: Last update timestamp (seconds).
        integration_name:
          type: string
          description: Integration display name.
        integration_type:
          type: string
          description: Integration type string.
        integration_ref_id:
          type: string
          description: Integration reference ID.
        channel_name:
          type: string
          description: Channel display name.
        channel_status:
          type: string
          description: Channel status.
        responder_name:
          type: string
          description: Primary responder name, if any.
        responder_email:
          type: string
          description: Primary responder email, if any.
        incident:
          $ref: '#/components/schemas/IncidentShort'
          description: Parent incident reference, if the alert has been merged into one.
        events:
          type: array
          items:
            $ref: '#/components/schemas/AlertEventItem'
          description: >-
            Raw alert event preview, populated only when requested. Capped at
            the 20 newest events per alert.
        event_cnt:
          type: integer
          format: int64
          description: Total number of raw events merged into this alert.
        images:
          type: array
          items:
            $ref: '#/components/schemas/Image'
          description: Attached images.
        data_source_name:
          type: string
          description: Deprecated. Use `integration_name`.
        data_source_type:
          type: string
          description: Deprecated. Use `integration_type`.
        data_source_ref_id:
          type: string
          description: Deprecated. Use `integration_ref_id`.
    PersonShort:
      type: object
      description: A Flashduty member reference.
      properties:
        person_id:
          type: integer
          format: int64
          description: Member ID.
        person_name:
          type: string
          description: Member display name.
        email:
          type: string
          format: email
          description: Member email address.
        as:
          type: string
          description: Role label for this member in the context of the current object.
    Responder:
      type: object
      description: Incident responder with assignment/acknowledgement timestamps.
      required:
        - person_id
        - assigned_at
        - acknowledged_at
      properties:
        person_id:
          type: integer
          format: int64
          description: Responder member ID.
        assigned_at:
          type: integer
          format: int64
          description: Unix timestamp (seconds) when the member was assigned.
        acknowledged_at:
          type: integer
          format: int64
          description: >-
            Unix timestamp (seconds) when the member acknowledged. 0 if not yet
            acknowledged.
        person_name:
          type: string
          description: Member display name, filled by the server.
        email:
          type: string
          format: email
          description: Member email, filled by the server.
        as:
          type: string
          description: Role label of this responder.
    LinkItem:
      type: object
      description: Channel-level link integration reference rendered from a template.
      required:
        - name
        - endpoint
        - open_type
      properties:
        name:
          type: string
          description: Display name of the link.
        endpoint:
          type: string
          description: Rendered URL for the link.
        open_type:
          type: string
          enum:
            - popup
            - tab
          description: How the link should be opened.
    Image:
      type: object
      description: Image or attachment reference.
      required:
        - src
      properties:
        src:
          type: string
          description: Image source. Either an `img_` upload token or an `http(s)` URL.
        href:
          type: string
          description: Optional link the image points to.
        alt:
          type: string
          description: Alt text.
    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
    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`.
    AlertEventItem:
      type: object
      description: A raw alert event.
      properties:
        event_id:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
          description: Event ID (MongoDB ObjectID).
        alert_id:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
          description: Parent alert ID (MongoDB ObjectID).
        account_id:
          type: integer
          format: int64
          description: Account ID.
        channel_id:
          type: integer
          format: int64
          description: Channel ID the event is routed to.
        integration_id:
          type: integer
          format: int64
          description: Integration that produced this event.
        integration_type:
          type: string
          description: Type/plugin key of the integration that produced this event.
        data_source_id:
          type: integer
          format: int64
          description: Deprecated. Use `integration_id` instead.
        title:
          type: string
          description: Event title.
        title_rule:
          type: string
          description: Title template used to derive `title` from labels.
        description:
          type: string
          description: Event description.
        alert_key:
          type: string
          description: Deduplication key used to merge events into an alert.
        event_severity:
          type: string
          enum:
            - Critical
            - Warning
            - Info
            - Ok
          description: Severity of this event.
        event_status:
          type: string
          enum:
            - Critical
            - Warning
            - Info
            - Ok
          description: Status of this event.
        event_time:
          type: integer
          format: int64
          description: Event timestamp, Unix epoch seconds.
        labels:
          type: object
          additionalProperties:
            type: string
          description: Label key-value pairs.
        images:
          type: array
          items:
            $ref: '#/components/schemas/AlertImage'
          description: Images attached to the event.
        created_at:
          type: integer
          format: int64
          description: Record creation time, Unix epoch seconds.
        updated_at:
          type: integer
          format: int64
          description: Record update time, Unix epoch seconds.
        deleted_at:
          type: integer
          format: int64
          description: Soft-delete timestamp (seconds). Zero if not deleted.
    AlertImage:
      type: object
      description: An image attachment on an alert or event.
      required:
        - src
      properties:
        href:
          type: string
          description: Optional link URL when the image is clicked.
        src:
          type: string
          description: >-
            Image source URL or internal image reference (starts with `img_` or
            `http`).
        alt:
          type: string
          description: Alt text.
  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.

````