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

# Get alert timeline

> Retrieve paginated timeline entries for an alert.



## OpenAPI

````yaml https://app.cotool.ai/api/docs/openapi.json get /api/alerts/{alertId}/timeline
openapi: 3.1.0
info:
  title: Cotool API
  version: 1.0.0
  description: >-
    The Cotool REST API. Authenticate with an API key from `/settings/api-keys`
    sent as `Authorization: Bearer <key>`.


    Authentication, error formats, pagination, and common integration recipes
    are documented in the [API
    overview](https://docs.cotool.ai/api-reference/introduction). Endpoints
    marked **Deprecated** keep working; each one's description names its
    replacement.
servers:
  - url: https://app.cotool.ai
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: Agents
    description: Create, update, run, and version agents.
  - name: Agent Runs
    description: Inspect agent runs, submit feedback, and read evaluation metrics.
  - name: Agent Triggers
    description: Webhook, schedule, and integration triggers that start agent runs.
  - name: Agents as Code
    description: Validate agents and skills defined as YAML in a Git repository.
  - name: Skills
    description: Reusable instructions and tool grants attached to agents.
  - name: Chat
    description: Chat sessions and their transcripts.
  - name: Alerts
    description: Alert triage, routing, and escalation notifications.
  - name: Output Destinations
    description: Webhook, Slack, Jira, and Linear destinations for agent output.
  - name: Detections
    description: Detection agents, detection hits, and the Cotool detection library.
  - name: Hunt
    description: Autonomous hunt threats, gaps, and settings.
  - name: Intel
    description: Threat-intelligence feed items, indicators, and sources.
  - name: Threat Model
    description: The organization threat model and its version history.
  - name: MITRE Coverage
    description: MITRE ATT&CK coverage across detections.
  - name: Tools
    description: Connected tool integrations and captured tool output.
  - name: CLIs
    description: Connected CLI integrations.
  - name: Artifacts
    description: Files and reports produced by agent runs.
  - name: Audit Logs
    description: Organization audit log export and event catalog.
  - name: Users
    description: Users, memberships, and the current session.
  - name: Roles
    description: Role-based permissions.
  - name: Organizations
    description: Organization-level metrics.
paths:
  /api/alerts/{alertId}/timeline:
    get:
      tags:
        - Alerts
      summary: Get alert timeline
      description: Retrieve paginated timeline entries for an alert.
      parameters:
        - in: path
          name: alertId
          description: Alert UUID or human-readable display ID
          schema:
            type: string
            description: Alert UUID or human-readable display ID
          required: true
        - in: query
          name: limit
          description: Maximum number of timeline entries to return
          schema:
            type: integer
            minimum: 1
            maximum: 200
            default: 100
            description: Maximum number of timeline entries to return
        - in: query
          name: offset
          description: Number of timeline entries to skip
          schema:
            type: integer
            minimum: 0
            default: 0
            description: Number of timeline entries to skip
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  entries:
                    type: array
                    items:
                      oneOf:
                        - type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: Timeline entry identifier
                            organizationId:
                              type: string
                              format: uuid
                              description: Organization that owns the timeline entry
                            alertId:
                              type: string
                              format: uuid
                              description: Alert this entry belongs to
                            createdAt:
                              type: string
                              description: ISO timestamp when the entry was created
                            actorType:
                              type: string
                              enum:
                                - human
                                - agent
                                - system
                              description: Actor class responsible for a timeline entry.
                            actorUserId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: Human actor user id, when actorType is human
                            actorAgentId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: Agent actor id, when actorType is agent
                            actorRunId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: >-
                                Run responsible for this entry, stored as
                                chats.id
                            actorUserName:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved display name for a human actor,
                                hydrated for rendering
                            actorUserImageUrl:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved avatar image URL for a human actor,
                                when one is available
                            actorAgentName:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved display name for an agent actor or
                                referenced assigned agent
                            kind:
                              type: string
                              const: created
                            bodyMarkdown:
                              type:
                                - string
                                - 'null'
                              description: Timeline body, when this entry has prose content
                            beforeStatus:
                              type:
                                - string
                                - 'null'
                              enum:
                                - open
                                - in_progress
                                - escalated
                                - closed_true_positive
                                - closed_false_positive
                                - closed_true_positive_benign
                                - dismissed
                                - duplicate
                                - expired
                                - null
                              description: Status before a status transition
                            afterStatus:
                              type:
                                - string
                                - 'null'
                              enum:
                                - open
                                - in_progress
                                - escalated
                                - closed_true_positive
                                - closed_false_positive
                                - closed_true_positive_benign
                                - dismissed
                                - duplicate
                                - expired
                                - null
                              description: Status after a status transition
                            metadata:
                              type: object
                              properties:
                                source:
                                  type: object
                                  properties:
                                    category:
                                      type: string
                                      enum:
                                        - detection
                                        - trigger
                                        - hunt
                                        - api
                                        - agent
                                      description: >-
                                        Broad alert source category. Hunt covers
                                        threat-intel exposure alerts minted by
                                        the Hunt surface; api covers alerts
                                        submitted through an API source; agent
                                        covers alerts deliberately created by an
                                        agent.
                                    name:
                                      type: string
                                      enum:
                                        - cotool_detection
                                        - cotool_code
                                        - cotool_signal
                                        - hunt
                                        - hunt_v2
                                        - api
                                        - agent
                                        - jira
                                        - jira-automation
                                        - slack
                                        - linear
                                        - cron
                                        - webhook
                                        - email
                                        - bugcrowd
                                        - hackerone
                                        - zscaler
                                        - darktrace
                                        - seon
                                      description: >-
                                        Filter-oriented alert source name.
                                        Trigger-created alerts use the trigger
                                        type.
                                    triggerType:
                                      type:
                                        - string
                                        - 'null'
                                      enum:
                                        - jira
                                        - jira-automation
                                        - slack
                                        - linear
                                        - cron
                                        - webhook
                                        - email
                                        - bugcrowd
                                        - hackerone
                                        - zscaler
                                        - darktrace
                                        - seon
                                        - null
                                      description: Trigger source when category is trigger
                                  required:
                                    - category
                                    - name
                                    - triggerType
                                  description: >-
                                    Filter-oriented source attribution for an
                                    alert.
                                originDetectionHitId:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                originTriggerId:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                sourcePayloadId:
                                  type: string
                                  format: uuid
                                notifications:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      destinationId:
                                        type: string
                                        format: uuid
                                        description: Output destination ID
                                      destinationType:
                                        type: string
                                        enum:
                                          - webhook
                                          - teams
                                          - slack
                                          - pagerduty
                                          - linear
                                          - tines
                                          - incidentio
                                      destinationName:
                                        type: string
                                        description: >-
                                          Name of the output destination when it
                                          was sent
                                      label:
                                        type:
                                          - string
                                          - 'null'
                                        description: >-
                                          What the destination created, e.g.
                                          "SEC-412"
                                      url:
                                        type:
                                          - string
                                          - 'null'
                                        format: uri
                                        description: Link to the message, issue, or case
                                      externalId:
                                        type: string
                                        description: >-
                                          Destination-side identifier (Slack
                                          channel and message ts, Linear issue id,
                                          ...); with the destination, identifies
                                          the notification
                                      sentAt:
                                        type: string
                                        format: date-time
                                        description: When the notification was sent
                                      threadTs:
                                        type: string
                                        description: >-
                                          Slack only: the thread root the post
                                          replied in; absent for a top-level post
                                      routeId:
                                        type: string
                                        format: uuid
                                        description: >-
                                          Escalation route that sent the
                                          notification; absent when it went to the
                                          default destinations
                                      routeName:
                                        type: string
                                        description: >-
                                          Name of the escalation route when it was
                                          sent
                                    required:
                                      - destinationId
                                      - destinationType
                                      - destinationName
                                      - label
                                      - url
                                      - externalId
                                      - sentAt
                                  description: >-
                                    New Alert posts, as the alert-created
                                    delivery sends them. A top-level Slack post
                                    is the alert's thread in its channel.
                              additionalProperties: true
                              description: Metadata for alert creation timeline entries.
                          required:
                            - id
                            - organizationId
                            - alertId
                            - createdAt
                            - actorType
                            - actorUserId
                            - actorAgentId
                            - actorRunId
                            - actorUserName
                            - actorUserImageUrl
                            - kind
                            - bodyMarkdown
                            - beforeStatus
                            - afterStatus
                            - metadata
                        - type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: Timeline entry identifier
                            organizationId:
                              type: string
                              format: uuid
                              description: Organization that owns the timeline entry
                            alertId:
                              type: string
                              format: uuid
                              description: Alert this entry belongs to
                            createdAt:
                              type: string
                              description: ISO timestamp when the entry was created
                            actorType:
                              type: string
                              enum:
                                - human
                                - agent
                                - system
                              description: Actor class responsible for a timeline entry.
                            actorUserId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: Human actor user id, when actorType is human
                            actorAgentId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: Agent actor id, when actorType is agent
                            actorRunId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: >-
                                Run responsible for this entry, stored as
                                chats.id
                            actorUserName:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved display name for a human actor,
                                hydrated for rendering
                            actorUserImageUrl:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved avatar image URL for a human actor,
                                when one is available
                            actorAgentName:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved display name for an agent actor or
                                referenced assigned agent
                            kind:
                              type: string
                              const: comment
                            bodyMarkdown:
                              type:
                                - string
                                - 'null'
                              description: Timeline body, when this entry has prose content
                            beforeStatus:
                              type:
                                - string
                                - 'null'
                              enum:
                                - open
                                - in_progress
                                - escalated
                                - closed_true_positive
                                - closed_false_positive
                                - closed_true_positive_benign
                                - dismissed
                                - duplicate
                                - expired
                                - null
                              description: Status before a status transition
                            afterStatus:
                              type:
                                - string
                                - 'null'
                              enum:
                                - open
                                - in_progress
                                - escalated
                                - closed_true_positive
                                - closed_false_positive
                                - closed_true_positive_benign
                                - dismissed
                                - duplicate
                                - expired
                                - null
                              description: Status after a status transition
                            metadata:
                              type: object
                              properties:
                                slackSource: {}
                                agentRun:
                                  description: >-
                                    The triage run this comment was sent to,
                                    when it was, as `{ agentId, runId }`
                              additionalProperties: true
                              description: Metadata for alert comment timeline entries.
                          required:
                            - id
                            - organizationId
                            - alertId
                            - createdAt
                            - actorType
                            - actorUserId
                            - actorAgentId
                            - actorRunId
                            - actorUserName
                            - actorUserImageUrl
                            - kind
                            - bodyMarkdown
                            - beforeStatus
                            - afterStatus
                            - metadata
                        - type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: Timeline entry identifier
                            organizationId:
                              type: string
                              format: uuid
                              description: Organization that owns the timeline entry
                            alertId:
                              type: string
                              format: uuid
                              description: Alert this entry belongs to
                            createdAt:
                              type: string
                              description: ISO timestamp when the entry was created
                            actorType:
                              type: string
                              enum:
                                - human
                                - agent
                                - system
                              description: Actor class responsible for a timeline entry.
                            actorUserId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: Human actor user id, when actorType is human
                            actorAgentId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: Agent actor id, when actorType is agent
                            actorRunId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: >-
                                Run responsible for this entry, stored as
                                chats.id
                            actorUserName:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved display name for a human actor,
                                hydrated for rendering
                            actorUserImageUrl:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved avatar image URL for a human actor,
                                when one is available
                            actorAgentName:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved display name for an agent actor or
                                referenced assigned agent
                            kind:
                              type: string
                              const: status_change
                            bodyMarkdown:
                              type:
                                - string
                                - 'null'
                              description: Timeline body, when this entry has prose content
                            beforeStatus:
                              type:
                                - string
                                - 'null'
                              enum:
                                - open
                                - in_progress
                                - escalated
                                - closed_true_positive
                                - closed_false_positive
                                - closed_true_positive_benign
                                - dismissed
                                - duplicate
                                - expired
                                - null
                              description: Status before a status transition
                            afterStatus:
                              type:
                                - string
                                - 'null'
                              enum:
                                - open
                                - in_progress
                                - escalated
                                - closed_true_positive
                                - closed_false_positive
                                - closed_true_positive_benign
                                - dismissed
                                - duplicate
                                - expired
                                - null
                              description: Status after a status transition
                            metadata:
                              type: object
                              properties:
                                reason:
                                  type:
                                    - string
                                    - 'null'
                                agentId:
                                  type: string
                                  format: uuid
                                runId:
                                  type: string
                                  format: uuid
                                outcome:
                                  type: string
                                  enum:
                                    - completed
                                    - failed
                                    - canceled
                                  description: >-
                                    How an alert triage run ended. `completed`
                                    means the run finished without setting a
                                    final disposition; `failed` means the agent
                                    run errored; `canceled` means the run was
                                    interrupted.
                                duplicateOfAlertId:
                                  type: string
                                  format: uuid
                                duplicateOfDisplayId:
                                  type: string
                                  pattern: ^COT-\d+$
                                  description: Human-readable alert identifier
                                duplicateOfTitle:
                                  type: string
                                  minLength: 1
                                notifications:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      destinationId:
                                        type: string
                                        format: uuid
                                        description: Output destination ID
                                      destinationType:
                                        type: string
                                        enum:
                                          - webhook
                                          - teams
                                          - slack
                                          - pagerduty
                                          - linear
                                          - tines
                                          - incidentio
                                      destinationName:
                                        type: string
                                        description: >-
                                          Name of the output destination when it
                                          was sent
                                      label:
                                        type:
                                          - string
                                          - 'null'
                                        description: >-
                                          What the destination created, e.g.
                                          "SEC-412"
                                      url:
                                        type:
                                          - string
                                          - 'null'
                                        format: uri
                                        description: Link to the message, issue, or case
                                      externalId:
                                        type: string
                                        description: >-
                                          Destination-side identifier (Slack
                                          channel and message ts, Linear issue id,
                                          ...); with the destination, identifies
                                          the notification
                                      sentAt:
                                        type: string
                                        format: date-time
                                        description: When the notification was sent
                                      threadTs:
                                        type: string
                                        description: >-
                                          Slack only: the thread root the post
                                          replied in; absent for a top-level post
                                      routeId:
                                        type: string
                                        format: uuid
                                        description: >-
                                          Escalation route that sent the
                                          notification; absent when it went to the
                                          default destinations
                                      routeName:
                                        type: string
                                        description: >-
                                          Name of the escalation route when it was
                                          sent
                                    required:
                                      - destinationId
                                      - destinationType
                                      - destinationName
                                      - label
                                      - url
                                      - externalId
                                      - sentAt
                                  description: >-
                                    For an escalation, where its notifications
                                    landed, as the delivery jobs send them
                                alternativeExplanations:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                        format: uuid
                                      statement:
                                        type: string
                                        minLength: 1
                                        maxLength: 160
                                        description: >-
                                          One present-tense sentence a reviewer
                                          can confirm, e.g. "ClickUp is an
                                          approved Gmail integration".
                                      disposition:
                                        type: string
                                        enum:
                                          - false_positive
                                          - true_positive_benign
                                        description: >-
                                          How the alert closes when a reviewer
                                          confirms this explanation: the activity
                                          happened but is expected (benign), or
                                          the detection claim is wrong (false
                                          positive).
                                      basis:
                                        type: string
                                        minLength: 1
                                        maxLength: 600
                                        description: >-
                                          The cue in the evidence that makes the
                                          explanation plausible and the gap in the
                                          escalation it would fill.
                                    required:
                                      - id
                                      - statement
                                      - disposition
                                      - basis
                                  description: >-
                                    For an agent escalation, explanations the
                                    agent could not rule out that a reviewer can
                                    confirm to close the alert. Recorded by the
                                    generation job after the escalation; absent
                                    until then or when none apply.
                                confirmedAlternativeExplanation:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      format: uuid
                                    statement:
                                      type: string
                                      minLength: 1
                                      maxLength: 160
                                      description: >-
                                        One present-tense sentence a reviewer
                                        can confirm, e.g. "ClickUp is an
                                        approved Gmail integration".
                                    disposition:
                                      type: string
                                      enum:
                                        - false_positive
                                        - true_positive_benign
                                      description: >-
                                        How the alert closes when a reviewer
                                        confirms this explanation: the activity
                                        happened but is expected (benign), or
                                        the detection claim is wrong (false
                                        positive).
                                    basis:
                                      type: string
                                      minLength: 1
                                      maxLength: 600
                                      description: >-
                                        The cue in the evidence that makes the
                                        explanation plausible and the gap in the
                                        escalation it would fill.
                                    escalationTimelineEntryId:
                                      type: string
                                      format: uuid
                                      description: >-
                                        The escalation entry the explanation was
                                        offered on
                                  required:
                                    - id
                                    - statement
                                    - disposition
                                    - basis
                                    - escalationTimelineEntryId
                                  description: >-
                                    For a close, the alternative explanation the
                                    reviewer confirmed, when the close came from
                                    confirming one
                                nextSteps:
                                  description: >-
                                    For an escalation, its next steps with who
                                    does each and where each stands. Escalations
                                    recorded before steps had performers carry
                                    only their text steps.
                              additionalProperties: true
                              description: >-
                                Metadata for alert status-change timeline
                                entries.
                          required:
                            - id
                            - organizationId
                            - alertId
                            - createdAt
                            - actorType
                            - actorUserId
                            - actorAgentId
                            - actorRunId
                            - actorUserName
                            - actorUserImageUrl
                            - kind
                            - bodyMarkdown
                            - beforeStatus
                            - afterStatus
                            - metadata
                        - type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: Timeline entry identifier
                            organizationId:
                              type: string
                              format: uuid
                              description: Organization that owns the timeline entry
                            alertId:
                              type: string
                              format: uuid
                              description: Alert this entry belongs to
                            createdAt:
                              type: string
                              description: ISO timestamp when the entry was created
                            actorType:
                              type: string
                              enum:
                                - human
                                - agent
                                - system
                              description: Actor class responsible for a timeline entry.
                            actorUserId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: Human actor user id, when actorType is human
                            actorAgentId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: Agent actor id, when actorType is agent
                            actorRunId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: >-
                                Run responsible for this entry, stored as
                                chats.id
                            actorUserName:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved display name for a human actor,
                                hydrated for rendering
                            actorUserImageUrl:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved avatar image URL for a human actor,
                                when one is available
                            actorAgentName:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved display name for an agent actor or
                                referenced assigned agent
                            kind:
                              type: string
                              const: title_change
                            bodyMarkdown:
                              type:
                                - string
                                - 'null'
                              description: Timeline body, when this entry has prose content
                            beforeStatus:
                              type:
                                - string
                                - 'null'
                              enum:
                                - open
                                - in_progress
                                - escalated
                                - closed_true_positive
                                - closed_false_positive
                                - closed_true_positive_benign
                                - dismissed
                                - duplicate
                                - expired
                                - null
                              description: Status before a status transition
                            afterStatus:
                              type:
                                - string
                                - 'null'
                              enum:
                                - open
                                - in_progress
                                - escalated
                                - closed_true_positive
                                - closed_false_positive
                                - closed_true_positive_benign
                                - dismissed
                                - duplicate
                                - expired
                                - null
                              description: Status after a status transition
                            metadata:
                              type: object
                              properties:
                                beforeTitle:
                                  type:
                                    - string
                                    - 'null'
                                afterTitle:
                                  type:
                                    - string
                                    - 'null'
                              additionalProperties: true
                              description: >-
                                Metadata for alert title-change timeline
                                entries.
                          required:
                            - id
                            - organizationId
                            - alertId
                            - createdAt
                            - actorType
                            - actorUserId
                            - actorAgentId
                            - actorRunId
                            - actorUserName
                            - actorUserImageUrl
                            - kind
                            - bodyMarkdown
                            - beforeStatus
                            - afterStatus
                            - metadata
                        - type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: Timeline entry identifier
                            organizationId:
                              type: string
                              format: uuid
                              description: Organization that owns the timeline entry
                            alertId:
                              type: string
                              format: uuid
                              description: Alert this entry belongs to
                            createdAt:
                              type: string
                              description: ISO timestamp when the entry was created
                            actorType:
                              type: string
                              enum:
                                - human
                                - agent
                                - system
                              description: Actor class responsible for a timeline entry.
                            actorUserId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: Human actor user id, when actorType is human
                            actorAgentId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: Agent actor id, when actorType is agent
                            actorRunId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: >-
                                Run responsible for this entry, stored as
                                chats.id
                            actorUserName:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved display name for a human actor,
                                hydrated for rendering
                            actorUserImageUrl:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved avatar image URL for a human actor,
                                when one is available
                            actorAgentName:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved display name for an agent actor or
                                referenced assigned agent
                            kind:
                              type: string
                              const: description_change
                            bodyMarkdown:
                              type:
                                - string
                                - 'null'
                              description: Timeline body, when this entry has prose content
                            beforeStatus:
                              type:
                                - string
                                - 'null'
                              enum:
                                - open
                                - in_progress
                                - escalated
                                - closed_true_positive
                                - closed_false_positive
                                - closed_true_positive_benign
                                - dismissed
                                - duplicate
                                - expired
                                - null
                              description: Status before a status transition
                            afterStatus:
                              type:
                                - string
                                - 'null'
                              enum:
                                - open
                                - in_progress
                                - escalated
                                - closed_true_positive
                                - closed_false_positive
                                - closed_true_positive_benign
                                - dismissed
                                - duplicate
                                - expired
                                - null
                              description: Status after a status transition
                            metadata:
                              type: object
                              properties:
                                beforeDescription:
                                  type:
                                    - string
                                    - 'null'
                                afterDescription:
                                  type:
                                    - string
                                    - 'null'
                              additionalProperties: true
                              description: >-
                                Metadata for alert description-change timeline
                                entries.
                          required:
                            - id
                            - organizationId
                            - alertId
                            - createdAt
                            - actorType
                            - actorUserId
                            - actorAgentId
                            - actorRunId
                            - actorUserName
                            - actorUserImageUrl
                            - kind
                            - bodyMarkdown
                            - beforeStatus
                            - afterStatus
                            - metadata
                        - type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: Timeline entry identifier
                            organizationId:
                              type: string
                              format: uuid
                              description: Organization that owns the timeline entry
                            alertId:
                              type: string
                              format: uuid
                              description: Alert this entry belongs to
                            createdAt:
                              type: string
                              description: ISO timestamp when the entry was created
                            actorType:
                              type: string
                              enum:
                                - human
                                - agent
                                - system
                              description: Actor class responsible for a timeline entry.
                            actorUserId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: Human actor user id, when actorType is human
                            actorAgentId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: Agent actor id, when actorType is agent
                            actorRunId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: >-
                                Run responsible for this entry, stored as
                                chats.id
                            actorUserName:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved display name for a human actor,
                                hydrated for rendering
                            actorUserImageUrl:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved avatar image URL for a human actor,
                                when one is available
                            actorAgentName:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved display name for an agent actor or
                                referenced assigned agent
                            kind:
                              type: string
                              const: severity_change
                            bodyMarkdown:
                              type:
                                - string
                                - 'null'
                              description: Timeline body, when this entry has prose content
                            beforeStatus:
                              type:
                                - string
                                - 'null'
                              enum:
                                - open
                                - in_progress
                                - escalated
                                - closed_true_positive
                                - closed_false_positive
                                - closed_true_positive_benign
                                - dismissed
                                - duplicate
                                - expired
                                - null
                              description: Status before a status transition
                            afterStatus:
                              type:
                                - string
                                - 'null'
                              enum:
                                - open
                                - in_progress
                                - escalated
                                - closed_true_positive
                                - closed_false_positive
                                - closed_true_positive_benign
                                - dismissed
                                - duplicate
                                - expired
                                - null
                              description: Status after a status transition
                            metadata:
                              type: object
                              properties:
                                beforeSeverity:
                                  type:
                                    - string
                                    - 'null'
                                  enum:
                                    - low
                                    - medium
                                    - high
                                    - critical
                                    - null
                                afterSeverity:
                                  type:
                                    - string
                                    - 'null'
                                  enum:
                                    - low
                                    - medium
                                    - high
                                    - critical
                                    - null
                                reason:
                                  type:
                                    - string
                                    - 'null'
                              additionalProperties: true
                              description: >-
                                Metadata for alert severity-change timeline
                                entries.
                          required:
                            - id
                            - organizationId
                            - alertId
                            - createdAt
                            - actorType
                            - actorUserId
                            - actorAgentId
                            - actorRunId
                            - actorUserName
                            - actorUserImageUrl
                            - kind
                            - bodyMarkdown
                            - beforeStatus
                            - afterStatus
                            - metadata
                        - type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: Timeline entry identifier
                            organizationId:
                              type: string
                              format: uuid
                              description: Organization that owns the timeline entry
                            alertId:
                              type: string
                              format: uuid
                              description: Alert this entry belongs to
                            createdAt:
                              type: string
                              description: ISO timestamp when the entry was created
                            actorType:
                              type: string
                              enum:
                                - human
                                - agent
                                - system
                              description: Actor class responsible for a timeline entry.
                            actorUserId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: Human actor user id, when actorType is human
                            actorAgentId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: Agent actor id, when actorType is agent
                            actorRunId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: >-
                                Run responsible for this entry, stored as
                                chats.id
                            actorUserName:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved display name for a human actor,
                                hydrated for rendering
                            actorUserImageUrl:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved avatar image URL for a human actor,
                                when one is available
                            actorAgentName:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved display name for an agent actor or
                                referenced assigned agent
                            kind:
                              type: string
                              const: assignment_change
                            bodyMarkdown:
                              type:
                                - string
                                - 'null'
                              description: Timeline body, when this entry has prose content
                            beforeStatus:
                              type:
                                - string
                                - 'null'
                              enum:
                                - open
                                - in_progress
                                - escalated
                                - closed_true_positive
                                - closed_false_positive
                                - closed_true_positive_benign
                                - dismissed
                                - duplicate
                                - expired
                                - null
                              description: Status before a status transition
                            afterStatus:
                              type:
                                - string
                                - 'null'
                              enum:
                                - open
                                - in_progress
                                - escalated
                                - closed_true_positive
                                - closed_false_positive
                                - closed_true_positive_benign
                                - dismissed
                                - duplicate
                                - expired
                                - null
                              description: Status after a status transition
                            metadata:
                              type: object
                              properties:
                                reason:
                                  type:
                                    - string
                                    - 'null'
                                assignedAgentId:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                runId:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                              additionalProperties: true
                              description: >-
                                Metadata for alert assignment-change timeline
                                entries.
                          required:
                            - id
                            - organizationId
                            - alertId
                            - createdAt
                            - actorType
                            - actorUserId
                            - actorAgentId
                            - actorRunId
                            - actorUserName
                            - actorUserImageUrl
                            - kind
                            - bodyMarkdown
                            - beforeStatus
                            - afterStatus
                            - metadata
                        - type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: Timeline entry identifier
                            organizationId:
                              type: string
                              format: uuid
                              description: Organization that owns the timeline entry
                            alertId:
                              type: string
                              format: uuid
                              description: Alert this entry belongs to
                            createdAt:
                              type: string
                              description: ISO timestamp when the entry was created
                            actorType:
                              type: string
                              enum:
                                - human
                                - agent
                                - system
                              description: Actor class responsible for a timeline entry.
                            actorUserId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: Human actor user id, when actorType is human
                            actorAgentId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: Agent actor id, when actorType is agent
                            actorRunId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: >-
                                Run responsible for this entry, stored as
                                chats.id
                            actorUserName:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved display name for a human actor,
                                hydrated for rendering
                            actorUserImageUrl:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved avatar image URL for a human actor,
                                when one is available
                            actorAgentName:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved display name for an agent actor or
                                referenced assigned agent
                            kind:
                              type: string
                              const: triage_run
                            bodyMarkdown:
                              type:
                                - string
                                - 'null'
                              description: Timeline body, when this entry has prose content
                            beforeStatus:
                              type:
                                - string
                                - 'null'
                              enum:
                                - open
                                - in_progress
                                - escalated
                                - closed_true_positive
                                - closed_false_positive
                                - closed_true_positive_benign
                                - dismissed
                                - duplicate
                                - expired
                                - null
                              description: Status before a status transition
                            afterStatus:
                              type:
                                - string
                                - 'null'
                              enum:
                                - open
                                - in_progress
                                - escalated
                                - closed_true_positive
                                - closed_false_positive
                                - closed_true_positive_benign
                                - dismissed
                                - duplicate
                                - expired
                                - null
                              description: Status after a status transition
                            metadata:
                              type: object
                              properties:
                                reason:
                                  type:
                                    - string
                                    - 'null'
                                agentId:
                                  type: string
                                  format: uuid
                                runId:
                                  type: string
                                  format: uuid
                                outcome:
                                  type: string
                                  enum:
                                    - completed
                                    - failed
                                    - canceled
                                  description: >-
                                    How an alert triage run ended. `completed`
                                    means the run finished without setting a
                                    final disposition; `failed` means the agent
                                    run errored; `canceled` means the run was
                                    interrupted.
                              additionalProperties: true
                              description: Metadata for alert triage-run timeline entries.
                          required:
                            - id
                            - organizationId
                            - alertId
                            - createdAt
                            - actorType
                            - actorUserId
                            - actorAgentId
                            - actorRunId
                            - actorUserName
                            - actorUserImageUrl
                            - kind
                            - bodyMarkdown
                            - beforeStatus
                            - afterStatus
                            - metadata
                        - type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: Timeline entry identifier
                            organizationId:
                              type: string
                              format: uuid
                              description: Organization that owns the timeline entry
                            alertId:
                              type: string
                              format: uuid
                              description: Alert this entry belongs to
                            createdAt:
                              type: string
                              description: ISO timestamp when the entry was created
                            actorType:
                              type: string
                              enum:
                                - human
                                - agent
                                - system
                              description: Actor class responsible for a timeline entry.
                            actorUserId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: Human actor user id, when actorType is human
                            actorAgentId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: Agent actor id, when actorType is agent
                            actorRunId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: >-
                                Run responsible for this entry, stored as
                                chats.id
                            actorUserName:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved display name for a human actor,
                                hydrated for rendering
                            actorUserImageUrl:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved avatar image URL for a human actor,
                                when one is available
                            actorAgentName:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved display name for an agent actor or
                                referenced assigned agent
                            kind:
                              type: string
                              const: duplicate_linked
                            bodyMarkdown:
                              type:
                                - string
                                - 'null'
                              description: Timeline body, when this entry has prose content
                            beforeStatus:
                              type:
                                - string
                                - 'null'
                              enum:
                                - open
                                - in_progress
                                - escalated
                                - closed_true_positive
                                - closed_false_positive
                                - closed_true_positive_benign
                                - dismissed
                                - duplicate
                                - expired
                                - null
                              description: Status before a status transition
                            afterStatus:
                              type:
                                - string
                                - 'null'
                              enum:
                                - open
                                - in_progress
                                - escalated
                                - closed_true_positive
                                - closed_false_positive
                                - closed_true_positive_benign
                                - dismissed
                                - duplicate
                                - expired
                                - null
                              description: Status after a status transition
                            metadata:
                              type: object
                              properties:
                                duplicateAlertId:
                                  type: string
                                  format: uuid
                                duplicateAlertDisplayId:
                                  type: string
                                  pattern: ^COT-\d+$
                                  description: Human-readable alert identifier
                                duplicateAlertTitle:
                                  type: string
                                  minLength: 1
                              required:
                                - duplicateAlertId
                                - duplicateAlertDisplayId
                                - duplicateAlertTitle
                              description: >-
                                Metadata for an alert marked as a duplicate of
                                this alert.
                          required:
                            - id
                            - organizationId
                            - alertId
                            - createdAt
                            - actorType
                            - actorUserId
                            - actorAgentId
                            - actorRunId
                            - actorUserName
                            - actorUserImageUrl
                            - kind
                            - bodyMarkdown
                            - beforeStatus
                            - afterStatus
                            - metadata
                        - type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: Timeline entry identifier
                            organizationId:
                              type: string
                              format: uuid
                              description: Organization that owns the timeline entry
                            alertId:
                              type: string
                              format: uuid
                              description: Alert this entry belongs to
                            createdAt:
                              type: string
                              description: ISO timestamp when the entry was created
                            actorType:
                              type: string
                              enum:
                                - human
                                - agent
                                - system
                              description: Actor class responsible for a timeline entry.
                            actorUserId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: Human actor user id, when actorType is human
                            actorAgentId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: Agent actor id, when actorType is agent
                            actorRunId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: >-
                                Run responsible for this entry, stored as
                                chats.id
                            actorUserName:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved display name for a human actor,
                                hydrated for rendering
                            actorUserImageUrl:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved avatar image URL for a human actor,
                                when one is available
                            actorAgentName:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved display name for an agent actor or
                                referenced assigned agent
                            kind:
                              type: string
                              const: external_event
                            bodyMarkdown:
                              type:
                                - string
                                - 'null'
                              description: Timeline body, when this entry has prose content
                            beforeStatus:
                              type:
                                - string
                                - 'null'
                              enum:
                                - open
                                - in_progress
                                - escalated
                                - closed_true_positive
                                - closed_false_positive
                                - closed_true_positive_benign
                                - dismissed
                                - duplicate
                                - expired
                                - null
                              description: Status before a status transition
                            afterStatus:
                              type:
                                - string
                                - 'null'
                              enum:
                                - open
                                - in_progress
                                - escalated
                                - closed_true_positive
                                - closed_false_positive
                                - closed_true_positive_benign
                                - dismissed
                                - duplicate
                                - expired
                                - null
                              description: Status after a status transition
                            metadata:
                              type: object
                              properties:
                                slackThread:
                                  type: object
                                  properties:
                                    teamId:
                                      type: string
                                      pattern: ^T[A-Z0-9]+$
                                    channelId:
                                      type: string
                                      pattern: ^[CG][A-Z0-9]+$
                                    threadTs:
                                      type: string
                                      pattern: ^\d+\.\d+$
                                    url:
                                      type:
                                        - string
                                        - 'null'
                                      format: uri
                                      description: Link to the thread root
                                    replies:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          messageTs:
                                            type: string
                                            pattern: ^\d+\.\d+$
                                          userId:
                                            type: string
                                            pattern: ^[UWB][A-Z0-9]+$
                                            description: >-
                                              The author's Slack user ID, or the bot
                                              ID of an app that posted without a user
                                          userName:
                                            type: string
                                            minLength: 1
                                            maxLength: 200
                                          text:
                                            type: string
                                            minLength: 1
                                            maxLength: 4000
                                          textTruncated:
                                            type: boolean
                                          permalink:
                                            type: string
                                            format: uri
                                          editedAt:
                                            type: string
                                            format: date-time
                                            description: >-
                                              When the author last edited the reply in
                                              Slack
                                        required:
                                          - messageTs
                                          - userId
                                          - text
                                      maxItems: 200
                                      description: >-
                                        Replies oldest first, by Slack message
                                        timestamp
                                  required:
                                    - teamId
                                    - channelId
                                    - threadTs
                                    - url
                                    - replies
                                  description: >-
                                    Replies people and apps posted in one of the
                                    alert's Slack threads, mirrored from Slack
                              additionalProperties: true
                              description: >-
                                Metadata for externally mirrored alert timeline
                                entries.
                          required:
                            - id
                            - organizationId
                            - alertId
                            - createdAt
                            - actorType
                            - actorUserId
                            - actorAgentId
                            - actorRunId
                            - actorUserName
                            - actorUserImageUrl
                            - kind
                            - bodyMarkdown
                            - beforeStatus
                            - afterStatus
                            - metadata
                        - type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: Timeline entry identifier
                            organizationId:
                              type: string
                              format: uuid
                              description: Organization that owns the timeline entry
                            alertId:
                              type: string
                              format: uuid
                              description: Alert this entry belongs to
                            createdAt:
                              type: string
                              description: ISO timestamp when the entry was created
                            actorType:
                              type: string
                              enum:
                                - human
                                - agent
                                - system
                              description: Actor class responsible for a timeline entry.
                            actorUserId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: Human actor user id, when actorType is human
                            actorAgentId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: Agent actor id, when actorType is agent
                            actorRunId:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: >-
                                Run responsible for this entry, stored as
                                chats.id
                            actorUserName:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved display name for a human actor,
                                hydrated for rendering
                            actorUserImageUrl:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved avatar image URL for a human actor,
                                when one is available
                            actorAgentName:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Resolved display name for an agent actor or
                                referenced assigned agent
                            kind:
                              type: string
                              const: detection_tuned
                            bodyMarkdown:
                              type:
                                - string
                                - 'null'
                              description: Timeline body, when this entry has prose content
                            beforeStatus:
                              type:
                                - string
                                - 'null'
                              enum:
                                - open
                                - in_progress
                                - escalated
                                - closed_true_positive
                                - closed_false_positive
                                - closed_true_positive_benign
                                - dismissed
                                - duplicate
                                - expired
                                - null
                              description: Status before a status transition
                            afterStatus:
                              type:
                                - string
                                - 'null'
                              enum:
                                - open
                                - in_progress
                                - escalated
                                - closed_true_positive
                                - closed_false_positive
                                - closed_true_positive_benign
                                - dismissed
                                - duplicate
                                - expired
                                - null
                              description: Status after a status transition
                            metadata:
                              type: object
                              properties:
                                detectionId:
                                  type: string
                                  format: uuid
                                detectionName:
                                  type:
                                    - string
                                    - 'null'
                                versionId:
                                  type: string
                                  format: uuid
                                version:
                                  type:
                                    - integer
                                    - 'null'
                                  exclusiveMinimum: 0
                                proposalId:
                                  type: string
                                  format: uuid
                                chatId:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                role:
                                  type: string
                                  enum:
                                    - fp_eliminated
                                    - benign_eliminated
                                    - tp_retained
                                  description: >-
                                    How this alert's label figured in the
                                    approved tuning proposal: its false-positive
                                    or benign label was eliminated by the
                                    change, or it was a true positive the
                                    backtest verified the new version still
                                    catches.
                                windowStart:
                                  type: string
                                  format: date-time
                                windowEnd:
                                  type: string
                                  format: date-time
                              required:
                                - detectionId
                                - detectionName
                                - versionId
                                - version
                                - proposalId
                                - chatId
                                - role
                                - windowStart
                                - windowEnd
                              additionalProperties: true
                              description: >-
                                Metadata recorded on cited alerts when a tuning
                                proposal built on this alert's feedback is
                                approved and published.
                          required:
                            - id
                            - organizationId
                            - alertId
                            - createdAt
                            - actorType
                            - actorUserId
                            - actorAgentId
                            - actorRunId
                            - actorUserName
                            - actorUserImageUrl
                            - kind
                            - bodyMarkdown
                            - beforeStatus
                            - afterStatus
                            - metadata
                  totalCount:
                    type: integer
                    minimum: 0
                    description: Total number of timeline entries for this alert
                required:
                  - entries
                  - totalCount
        '400':
          description: Bad request — input validation failed or the request was malformed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '401':
          description: Unauthorized — missing or invalid API key / session
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden — the authenticated user lacks the required permissions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: shell
          label: cURL
          source: |-
            curl -X GET "https://app.cotool.ai/api/alerts/:alertId/timeline" \
              -H "Authorization: Bearer YOUR_API_KEY" \
              -H "Content-Type: application/json"
components:
  schemas:
    ValidationError:
      type: object
      properties:
        error:
          type: string
          description: Error message describing what went wrong
        issues:
          type: array
          description: >-
            Detailed validation issues, present when request or response schema
            validation fails
          items:
            type: object
            additionalProperties: true
      required:
        - error
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message describing what went wrong
      required:
        - error
    PermissionError:
      type: object
      properties:
        error:
          type: string
          description: Error message describing what went wrong
        missingPerms:
          type: array
          description: Permissions the authenticated user is missing for this operation
          items:
            type: string
      required:
        - error
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        API Key authentication for programmatic access. Include your API key in
        the Authorization header as: `Bearer your_api_key_here`

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.