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

# Set OpenAI Bot Settings

`POST /openai/settings/{instance}`

## Request

- Base URL: `https://evolution-example`
- URL: `https://evolution-example/openai/settings/{instance}`
- Auth: API key in header `apikey`

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

## Changes

- **2024-11-25** (v2) `ad43c2b657d9`: 1 info
  - endpoint added
- **2024-11-25** (v2) `c153448703e5`: 1 breaking
  - api path removed without deprecation
- **2024-09-09** (v2) `0c4620ca5ed5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/evolution-foundation/apis/evolution-api-3/changes/openai/settings/:instance/post.md)

---

[API](https://skmtc.dev/evolution-foundation/apis/evolution-api-3.md) - [All operations](https://skmtc.dev/evolution-foundation/apis/evolution-api-3/llms.txt) - [OpenAPI document](https://skmtc.dev/evolution-foundation/apis/evolution-api-3/revisions/153363ee7f38?raw)
