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

# Update a draft agent's config (partial)

> Partial update of a DRAFT agent's config. Send one or more of the agent type's own config fields — the same fields as its POST /business/agents/{type} body, without `start`. Keys are merged over the saved config: omitted fields keep their value, an array replaces the stored array, and unknown keys are dropped. Sending `listName` renames both the agent and the results list it will create. The merged config is re-validated against the type's schema, so a partial edit can still be rejected (422 VALIDATION_FAILED). Only drafts (`status: initializing`) are editable — a started, paused, expired or failed agent answers 409 AGENT_NOT_A_DRAFT, so duplicate it and edit the copy. Nothing is billed. The answer is the saved agent, in the same shape as GET /business/agents/{agentId}.

Errors:
- `404` `AGENT_NOT_FOUND` — No agent with this id belongs to the token owner. A deleted agent and another user's agent answer identically.
- `409` `AGENT_NOT_A_DRAFT` — The agent is not a draft (status is not `initializing`): it was already started, or is paused, expired or failed. Only drafts are editable and activatable — duplicate the agent and work on the copy.
- `409` `AGENT_CONFIG_MISSING` — The draft carries no stored config to work from (a legacy draft saved before configs were persisted). Create the agent again.
- `409` `AGENT_TYPE_UNSUPPORTED` — The agent is of a legacy kind this API can no longer edit or activate; its `type` reads as null.
- `422` `VALIDATION_FAILED` — The update was rejected by validation. Either this endpoint's own request validation (a malformed `agentId`, an empty body), where `param` names the offending field; or the merged config failed the agent type's own schema, which the agents service reports without per-field detail, so `param` is null and `message` is the generic one. Re-check the fields you sent against that type's create body.
- `429` `RATE_LIMITED` — The agents bucket is exhausted: 30 requests per minute or 2,000 per day per token owner, shared by every /business/agents operation (a 429 raised by the agents service is relayed with this code too). Retry after the `Retry-After` header.
- `500` `UNEXPECTED_ERROR` — The agents service failed (5xx, refused service credential, or a timeout after 60s) or the rate limiter was unavailable. Retry later; quote `request_id` to support.

Requires one of the following token scopes: agents.



## OpenAPI

````yaml /openapi.json patch /business/agents/{agentId}
openapi: 3.1.0
info:
  title: Fuse Business API
  version: 1.0.0
  description: >-
    External API for lists, campaigns, prospect search and contacts.
    Authenticate with your API token as HTTP Basic. All paths are under /api/v1.
servers:
  - url: https://api.tryfuse.ai/api/v1
    description: Production
security:
  - basicAuth: []
tags:
  - name: Lists
  - name: Custom columns
  - name: Smart columns
  - name: Exports
  - name: Campaigns
  - name: Knowledge hubs
  - name: Analytics
  - name: Website intent
  - name: Account
  - name: Prospect search
  - name: Campaign steps
  - name: Scheduled sends
  - name: Campaign templates
  - name: Agents
  - name: Research
  - name: Company search
  - name: Saved searches
  - name: Folders
  - name: Contacts
