POST
/
openai
/
settings
/
{instance}
Set OpenAI Bot Settings
curl --request POST \
  --url https://{server-url}/openai/settings/{instance} \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '{
  "openaiCredsId": "<string>",
  "expire": 123,
  "keywordFinish": "<string>",
  "delayMessage": 123,
  "unknownMessage": "<string>",
  "listeningFromMe": true,
  "stopBotFromMe": true,
  "keepOpen": true,
  "debounceTime": 123,
  "ignoreJids": [
    "<string>"
  ],
  "openaiIdFallback": "<string>"
}'
{
  "success": true,
  "message": "<string>"
}

Authorizations

apikey
string
header
required

Your authorization key header

Path Parameters

instance
string
required

Name of the instance

Body

application/json

Configuration for updating the OpenAI bot settings

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

Successfully updated OpenAI bot settings

success
boolean

Indicates if the update was successful

message
string

Details about the operation