---
title: "Update a bot profile configuration and version"
---

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

Path: Shiba public API

`PATCH /org-agents/{agentId}`

## Authentication

- `bearerAuth`, http, header `Authorization`, format `API key`

## Path parameters

- `agentId` (`patch/org-agents/agentId.path.agentId`; string, required)

## Request body

_Required._

- `config` (`patch/org-agents/agentId.config`; object, required)
  - `name` (`patch/org-agents/agentId.config.name`; string, required)
    - minLength 1; maxLength 120
  - `instructions` (`patch/org-agents/agentId.config.instructions`; string, required)
    - minLength 1; maxLength 32000
  - `harness` (`patch/org-agents/agentId.config.harness`; string, required)
    - minLength 1; maxLength 64
  - `emoji` (`patch/org-agents/agentId.config.emoji`; string, optional)
    - minLength 1; maxLength 16
  - `mascotPreset` (`patch/org-agents/agentId.config.mascotPreset`; string, optional)
    - one of `"hero"`, `"climbing"`, `"riding"`, `"sleeping"`, `"sunglasses"`
  - `codingModel` (`patch/org-agents/agentId.config.codingModel`; string, optional)
    - minLength 1; maxLength 200
  - `connectionId` (`patch/org-agents/agentId.config.connectionId`; string, optional)
    - minLength 1; maxLength 120
  - `sandboxProvider` (`patch/org-agents/agentId.config.sandboxProvider`; string, optional)
    - one of `"cloudflare"`, `"docker-local"`, `"computesdk"`, `"e2b"`
  - `defaultRepoUrl` (`patch/org-agents/agentId.config.defaultRepoUrl`; string, optional)
    - minLength 1; maxLength 500
  - `expectedDeliverables` (`patch/org-agents/agentId.config.expectedDeliverables`; array<string>, optional) — Optional approval-frozen workspace output paths, in delivery order. Paths are unique ignoring case; relative, non-hidden ASCII segments only (letters/digits, dot, underscore, hyphen, internal spaces), no empty/dot/parent/absolute segments or leading/trailing spaces. Only md/txt/json/csv. Requested complete UTF-8 nonempty files are capped at 16384 bytes each and 65536 bytes total; JSON must parse. Collection checks do not assess semantic quality.
    - minLength 1; maxLength 240; pattern `^(?!.* (?:/|$))(?:[A-Za-z0-9][A-Za-z0-9._ -]*/)*[A-Za-z0-9][A-Za-z0-9._ -]*\.(?:[mM][dD]|[tT][xX][tT]|[jJ][sS][oO][nN]|[cC][sS][vV])$`
  - `approvalPolicy` (`patch/org-agents/agentId.config.approvalPolicy`; string, optional) — Legacy auto_approve configuration does not bypass human run approval.
    - one of `"standard"`, `"auto_approve"`
  - `toolScopes` (`patch/org-agents/agentId.config.toolScopes`; array<string>, optional) — Legacy values are readable; create/update reject nonempty scopes until execution enforces them.
    - maxLength 64
- `expectedVersion` (`patch/org-agents/agentId.expectedVersion`; integer, optional)
  - min 1

## Example request

```json
{
  "config": {
    "name": "string",
    "emoji": "string",
    "mascotPreset": "hero",
    "instructions": "string",
    "harness": "string",
    "codingModel": "string",
    "connectionId": "string",
    "sandboxProvider": "cloudflare",
    "defaultRepoUrl": "string",
    "expectedDeliverables": [
      "string"
    ],
    "approvalPolicy": "standard",
    "toolScopes": [
      "string"
    ]
  },
  "expectedVersion": 1
}
```

## Code samples

### cURL

```bash
curl --request PATCH \
  --url '<base-url>/api/v1/org-agents/<agentId>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "config": {
    "name": "string",
    "emoji": "string",
    "mascotPreset": "hero",
    "instructions": "string",
    "harness": "string",
    "codingModel": "string",
    "connectionId": "string",
    "sandboxProvider": "cloudflare",
    "defaultRepoUrl": "string",
    "expectedDeliverables": [
      "string"
    ],
    "approvalPolicy": "standard",
    "toolScopes": [
      "string"
    ]
  },
  "expectedVersion": 1
}
'
```

### TypeScript

