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

# Update alert severity

> Update an alert severity and append a severity-change timeline entry.



## OpenAPI

````yaml https://app.cotool.ai/api/docs/openapi.json post /api/alerts/{alertId}/severity
openapi: 3.1.0
info:
  title: Cotool API
  version: 1.0.0
  description: >-
    # Cotool API Documentation


    The Cotool API allows you to interact with the Cotool platform
    programmatically, enabling you to build powerful integrations and automate
    your workflows.


    ## Getting an API Key


    Follow these steps to generate your API key:


    1. **Log in** to the Cotool web interface

    2. **Navigate** to `/settings/api-keys`

    3. **Click** "Generate Key"

    4. **Copy and store** your API key securely ⚠️ *It won't be shown again*


    ## API Key Authentication


    For programmatic access and integrations, use your API key with the
    Authorization header:


    ```http

    Authorization: Bearer your_api_key_here

    ```


    ```bash

    curl -X GET "https://app.cotool.ai/api/endpoint" \
      -H "Authorization: Bearer your_api_key_here" \
      -H "Content-Type: application/json"
    ```
servers:
  - url: https://app.cotool.ai
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /api/alerts/{alertId}/severity:
    post:
      tags:
        - Alerts
      summary: Update alert severity
      description: Update an alert severity and append a severity-change timeline entry.
      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
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                severity:
                  type: string
                  enum:
                    - low
                    - medium
                    - high
                    - critical
                  description: New alert severity
                reason:
                  type: string
                  minLength: 1
                  maxLength: 2000
                  description: Optional reason for the severity change
              required:
                - severity
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  alert:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: Internal alert identifier
                      displayId:
                        type: string
                        pattern: ^COT-\d+$
                        description: Human-readable alert identifier
                      organizationId:
                        type: string
                        format: uuid
                        description: Organization that owns the alert
                      organizationName:
                        type: string
                        minLength: 1
                        description: URL-safe organization name used in durable alert paths
                      title:
                        type: string
                        minLength: 1
                        description: Human-readable alert title
                      description:
                        type:
                          - string
                          - 'null'
                        description: Markdown summary or details for the alert
                      severity:
                        type:
                          - string
                          - 'null'
                        enum:
                          - low
                          - medium
                          - high
                          - critical
                          - null
                        description: Alert severity when known
                      status:
                        type: string
                        enum:
                          - open
                          - in_progress
                          - escalated
                          - closed_true_positive
                          - closed_false_positive
                          - closed_true_positive_benign
                        description: >-
                          Lifecycle status for a first-class alert. Terminal
                          closed statuses include final disposition.
                      source:
                        type: object
                        properties:
                          category:
                            type: string
                            enum:
                              - detection
                              - trigger
                              - hunting
                            description: >-
                              Broad alert source category. Hunting is reserved
                              for future threat-intel exposure alerts.
                          name:
                            type: string
                            enum:
                              - cotool_detection
                              - hunting
                              - jira
                              - jira-automation
                              - slack
                              - linear
                              - cron
                              - webhook
                              - email
                              - bugcrowd
                              - hackerone
                            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
                              - null
                            description: Trigger source when category is trigger
                        required:
                          - category
                          - name
                          - triggerType
                        description: Filter-oriented source attribution for an alert.
                      detection:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type:
                              - string
                              - 'null'
                            format: uuid
                            description: Cotool detection identifier when known
                          agentId:
                            type:
                              - string
                              - 'null'
                            format: uuid
                            description: Cotool detection agent identifier when known
                          name:
                            type: string
                            minLength: 1
                            description: Detection display name
                          kind:
                            type: string
                            enum:
                              - cotool
                              - external
                            description: >-
                              Whether this detection attribution is internal or
                              extracted
                        required:
                          - id
                          - agentId
                          - name
                          - kind
                        description: Detection attribution for the alert, when known.
                      createdBy:
                        type: string
                        enum:
                          - agent
                          - trigger
                          - system
                        description: Actor class that created the alert.
                      originAgentId:
                        type:
                          - string
                          - 'null'
                        format: uuid
                        description: Agent that produced or owns the source flow
                      originTriggerId:
                        type:
                          - string
                          - 'null'
                        format: uuid
                        description: >-
                          Trigger that created this alert, when source is an
                          external trigger
                      originRunId:
                        type:
                          - string
                          - 'null'
                        format: uuid
                        description: Run that minted the alert, stored as chats.id
                      originDetectionHitId:
                        type:
                          - string
                          - 'null'
                        format: uuid
                        description: >-
                          Detection hit that produced this alert, when
                          applicable
                      externalProvider:
                        type:
                          - string
                          - 'null'
                        enum:
                          - jira
                          - jira-automation
                          - slack
                          - linear
                          - cron
                          - webhook
                          - email
                          - bugcrowd
                          - hackerone
                          - null
                        description: >-
                          External trigger provider such as jira, linear, email,
                          or webhook
                      externalRef:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Provider-native event, ticket, message, or alert
                          identifier
                      externalUrl:
                        type:
                          - string
                          - 'null'
                        format: uri
                        description: Provider-native URL for the originating object
                      assignedAgentId:
                        type:
                          - string
                          - 'null'
                        format: uuid
                        description: Response agent currently assigned to triage this alert
                      triageRunId:
                        type:
                          - string
                          - 'null'
                        format: uuid
                        description: >-
                          Latest response-agent triage run for this alert,
                          stored as chats.id
                      dedupeKey:
                        type:
                          - string
                          - 'null'
                        description: Stable key used for idempotent alert creation
                      createdAt:
                        type: string
                        description: ISO timestamp when the alert was created
                      updatedAt:
                        type: string
                        description: ISO timestamp when the alert was last updated
                      firstTriagedAt:
                        type:
                          - string
                          - 'null'
                        description: ISO timestamp when triage first started
                      resolvedAt:
                        type:
                          - string
                          - 'null'
                        description: >-
                          ISO timestamp when the alert reached a terminal closed
                          status
                    required:
                      - id
                      - displayId
                      - organizationId
                      - organizationName
                      - title
                      - description
                      - severity
                      - status
                      - source
                      - detection
                      - createdBy
                      - originAgentId
                      - originTriggerId
                      - originRunId
                      - originDetectionHitId
                      - externalProvider
                      - externalRef
                      - externalUrl
                      - assignedAgentId
                      - triageRunId
                      - dedupeKey
                      - createdAt
                      - updatedAt
                      - firstTriagedAt
                      - resolvedAt
                  entry:
                    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
                              - 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
                              - null
                            description: Status after a status transition
                          metadata:
                            type: object
                            properties:
                              source:
                                type: object
                                properties:
                                  category:
                                    type: string
                                    enum:
                                      - detection
                                      - trigger
                                      - hunting
                                    description: >-
                                      Broad alert source category. Hunting is
                                      reserved for future threat-intel exposure
                                      alerts.
                                  name:
                                    type: string
                                    enum:
                                      - cotool_detection
                                      - hunting
                                      - jira
                                      - jira-automation
                                      - slack
                                      - linear
                                      - cron
                                      - webhook
                                      - email
                                      - bugcrowd
                                      - hackerone
                                    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
                                      - 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
                            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
                              - 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
                              - null
                            description: Status after a status transition
                          metadata:
                            type: object
                            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
                              - 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
                              - 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
                            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
                              - 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
                              - 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
                              - 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
                              - 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
                              - 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
                              - 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
                              - 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
                              - 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
                              - 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
                              - 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
                            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: 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
                              - 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
                              - null
                            description: Status after a status transition
                          metadata:
                            type: object
                            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
                required:
                  - alert
                  - entry
        '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 POST "https://app.cotool.ai/api/alerts/:alertId/severity" \
              -H "Authorization: Bearer YOUR_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{"severity":"low","reason":"string"}'
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`

````