---
title: "Set OpenAI Bot Settings"
method: POST
path: "/openai/settings/{instance}"
tags: ["OpenAI Controller"]
---

# Set OpenAI Bot Settings

`POST /openai/settings/{instance}`

Set settings for an OpenAI bot instance.

## Path parameters

- `instance` string, required

## Request body

- object
  - `openaiCredsId` string, required — The OpenAI credentials ID
  - `expire` integer, required — Expiration time in seconds
  - `keywordFinish` string, required — Keyword to finish the interaction
  - `delayMessage` integer, required — Delay time for the message in milliseconds
  - `unknownMessage` string, required — Message when the input is not recognized
  - `listeningFromMe` boolean, required — Indicates if the bot is listening for commands from the user
  - `stopBotFromMe` boolean, required — Indicates if the bot should stop upon user command
  - `keepOpen` boolean, required — Indicates if the bot session should remain open
  - `debounceTime` integer, required — Time in milliseconds to wait before processing the next input
  - `ignoreJids` string[], required — List of JIDs (Jabber IDs) to ignore
  - `openaiIdFallback` string, required — Fallback OpenAI credentials ID if the main one fails

## Response `200`

Successfully updated OpenAI bot settings

- object
  - `success` boolean — Indicates if the update was successful
  - `message` string — Details about the operation

## Other responses

- `400` — Bad Request - Invalid input parameters
- `500` — Internal Server Error

---

[API](https://skmtc.net/evolution-foundation/apis/evolution-api-2.md) · [All operations](https://skmtc.net/evolution-foundation/apis/evolution-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/evolution-foundation/evolution-api-2/revisions/153363ee7f38/schema)
