POST
/
conversations
/
{conversationId}
/
set-ai-enabled

Example JS Code to Enable or Disable AI

const apiUrl = 'https://api.ogenioia.com';
const apiKey = 'XXX';
const conversationId = 'XXX';

const res = await fetch(
  `${apiUrl}/conversations/${conversationId}/set-ai-enabled`,
  {
    method: 'POST',
    body: JSON.stringify({
      enabled: false, // true to enable, false to disable
    }),
    headers: {
      'Content-Type': 'application/json',
      Authorization: `Bearer ${apiKey}`,
    },
  }
);

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

conversationId
string
required

ID of the conversation for which the AI state will be changed.

Body

application/json
enabled
boolean
required

Defines the new AI state. true to enable, false to disable.

Response

200 - application/json
success
boolean
message
string