Replace bot

PUThttps://api.poe.com/bots/{handle}

Overview

Create a bot or replace all settings for an existing bot. If a bot with the given handle already exists under your account, its settings are replaced entirely. Otherwise, a new bot is created. Unlike POST, the handle is specified in the URL path and api_bot_settings is replaced entirely rather than merged.

Authentication

Send your Poe API key in the Authorization header:

Authorization: Bearer sk_test_51SAMPLEKEY

All requests must be made over HTTPS.

Parameters

NameLocationTypeRequiredDescription
handlepathstringRequiredThe bot's unique handle

Request body

FieldTypeRequiredDescription
descriptionstringOptionalBot description
is_privatebooleanOptionalWhether the bot is private Default: true
api_bot_settingsobjectOptionalConfiguration for how your bot connects to your Chat Completions API or Responses API endpoint.
api_bot_settings.model_namestringOptionalModel name passed to your endpoint
api_bot_settings.base_urlstringOptionalBase URL of your API endpoint
api_bot_settings.api_keystringOptionalAPI key for authenticating requests to your endpoint. Encrypted at rest. Only accepted on write requests; not returned in responses.
api_bot_settings.api_type"chat_completions_api" | "responses_api"OptionalAPI format: chat_completions_api or responses_api Allowed values: chat_completions_api, responses_api
api_bot_settings.max_input_tokensintegerOptionalMaximum number of input tokens allowed
api_bot_settings.context_sizeintegerOptionalTotal context window size in tokens
api_bot_settings.input_modalities"text" | "image" | "video"[]OptionalSupported input types. Video is only supported with the Chat Completions API.
api_bot_settings.output_modalities"text"[]OptionalSupported output types
api_bot_settings.supported_features"tools"[]OptionalSupported features
api_bot_settings.param_definitionsobject[]OptionalCustom parameter definitions
api_bot_settings.param_definitions[].param_namestringOptionalParameter name, matches parameter_name in parameter_controls
api_bot_settings.param_definitions[].param_dest"extra_body"OptionalWhere to place the parameter in the API request Allowed values: extra_body
api_bot_settings.param_definitions[].default_valueunknownOptionalDefault value when the user has not set the parameter
api_bot_settings.pricingobjectOptionalPer-token pricing configuration. Prices are string decimal values representing dollar cost per single token.
api_bot_settings.pricing.promptstringOptionalPrice per input token
api_bot_settings.pricing.completionstringOptionalPrice per output token
api_bot_settings.pricing.input_cache_readsstringOptionalPrice per cached input token
api_bot_settings.pricing.context_pricingobjectOptionalMulti-tier context pricing with per-token prices per tier.
parameter_controlsobjectOptionalUI controls displayed to users when interacting with your bot.
parameter_controls.api_version"2"OptionalMust be "2" Allowed values: 2
parameter_controls.sectionsobject[]Optional
parameter_controls.sections[].namestringOptionalSection header label
parameter_controls.sections[].controlsobject[]Optional
parameter_controls.sections[].collapsed_by_defaultbooleanOptional

Responses

FieldTypeRequiredDescription
create_bot_status"success"OptionalPresent when a new bot was created Allowed values: success
edit_bot_status"success"OptionalPresent when an existing bot was replaced Allowed values: success

❌ Error codes

HttpTypeDescription
400errorBad request Invalid request body
401errorAuthentication failed Incorrect API key provided. You can find your API key at https://poe.com/api/keys.
403errorForbidden Unauthorized to edit bot 'BotHandle'

🔁 Callbacks & webhooks

No callbacks or webhooks are associated with this endpoint.