paths:
  /business/agents/{agentId}:
    patch:
      tags:
        - Agents
      summary: Update a draft agent's config (partial)
      description: >-
        Partial update of a DRAFT agent's config. Send one or more of the agent
        type's own config fields — the same fields as its POST
        /business/agents/{type} body, without `start`. Keys are merged over the
        saved config: omitted fields keep their value, an array replaces the
        stored array, and unknown keys are dropped. Sending `listName` renames
        both the agent and the results list it will create. The merged config is
        re-validated against the type's schema, so a partial edit can still be
        rejected (422 VALIDATION_FAILED). Only drafts (`status: initializing`)
        are editable — a started, paused, expired or failed agent answers 409
        AGENT_NOT_A_DRAFT, so duplicate it and edit the copy. Nothing is billed.
        The answer is the saved agent, in the same shape as GET
        /business/agents/{agentId}.


        Errors:

        - `404` `AGENT_NOT_FOUND` — No agent with this id belongs to the token
        owner. A deleted agent and another user's agent answer identically.

        - `409` `AGENT_NOT_A_DRAFT` — The agent is not a draft (status is not
        `initializing`): it was already started, or is paused, expired or
        failed. Only drafts are editable and activatable — duplicate the agent
        and work on the copy.

        - `409` `AGENT_CONFIG_MISSING` — The draft carries no stored config to
        work from (a legacy draft saved before configs were persisted). Create
        the agent again.

        - `409` `AGENT_TYPE_UNSUPPORTED` — The agent is of a legacy kind this
        API can no longer edit or activate; its `type` reads as null.

        - `422` `VALIDATION_FAILED` — The update was rejected by validation.
        Either this endpoint's own request validation (a malformed `agentId`, an
        empty body), where `param` names the offending field; or the merged
        config failed the agent type's own schema, which the agents service
        reports without per-field detail, so `param` is null and `message` is
        the generic one. Re-check the fields you sent against that type's create
        body.

        - `429` `RATE_LIMITED` — The agents bucket is exhausted: 30 requests per
        minute or 2,000 per day per token owner, shared by every
        /business/agents operation (a 429 raised by the agents service is
        relayed with this code too). Retry after the `Retry-After` header.

        - `500` `UNEXPECTED_ERROR` — The agents service failed (5xx, refused
        service credential, or a timeout after 60s) or the rate limiter was
        unavailable. Retry later; quote `request_id` to support.


        Requires one of the following token scopes: agents.
      operationId: updateAgent
      parameters:
        - name: agentId
          in: path
          required: true
          description: >-
            The agent's id: a 24-character hex string — the `id` of an item from
            GET /business/agents, or the `agent.id` a create or duplicate
            returned.
          schema:
            type: string
            description: >-
              The agent's id: a 24-character hex string — the `id` of an item
              from GET /business/agents, or the `agent.id` a create or duplicate
              returned.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties: {}
              description: >-
                One or more of the agent type's own config fields (the same
                fields as its POST /business/agents/{type} body, without
                `start`). Keys are merged over the draft's saved config: omitted
                fields keep their value, arrays replace the stored array. Only
                drafts (status "initializing") are editable (409
                AGENT_NOT_A_DRAFT otherwise); the merged config is re-validated
                against the type's schema (422 VALIDATION_FAILED) and unknown
                keys are dropped.
      responses:
        '200':
          description: Success
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: Requests permitted in the current window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: Requests remaining in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: Seconds until the current window resets.
          content:
            application/json:
              schema:
                type: object
                required:
                  - agent
                properties:
                  agent:
                    type: object
                    required:
                      - id
                      - type
                      - name
                      - status
                      - config
                      - isReconstructed
                      - lossyFields
                      - sourceLists
                    properties:
                      id:
                        type: string
                        description: >-
                          The agent's id — pass it as `{agentId}` to every other
                          agent operation.
                      type:
                        type:
                          - string
                          - 'null'
                        enum:
                          - web-monitor
                          - person-starting-new-job
                          - linkedin-posts
                          - person-discovery-via-filters
                          - job-postings
                          - job-posting-in-location
                          - first-person-hired-in-company-department
                          - first-person-hired-internationally
                          - company-headcount-growth
                          - company-headcount-growth-over-baseline
                          - company-department-headcount
                          - company-employee-job-location-in-two-countries
                          - funding-announcements
                          - people-watcher
                          - companies-watcher
                          - job-changes-watcher
                          - linkedin-profile
                          - linkedin-post
                          - null
                        description: >-
                          The public agent kind — the same slug you POST to at
                          /business/agents/{type}. null for a legacy kind this
                          API no longer offers.
                      name:
                        type: string
                        description: >-
                          The agent's name, which is also the name of the
                          results list it delivers into.
                      status:
                        type: string
                        enum:
                          - initializing
                          - processing
                          - active
                          - paused
                          - expired
                          - failed
                          - completed
                          - deleted
                        description: >-
                          initializing = saved draft, nothing billed; processing
                          = a run is under way; active = running; paused =
                          stopped by you; expired = past its expirationDate;
                          failed = the provider setup failed. Older agents can
                          also read `completed` (a one-off scrape that has
                          finished) and `deleted` (an agent deleted before
                          deletions were timestamped: still readable, but it can
                          no longer be edited or activated).
                      config:
                        type: object
                        additionalProperties: true
                        description: >-
                          The agent's config in CREATE shape: exactly the body
                          you would POST to /business/agents/{type} (without
                          `start`) to build this agent again. Its fields are the
                          ones documented on that type's create operation.
                      isReconstructed:
                        type: boolean
                        description: >-
                          false = the config is the stored snapshot, returned
                          verbatim (always the case for a draft). true = the
                          agent was started before its snapshot existed and the
                          config was rebuilt from the live record, so check
                          `lossyFields`.
                      lossyFields:
                        type: array
                        items:
                          type: string
                        description: >-
                          Config fields that could not be recovered when
                          `isReconstructed` is true; `["*"]` means only `name`
                          is known. Empty otherwise.
                      sourceLists:
                        type: array
                        description: >-
                          Watcher kinds only: the source lists the config names,
                          resolved to their names. Empty for every other kind.
                        items:
                          type: object
                          required:
                            - id
                            - name
                          properties:
                            id:
                              type: string
                              description: The source list's id.
                            name:
                              type:
                                - string
                                - 'null'
                              description: >-
                                The source list's name, or null when the list
                                has been deleted.
              example:
                agent:
                  id: 6a8dce4e65fd738c00d8927a
                  type: web-monitor
                  name: Regulator fines 2026
                  status: initializing
                  config:
                    listName: Regulator fines 2026
                    entityType: company
                    prompt: companies fined by a financial regulator in 2026
                    searchPeriod: 6h
                    numResults: 7
                  isReconstructed: false
                  lossyFields: []
                  sourceLists: []
        '400':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - basicAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            param:
              type:
                - string
                - 'null'
            doc_url:
              type:
                - string
                - 'null'
            request_id:
              type:
                - string
                - 'null'
          required:
            - code
            - message
      required:
        - error
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        Your API token (`af_…`) as the Basic-auth username, with an empty
        password.

````