Unltd AI logo

Getting started


Update Custom Bot

PATCH https://api.unltd.ai/v1/organizations/:organizationId/bots/:botSlug

This endpoint updates a Bot entity for a specific organization based on the provided information in the request body.

Request Body

modelKey

string

The key of the model that the bot uses.

description

string

The updated description of the bot.

name

string

The updated name of the bot.

prompt

string

The updated prompt for the bot.

inputs

array

An updated array of bot input objects. This is optional.

Permissions

This request requires an authenticated user who is an admin of the organization or an organization token.

API Example

const fetchApiData = async () => {
  const response = await fetch("https://api.unltd.ai/v1/organizations/example_org_id/bots/example_bot_slug", {
    method: 'PATCH',
    headers: {
      'Authorization': 'Bearer ',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      description: 'This is an updated description for the bot.',
      name: 'My Updated Bot',
      modelKey: 'textCompletion',
      prompt: 'Hello again Bots!'
    })
  });

  const data = await response.json();
  console.log(data);
};

fetchApiData();

Response Object

200 success

The response object will be returned as a bot.
{
  "modelKey": "textCompletion",
  "name": "My Updated Bot",
  "description": "This is an updated description for the bot.",
  "prompt": "Hello again Bots!?",
  "slug": "organizationNameMyUpdatedBot",
  "inputs": []
}