---
title: "Update an Agent"
method: POST
path: "/bot{token}/updateAgent"
tags: ["Bot"]
---

# Update an Agent

`POST /bot{token}/updateAgent`

Updates supplied Agent fields. Empty optional strings clear those fields.

## Path parameters

- `token` string, required

## Headers

- `authorization` string

## Request body

- UpdateAgentInput
  - `agent_id` union, required — A safe integer supplied as a JSON integer or decimal integer string
    - integer — An integer that can be represented exactly by a JavaScript number
    - string — A signed decimal integer string within JavaScript's safe-integer range
  - `name` string
  - `handle` string
  - `emoji` string
  - `description` string
  - `skill_key` string
  - `instructions` string

## Response `200`

BotUpdateAgentSuccess

- BotUpdateAgentSuccess
  - `ok` true, required — Always true for a successful request.
  - `result` object, required — Method-specific response payload.
    - `agent` BotAgent, required — A named, mentionable specialization owned and executed by a bot.
      - `id` integer, required — A positive integer that can be represented exactly by a JavaScript number
      - `bot_user_id` integer, required — A positive Inline user identifier
      - `name` string, required
      - `handle` string
      - `emoji` string
      - `description` string
      - `skill_key` string
      - `instructions` string

## Other responses

- `400` — The request parameters are missing or invalid.
- `401` — The bot token is missing or invalid.
- `403` — The bot is not allowed to perform this action.
- `404` — The requested method or resource was not found.
- `500` — The server could not complete the request.

---

[API](https://skmtc.dev/inline/apis/inline-bot-http-api-docs.md) · [All operations](https://skmtc.dev/inline/apis/inline-bot-http-api-docs/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/inline/inline-bot-http-api-docs/revisions/69017b8dc5fe/schema)