```typescript
const url = '<base-url>/api/v1/org-agents/<agentId>';
const options = {
  method: 'PATCH',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    config: {
      name: 'string',
      emoji: 'string',
      mascotPreset: 'hero',
      instructions: 'string',
      harness: 'string',
      codingModel: 'string',
      connectionId: 'string',
      sandboxProvider: 'cloudflare',
      defaultRepoUrl: 'string',
      expectedDeliverables: ['string'],
      approvalPolicy: 'standard',
      toolScopes: ['string']
    },
    expectedVersion: 1
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "<base-url>/api/v1/org-agents/<agentId>"

payload = {
    "config": {
        "name": "string",
        "emoji": "string",
        "mascotPreset": "hero",
        "instructions": "string",
        "harness": "string",
        "codingModel": "string",
        "connectionId": "string",
        "sandboxProvider": "cloudflare",
        "defaultRepoUrl": "string",
        "expectedDeliverables": ["string"],
        "approvalPolicy": "standard",
        "toolScopes": ["string"]
    },
    "expectedVersion": 1
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Versioned bot profile

#### Example

```json
{
  "ok": true,
  "agent": {
    "id": "string",
    "orgId": "string",
    "slug": "string",
    "version": 1,
    "config": {
      "name": "string",
      "emoji": "string",
      "mascotPreset": "hero",
      "instructions": "string",
      "harness": "string",
      "codingModel": "string",
      "connectionId": "string",
      "sandboxProvider": "cloudflare",
      "defaultRepoUrl": "string",
      "expectedDeliverables": [
        "string"
      ],
      "approvalPolicy": "standard",
      "toolScopes": [
        "string"
      ]
    },
    "createdAt": 0,
    "updatedAt": 0,
    "archivedAt": 0
  }
}
```

- `ok` (`patch/org-agents/agentId.response.200.ok`; boolean, optional)
- `agent` (`patch/org-agents/agentId.response.200.agent`; object, optional)
  - `id` (`patch/org-agents/agentId.response.200.agent.id`; string, required)
  - `orgId` (`patch/org-agents/agentId.response.200.agent.orgId`; string, required)
  - `slug` (`patch/org-agents/agentId.response.200.agent.slug`; string, required)
  - `version` (`patch/org-agents/agentId.response.200.agent.version`; integer, required)
    - min 1
  - `config` (`patch/org-agents/agentId.response.200.agent.config`; object, required)
    - `name` (`patch/org-agents/agentId.response.200.agent.config.name`; string, required)
      - minLength 1; maxLength 120
    - `instructions` (`patch/org-agents/agentId.response.200.agent.config.instructions`; string, required)
      - minLength 1; maxLength 32000
    - `harness` (`patch/org-agents/agentId.response.200.agent.config.harness`; string, required)
      - minLength 1; maxLength 64
    - `emoji` (`patch/org-agents/agentId.response.200.agent.config.emoji`; string, optional)
      - minLength 1; maxLength 16
    - `mascotPreset` (`patch/org-agents/agentId.response.200.agent.config.mascotPreset`; string, optional)
      - one of `"hero"`, `"climbing"`, `"riding"`, `"sleeping"`, `"sunglasses"`
    - `codingModel` (`patch/org-agents/agentId.response.200.agent.config.codingModel`; string, optional)
      - minLength 1; maxLength 200
    - `connectionId` (`patch/org-agents/agentId.response.200.agent.config.connectionId`; string, optional)
      - minLength 1; maxLength 120
    - `sandboxProvider` (`patch/org-agents/agentId.response.200.agent.config.sandboxProvider`; string, optional)
      - one of `"cloudflare"`, `"docker-local"`, `"computesdk"`, `"e2b"`
    - `defaultRepoUrl` (`patch/org-agents/agentId.response.200.agent.config.defaultRepoUrl`; string, optional)
      - minLength 1; maxLength 500
    - `expectedDeliverables` (`patch/org-agents/agentId.response.200.agent.config.expectedDeliverables`; array<string>, optional) — Optional approval-frozen workspace output paths, in delivery order. Paths are unique ignoring case; relative, non-hidden ASCII segments only (letters/digits, dot, underscore, hyphen, internal spaces), no empty/dot/parent/absolute segments or leading/trailing spaces. Only md/txt/json/csv. Requested complete UTF-8 nonempty files are capped at 16384 bytes each and 65536 bytes total; JSON must parse. Collection checks do not assess semantic quality.
      - minLength 1; maxLength 240; pattern `^(?!.* (?:/|$))(?:[A-Za-z0-9][A-Za-z0-9._ -]*/)*[A-Za-z0-9][A-Za-z0-9._ -]*\.(?:[mM][dD]|[tT][xX][tT]|[jJ][sS][oO][nN]|[cC][sS][vV])$`
    - `approvalPolicy` (`patch/org-agents/agentId.response.200.agent.config.approvalPolicy`; string, optional) — Legacy auto_approve configuration does not bypass human run approval.
      - one of `"standard"`, `"auto_approve"`
    - `toolScopes` (`patch/org-agents/agentId.response.200.agent.config.toolScopes`; array<string>, optional) — Legacy values are readable; create/update reject nonempty scopes until execution enforces them.
      - maxLength 64
  - `createdAt` (`patch/org-agents/agentId.response.200.agent.createdAt`; number, required)
  - `updatedAt` (`patch/org-agents/agentId.response.200.agent.updatedAt`; number, required)
  - `archivedAt` (`patch/org-agents/agentId.response.200.agent.archivedAt`; number, optional)

### 400

Invalid configuration or unsupported tool scopes

### 409

Version conflict


Source: https://tryshiba.dev/reference/api/patch/org-agents/agentId/index.md
