Skip to main content
PUT
Update Index

Update Index

Update an existing knowledge base index with new settings, metadata, or configuration.

Endpoint

Description

This endpoint allows administrators to update an existing knowledge base index. You can modify the index name and reassign it to different users or groups. Only administrators can update indexes.

Authentication

Required: API Key with admin privileges

Path Parameters

Request Body

Example Request

Success Response

Status Code: 200 OK

Response Fields

Example Usage

JavaScript

Python

cURL

Error Responses

400 Bad Request

Validations and Business Rules

  • Assigning to a user (assignedUser):
    • Enforce user index quota via checkUserIndexQuota when converting to personal or changing the assignee. Exceeded quota returns 403.
  • Assigning to a group (assignedGroup):
    • Group must exist and be active (status != 'Archived'); invalid/inactive groups return 400.

Normalization and Storage

  • When renaming, name continues to be stored normalized; sharedIndexName defaults to the normalized name if not explicitly set.

Typical Error Shapes

403 Index Quota Exceeded

400 Group Invalid/Inactive

401 Unauthorized

403 Forbidden

404 Not Found

409 Conflict

429 Too Many Requests

Updateable Fields

Use Cases

  • Name Changes: Rename indexes for better organization
  • User Assignment: Reassign indexes to different users
  • Group Assignment: Reassign indexes to different groups
  • Ownership Transfer: Change index ownership between users

Rate Limits

  • Default: 50 requests per minute
  • Daily: 5,000 requests per day
  • Monthly: 150,000 requests per month

Notes

  • This endpoint is only accessible by administrators
  • Limited Fields: Only name, assignedUser, and assignedGroup can be updated
  • Assignment Logic: Assigning to a user clears group assignment and vice versa
  • Validation: User and group IDs are validated before assignment
  • No Settings: Cannot update settings, metadata, or other configuration
  • The updatedAt timestamp is automatically updated
  • Index names must remain unique across the system

Authorizations

Authorization
string
header
required

API key authentication using Bearer token format. Example: Authorization: Bearer sk-your-api-key-here

Path Parameters

indexId
string
required

Index ID to update

Body

application/json
name
string

Index name

Example:

"updated-knowledge-base"

assignedUser
string

User ID to assign the index to (MongoDB ObjectId)

Example:

"60a7c8f5e8b4f5001f7a8c24"

assignedGroup
string

Group ID to assign the index to (MongoDB ObjectId)

Example:

"60a7c8f5e8b4f5001f7a8c25"

Response

Index updated successfully

success
boolean
Example:

true

message
string
Example:

"Index updated successfully"

index
object