---
search:
  tags:
    - pipeline
    - PATCH
seo:
  description: >-
    Update agent type. Reference for the PATCH
    /workspaces/{organizationId}/agent-types/{id} endpoint in the Pile API.
sidebar:
  label: Update agent type
  badge: PATCH
title: Update agent type
type: openapi-operation
---
`PATCH /workspaces/{organizationId}/agent-types/{id}`

**Request body** (`application/json`)

- `slug` (string)
- `name` (string)
- `providerAgentId` (string)
- `kind` (string)
- `endpointUrl` (string<uri> | null)
- `endpointSecret` (string | null)
- `prompt` (string | null)
- `model` (string | null)
- `tools` (string | null)
- `jobSpec` (string | null)
- `toolScope` (string | null)
- `permissionsTier` (string | null)
- `enabled` (boolean)

Request body example:

```json
{
  "slug": "string",
  "name": "string",
  "providerAgentId": "string",
  "kind": "agent",
  "endpointUrl": "http://example.com",
  "endpointSecret": "string",
  "prompt": "string",
  "model": "string",
  "tools": "string",
  "jobSpec": "string",
  "toolScope": "string",
  "permissionsTier": "string",
  "enabled": true
}
```

**Responses**

- `200` — Agent type updated
- `400` — Unknown providerAgentId
- `404` — Agent type not found

Response example, 200:

```json
{
  "id": "string",
  "organizationId": "string",
  "slug": "string",
  "name": "string",
  "providerAgentId": "string",
  "jobSpec": "string",
  "prompt": "string",
  "model": "string",
  "tools": "string",
  "kind": "string",
  "endpointUrl": "string",
  "hasEndpointSecret": true,
  "toolScope": "string",
  "permissionsTier": "string",
  "enabled": 0,
  "createdBy": "string",
  "createdAt": "string",
  "updatedAt": "string"
}
```
