---
title: "Update Agent"
method: PATCH
path: "/api/v1/agents/{agent_id}"
tags: ["agents"]
---

# Update Agent

`PATCH /api/v1/agents/{agent_id}`

## Path parameters

- `agent_id` string, uuid4, required

## Request body

- AgentUpdateCommand
  - `name` string, nullable — The name of the agent. The name must only contain the following characters: a-z, A-Z, 0-9, -, _, and space. The name must not be empty. The name must start and end with a letter or a number. The name must not be longer than 64 characters.
  - `description` string, nullable
  - `status` 'ACTIVE' | 'ARCHIVED', nullable
  - `emailTrigger` EmailAgentTriggerUpdate
    - `active` boolean, nullable
    - `allowedSenders` string[], nullable
    - `localPart` string, nullable
  - `autoConfirm` boolean, nullable

## Response `200`

Successful Response

- Agent
  - `id` string, uuid4
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `name` string, required — The name of the agent. The name must only contain the following characters: a-z, A-Z, 0-9, -, _, and space. The name must not be empty. The name must start and end with a letter or a number. The name must not be longer than 64 characters.
  - `status` 'ACTIVE' | 'ARCHIVED', required
  - `autoConfirm` boolean, required — If true, the agent will automatically confirm the data extracted, i.e., no review is necessary.
  - `description` string
  - `emailTrigger` EmailAgentTrigger, required
    - `active` boolean — If false, no emails can be send to trigger agent.
    - `allowedSenders` string[] — The email addresses that are allowed to send emails to trigger the agent. If empty, no emails can be send to trigger agent.
    - `email` string, required — The email address of the agent to send emails to to trigger the agent. The email address must be unique for each agent. The domain of the email address is fixed. The local part of the email address must be between 1 and 64 characters long and can only contain the following characters: a-z, A-Z, 0-9, -, _, . and +.
  - `dataSchema` JsonSchema
    - `title` string
    - `description` string
    - `type` 'object'
    - `properties` object, required
    - `required` string[]
  - `dataDestinations` union[], required
    - union
      - DataDestinationAskUiWorkflow
        - `type` 'ASKUI_WORKFLOW'
        - `host` 'SELF' | 'ASKUI', required
        - `runnerTags` string[], required
        - `workflows` string[], required
      - DataDestinationWebhook
        - `type` 'WEBHOOK'
        - `url` string, uri, required
        - `headers` object, required
  - `workspaceId` string, uuid4, required
  - `folderPath` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/askui/apis/askui-workspaces-api.md) · [All operations](https://skmtc.net/askui/apis/askui-workspaces-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/askui/askui-workspaces-api/versions/b796c74292ac/schema)
