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

# List agent dispatches

> Read the coding agent attempts on an issue.



## OpenAPI

````yaml /openapi.json get /agent-dispatches
openapi: 3.1.1
info:
  title: Sazabi Public API
  version: 1.0.0
  description: >
    Public REST API for Sazabi. Authenticate using a secret API key in the
    Authorization header.


    ## Pagination


    This API uses two pagination strategies depending on the endpoint type:


    ### Cursor-Based Pagination (List Endpoints)


    List endpoints (threads, messages, keys) use cursor-based pagination for
    efficient, consistent results:


    - **Parameters**: `limit` (items per page, default 50, max 100), `cursor`
    (opaque pagination token)

    - **Response**: Includes `nextCursor` field - pass this as `cursor` in the
    next request

    - **End of results**: When `nextCursor` is `null`, there are no more results

    - **Example**: `GET
    /v1/threads?limit=20&cursor=01234567-89ab-cdef-0123-456789abcdef`


    ### Page-Based Pagination (Search Endpoints)


    Search endpoints use page-based pagination due to the underlying search
    engine:


    - **Parameters**: `limit` (items per page, default 20, max 100), `page`
    (1-indexed page number)

    - **Response**: Includes `pagination` object with `page`, `limit`,
    `totalResults`, `totalPages`

    - **Example**: `GET /v1/search/threads?q=error&limit=10&page=2`
servers:
  - url: https://api.sazabi.com/v1
    description: Production
security: []
paths:
  /agent-dispatches:
    get:
      tags:
        - AgentDispatches
      summary: List agent dispatches
      description: Read the coding agent attempts on an issue.
      operationId: agentDispatches.list
      parameters:
        - name: organizationId
          in: query
          required: true
          schema:
            type: string
            minLength: 1
          allowEmptyValue: true
          allowReserved: true
        - name: projectId
          in: query
          required: true
          schema:
            type: string
            format: uuid
          allowEmptyValue: true
          allowReserved: true
        - name: issueId
          in: query
          required: false
          schema:
            type: string
            format: uuid
          allowEmptyValue: true
          allowReserved: true
        - name: connectionId
          in: query
          required: false
          schema:
            type: string
            format: uuid
          allowEmptyValue: true
          allowReserved: true
        - name: status
          in: query
          required: false
          schema:
            enum:
              - queued
              - running
              - waiting
              - paused
              - completed
              - failed
              - cancel_requested
              - cancelled
              - unknown
            type: string
          allowEmptyValue: true
          allowReserved: true
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
          allowEmptyValue: true
          allowReserved: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  dispatches:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        issueFixId:
                          anyOf:
                            - type: string
                              format: uuid
                            - type: 'null'
                          description: >-
                            The issue fix that started this session
                            (`issues.get`'s `fixes`); null for a session
                            Sazabi's agent started.
                        organizationId:
                          type: string
                          minLength: 1
                        projectId:
                          type: string
                          format: uuid
                        issueId:
                          anyOf:
                            - type: string
                              format: uuid
                            - type: 'null'
                        threadId:
                          type: string
                          format: uuid
                        connectionId:
                          type: string
                          format: uuid
                        provider:
                          type: string
                        requesterUserId:
                          anyOf:
                            - type: string
                            - type: 'null'
                          description: >-
                            The person who requested the fix; null for a session
                            an automatic fix started.
                        connectionOwnerUserId:
                          type: string
                        clientRequestId:
                          type: string
                        status:
                          enum:
                            - queued
                            - running
                            - waiting
                            - paused
                            - completed
                            - failed
                            - cancel_requested
                            - cancelled
                            - unknown
                          type: string
                        externalSessionId:
                          anyOf:
                            - type: string
                            - type: 'null'
                        externalTurnId:
                          anyOf:
                            - type: string
                            - type: 'null'
                          description: >-
                            The vendor's id for its latest turn: a Cursor run, a
                            Devin message.
                        sessionUrl:
                          anyOf:
                            - type: string
                            - type: 'null'
                          description: >-
                            The vendor's own page for this run: the URL its API
                            reported (Cursor, Devin, Warp Oz) or its documented
                            page for the run id (Replicas); null for a vendor
                            with no page Sazabi can name (Capy, Hoplite, Claude
                            Agent, Codex) or before the launch answered.
                        repositoryUrl:
                          type: string
                        baseBranch:
                          type: string
                        result:
                          anyOf:
                            - type: string
                            - type: 'null'
                          description: >-
                            The vendor's latest word: the newest inbound turn's
                            text.
                        turns:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                format: uuid
                              direction:
                                enum:
                                  - outbound
                                  - inbound
                                type: string
                              text:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              status:
                                anyOf:
                                  - enum:
                                      - queued
                                      - running
                                      - waiting
                                      - paused
                                      - completed
                                      - failed
                                      - cancel_requested
                                      - cancelled
                                      - unknown
                                    type: string
                                  - type: 'null'
                                description: 'Inbound: the status the turn announced.'
                              requestId:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                                description: >-
                                  Outbound: the request that admitted it,
                                  durably, which does not acknowledge vendor
                                  acceptance.
                              userId:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              externalId:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                                description: The vendor's id for the turn.
                              messageId:
                                type: string
                                format: uuid
                              sentAt:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              settledAt:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              deliveredAt:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              createdAt:
                                type: string
                            required:
                              - id
                              - direction
                              - text
                              - status
                              - requestId
                              - userId
                              - externalId
                              - messageId
                              - sentAt
                              - settledAt
                              - deliveredAt
                              - createdAt
                          description: >-
                            Every message across the vendor boundary, oldest
                            first: the brief and each reply outbound, each
                            result or question inbound.
                        pullRequests:
                          type: array
                          items:
                            type: string
                        pullRequestDetails:
                          type: array
                          items:
                            type: object
                            properties:
                              url:
                                type: string
                              number:
                                type: integer
                                minimum: -9007199254740991
                                maximum: 9007199254740991
                                exclusiveMinimum: 0
                              repositoryFullName:
                                type: string
                              title:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              status:
                                anyOf:
                                  - enum:
                                      - open
                                      - merged
                                      - closed
                                    type: string
                                  - type: 'null'
                            required:
                              - url
                              - number
                              - repositoryFullName
                              - title
                              - status
                        progress:
                          type: array
                          items:
                            type: object
                            properties:
                              at:
                                type: string
                              role:
                                enum:
                                  - agent
                                  - system
                                type: string
                                description: >-
                                  `agent` for the agent's own words; `system`
                                  for what it did (a tool call, a command) or
                                  what happened to it.
                              text:
                                type: string
                              vendorMessageId:
                                type: string
                                description: The vendor's own id for the event.
                            required:
                              - at
                              - role
                              - text
                              - vendorMessageId
                          description: >-
                            The session's live progress, oldest first: what the
                            agent said and did while it worked, for the vendors
                            that stream it.
                        reopenable:
                          type: boolean
                          description: >-
                            Whether a timed-out or expired attempt takes a reply
                            again, which reopens it.
                        createdAt:
                          type: string
                        updatedAt:
                          type: string
                      required:
                        - id
                        - issueFixId
                        - organizationId
                        - projectId
                        - issueId
                        - threadId
                        - connectionId
                        - provider
                        - requesterUserId
                        - connectionOwnerUserId
                        - clientRequestId
                        - status
                        - externalSessionId
                        - externalTurnId
                        - sessionUrl
                        - repositoryUrl
                        - baseBranch
                        - result
                        - turns
                        - pullRequests
                        - progress
                        - reopenable
                        - createdAt
                        - updatedAt
                required:
                  - dispatches

````

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