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

# List output deliveries and notifications for an agent run

> Returns each output delivery and acceptance-criteria notification issued for the run, with its status, what was sent, and the most recent error.



## OpenAPI

````yaml https://app.cotool.ai/api/docs/openapi.json get /api/agent-runs/{runId}/deliveries
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/agent-runs/{runId}/deliveries:
    get:
      tags:
        - Agent Runs
      summary: List output deliveries and notifications for an agent run
      description: >-
        Returns each output delivery and acceptance-criteria notification issued
        for the run, with its status, what was sent, and the most recent error.
      parameters:
        - in: path
          name: runId
          description: Agent run (chat) ID
          schema:
            type: string
            format: uuid
            description: Agent run (chat) ID
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  deliveries:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: Delivery ID
                        runId:
                          type: string
                          format: uuid
                          description: Agent run (chat) ID this delivery belongs to
                        turnId:
                          type: string
                          format: uuid
                          description: Turn of the run whose output or evaluation was sent
                        evalId:
                          type:
                            - string
                            - 'null'
                          format: uuid
                          description: >-
                            Evaluation whose failed criteria were sent, for
                            acceptance-criteria deliveries
                        agentId:
                          type: string
                          format: uuid
                          description: Agent that produced the run
                        destinationId:
                          type: string
                          format: uuid
                          description: Output destination ID
                        destinationType:
                          type: string
                          enum:
                            - webhook
                            - teams
                            - slack
                            - pagerduty
                            - linear
                            - tines
                          description: Destination type
                        destinationName:
                          type: string
                          description: Destination name
                        destinationDeleted:
                          type: boolean
                          description: >-
                            True when the destination has since been deleted;
                            such deliveries cannot be resent
                        purpose:
                          type: string
                          enum:
                            - response
                            - acceptance-criteria
                          description: >-
                            What was sent: the turn output or an
                            acceptance-criteria notification
                        status:
                          type: string
                          enum:
                            - pending
                            - in_progress
                            - retrying
                            - sent
                            - failed
                          description: Status of the current attempt
                        attempt:
                          type: integer
                          description: >-
                            Latest job retry number reported by the current
                            attempt
                        resendCount:
                          type: integer
                          description: How many times a user has resent this delivery
                        preview:
                          type: object
                          properties:
                            title:
                              type: string
                              description: >-
                                Short title of the content that was (or will be)
                                sent
                            text:
                              type: string
                              description: >-
                                Truncated preview of the content that was (or
                                will be) sent
                          required:
                            - text
                          description: Preview of the content sent
                        sentSummary:
                          type:
                            - object
                            - 'null'
                          properties:
                            target:
                              type: string
                              description: >-
                                Credential-free description of where it went
                                (hostname, channel list, team, dedup key)
                            refs:
                              type: array
                              items:
                                type: object
                                properties:
                                  label:
                                    type: string
                                    description: >-
                                      Human-readable label for the created/sent
                                      artifact (e.g. Linear issue identifier)
                                  url:
                                    type: string
                                    description: >-
                                      Direct link to the artifact when the
                                      destination provides one
                                  externalId:
                                    type: string
                                    description: >-
                                      Destination-side identifier (e.g. Slack
                                      message ts, Linear issue id)
                                required:
                                  - label
                              description: Artifacts created or messages posted by the send
                            slackChannels:
                              type: array
                              items:
                                type: object
                                properties:
                                  channelId:
                                    type: string
                                    description: Slack channel ID
                                  status:
                                    type: string
                                    enum:
                                      - sent
                                      - skipped
                                    description: >-
                                      Whether the message was posted to this
                                      channel
                                  messageTs:
                                    type: string
                                    description: >-
                                      Slack message timestamp when posted by
                                      this attempt
                                  skipReason:
                                    type: string
                                    description: >-
                                      Why the channel was skipped (e.g.
                                      archived, bot not in channel)
                                required:
                                  - channelId
                                  - status
                              description: Per-channel results for Slack destinations
                            partial:
                              type: boolean
                              description: >-
                                True when at least one target (e.g. a Slack
                                channel) was skipped
                          required:
                            - target
                            - refs
                            - partial
                          description: Details recorded when the current attempt sent
                        error:
                          type:
                            - object
                            - 'null'
                          properties:
                            message:
                              type: string
                              description: >-
                                Error message from the most recent failed
                                attempt
                            name:
                              type: string
                              description: Error class name, when available
                            attempt:
                              type: integer
                              description: Job retry number that produced this error
                            at:
                              type: string
                              description: ISO timestamp when the error was recorded
                          required:
                            - message
                            - attempt
                            - at
                          description: Most recent error of the current attempt, if any
                        lastEnqueuedAt:
                          type: string
                          description: ISO timestamp when the current attempt was queued
                        startedAt:
                          type:
                            - string
                            - 'null'
                          description: ISO timestamp when the current attempt first started
                        sentAt:
                          type:
                            - string
                            - 'null'
                          description: ISO timestamp when the current attempt sent
                        failedAt:
                          type:
                            - string
                            - 'null'
                          description: ISO timestamp when the current attempt failed
                        attempts:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                format: uuid
                                description: Attempt ID
                              number:
                                type: integer
                                description: >-
                                  Position of this attempt within the delivery,
                                  starting at 1
                              trigger:
                                type: string
                                enum:
                                  - initial
                                  - resend
                                description: >-
                                  What opened the attempt: the run itself or a
                                  user resend
                              requestedByUserId:
                                type:
                                  - string
                                  - 'null'
                                format: uuid
                                description: >-
                                  User who requested the resend, when the
                                  trigger is resend
                              jobId:
                                type: string
                                format: uuid
                                description: The delivery job that ran this attempt
                              jobAttempt:
                                type: integer
                                description: Latest retry number the job reported
                              status:
                                type: string
                                enum:
                                  - pending
                                  - in_progress
                                  - retrying
                                  - sent
                                  - failed
                                description: Attempt status
                              error:
                                type:
                                  - object
                                  - 'null'
                                properties:
                                  message:
                                    type: string
                                    description: >-
                                      Error message from the most recent failed
                                      attempt
                                  name:
                                    type: string
                                    description: Error class name, when available
                                  attempt:
                                    type: integer
                                    description: Job retry number that produced this error
                                  at:
                                    type: string
                                    description: ISO timestamp when the error was recorded
                                required:
                                  - message
                                  - attempt
                                  - at
                                description: Most recent error of this attempt, if any
                              sentSummary:
                                type:
                                  - object
                                  - 'null'
                                properties:
                                  target:
                                    type: string
                                    description: >-
                                      Credential-free description of where it
                                      went (hostname, channel list, team, dedup
                                      key)
                                  refs:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        label:
                                          type: string
                                          description: >-
                                            Human-readable label for the
                                            created/sent artifact (e.g. Linear issue
                                            identifier)
                                        url:
                                          type: string
                                          description: >-
                                            Direct link to the artifact when the
                                            destination provides one
                                        externalId:
                                          type: string
                                          description: >-
                                            Destination-side identifier (e.g. Slack
                                            message ts, Linear issue id)
                                      required:
                                        - label
                                    description: >-
                                      Artifacts created or messages posted by
                                      the send
                                  slackChannels:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        channelId:
                                          type: string
                                          description: Slack channel ID
                                        status:
                                          type: string
                                          enum:
                                            - sent
                                            - skipped
                                          description: >-
                                            Whether the message was posted to this
                                            channel
                                        messageTs:
                                          type: string
                                          description: >-
                                            Slack message timestamp when posted by
                                            this attempt
                                        skipReason:
                                          type: string
                                          description: >-
                                            Why the channel was skipped (e.g.
                                            archived, bot not in channel)
                                      required:
                                        - channelId
                                        - status
                                    description: Per-channel results for Slack destinations
                                  partial:
                                    type: boolean
                                    description: >-
                                      True when at least one target (e.g. a
                                      Slack channel) was skipped
                                required:
                                  - target
                                  - refs
                                  - partial
                                description: Details recorded when this attempt sent
                              enqueuedAt:
                                type: string
                                description: ISO timestamp when the attempt was queued
                              startedAt:
                                type:
                                  - string
                                  - 'null'
                                description: >-
                                  ISO timestamp when the job first started this
                                  attempt
                              finishedAt:
                                type:
                                  - string
                                  - 'null'
                                description: >-
                                  ISO timestamp when the attempt reached sent or
                                  failed
                            required:
                              - id
                              - number
                              - trigger
                              - requestedByUserId
                              - jobId
                              - jobAttempt
                              - status
                              - error
                              - sentSummary
                              - enqueuedAt
                              - startedAt
                              - finishedAt
                          description: Every attempt of this delivery, oldest first
                        createdAt:
                          type: string
                          description: ISO timestamp when the delivery was created
                        updatedAt:
                          type: string
                          description: ISO timestamp of the last status change
                      required:
                        - id
                        - runId
                        - turnId
                        - evalId
                        - agentId
                        - destinationId
                        - destinationType
                        - destinationName
                        - destinationDeleted
                        - purpose
                        - status
                        - attempt
                        - resendCount
                        - preview
                        - sentSummary
                        - error
                        - lastEnqueuedAt
                        - startedAt
                        - sentAt
                        - failedAt
                        - attempts
                        - createdAt
                        - updatedAt
                    description: Deliveries for the run, oldest first
                required:
                  - deliveries
        '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/agent-runs/:runId/deliveries"
            \
              -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`

````