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

# Set or clear the project's fix setting

> Set the agent the project's fixes go to, a coding agent account or Sazabi's agent, and whether every new issue starts a fix (`autoFix`); null clears the selection and the switch. A coding agent account must be an active connection without attention, and `autoFix: true` with no agent selected is refused. A project setting shared by everyone who presses Fix: needs the project's `settings:write`, and nothing else writes the selected agent.



## OpenAPI

````yaml /openapi.json put /agent-dispatches/project-default
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/project-default:
    put:
      tags:
        - AgentDispatches
      summary: Set or clear the project's fix setting
      description: >-
        Set the agent the project's fixes go to, a coding agent account or
        Sazabi's agent, and whether every new issue starts a fix (`autoFix`);
        null clears the selection and the switch. A coding agent account must be
        an active connection without attention, and `autoFix: true` with no
        agent selected is refused. A project setting shared by everyone who
        presses Fix: needs the project's `settings:write`, and nothing else
        writes the selected agent.
      operationId: agentDispatches.projectDefault.update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                organizationId:
                  type: string
                  minLength: 1
                projectId:
                  type: string
                  format: uuid
                agent:
                  anyOf:
                    - anyOf:
                        - type: object
                          properties:
                            provider:
                              enum:
                                - cursor
                                - devin
                                - capy
                                - replicas
                                - hoplite
                                - warp
                                - claude
                                - codex
                                - tembo
                              type: string
                            connectionId:
                              type: string
                              format: uuid
                          required:
                            - provider
                            - connectionId
                        - type: object
                          properties:
                            provider:
                              const: sazabi
                          required:
                            - provider
                    - type: 'null'
                  description: >-
                    The agent `issues.fixes.create` hands off to when it names
                    no `agent`: a coding agent account, or Sazabi's agent
                    (`provider: "sazabi"`, no connection). Null clears the
                    selection and turns auto-fix off.
                autoFix:
                  type: boolean
                  description: >-
                    Whether every new issue starts a fix with the selected
                    agent; refused with no agent selected. Omitted keeps the
                    stored value.
                clearEnvironment:
                  type: boolean
                  default: false
                  description: >-
                    Forget the remembered vendor environment while keeping the
                    agent; the next launch records the one it uses.
                environmentId:
                  type: string
                  minLength: 1
                  maxLength: 200
                  description: >-
                    The vendor environment the next launch runs in: one of
                    `integrations.codingAgentEnvironments.list` for the agent's
                    connection, stored with the name the vendor reports. Omitted
                    keeps the remembered one; refused for Sazabi's agent.
              required:
                - organizationId
                - projectId
                - agent
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  default:
                    anyOf:
                      - type: object
                        properties:
                          provider:
                            enum:
                              - sazabi
                              - cursor
                              - devin
                              - capy
                              - replicas
                              - hoplite
                              - warp
                              - claude
                              - codex
                              - tembo
                            type: string
                            description: >-
                              A coding agent's integration provider id, or
                              `sazabi` for Sazabi's agent.
                          connectionId:
                            anyOf:
                              - type: string
                                format: uuid
                              - type: 'null'
                            description: The coding agent account; null for Sazabi's agent.
                          displayName:
                            type: string
                          environment:
                            anyOf:
                              - type: object
                                properties:
                                  id:
                                    type: string
                                    minLength: 1
                                  name:
                                    anyOf:
                                      - type: string
                                      - type: 'null'
                                required:
                                  - id
                                  - name
                              - type: 'null'
                            description: >-
                              The vendor environment the next launch runs in
                              while it still holds the repository: the one
                              chosen for the last fix or in the project's
                              settings, else the one the last launch used; null
                              for a vendor without environments, before a
                              launch, or for Sazabi's agent.
                        required:
                          - provider
                          - connectionId
                          - displayName
                          - environment
                      - type: 'null'
                    description: >-
                      The selected agent as stored, whether or not its
                      connection still works; null while none is selected.
                  autoFix:
                    type: boolean
                    description: >-
                      Whether every new issue starts a fix with the selected
                      agent. False while no agent is selected.
                  connectionBroken:
                    type: boolean
                    description: >-
                      True while the selected coding agent connection is
                      disconnected or needs attention: `issues.fixes.create`
                      requests that name no `agent` go to Sazabi's agent until
                      it reconnects, and the selection stays.
                  agents:
                    type: array
                    items:
                      type: object
                      properties:
                        provider:
                          enum:
                            - cursor
                            - devin
                            - capy
                            - replicas
                            - hoplite
                            - warp
                            - claude
                            - codex
                            - tembo
                          type: string
                        connectionId:
                          type: string
                          format: uuid
                        displayName:
                          type: string
                      required:
                        - provider
                        - connectionId
                        - displayName
                    description: >-
                      The connected coding agent accounts the project may select
                      (active, no attention), oldest first; Sazabi's agent is
                      always a choice.
                required:
                  - default
                  - autoFix
                  - connectionBroken
                  - agents

````

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