Skip to main content
PUT
JavaScript

Overview

Replace all mutable corpus fields in a single request. This is a full replacement operation - any field not provided will be reset to its default value.
Use with caution: Omitted fields reset to defaults. For single-field updates, use PATCH /api/corpora/{id}/ instead.
Best for: Renaming a corpus along with other metadata changes, or when you need to reset all fields to known values.

Authentication

Requires valid JWT token or session authentication. You must own the target corpus.

Path Parameters

UUID
required
Corpus identifier to update.Example: 8d0f0a5d-4b5e-4c09-9db6-0e9d2aa8a9fd

Request Body

string
required
Corpus name (will be normalized to lowercase with underscores). Must be unique across your corpora.Validation: The server automatically converts to lowercase and replaces spaces with underscores.Uniqueness: Fails with 400 Bad Request if another of your corpora has the same normalized name.
string
Human-readable description of the corpus purpose.Default: Empty string if omitted.
boolean
default:"false"
Public visibility flag. Set to true to make the corpus discoverable by other users.Default: false (private) if omitted.
string
default:"VSI"
Indexing strategy for the corpus:
  • VSI - Vector Store Index (best for semantic search)
  • SMI - Summary Index
  • DSI - Document Summary Index
Warning: Changing this triggers asynchronous re-indexing of all resources.
string
Current processing state. Advanced use only - normally managed automatically by the system.Valid values: PND, PRS, IND, ERR
Manually setting this does NOT trigger indexing jobs. Leave this field alone unless coordinating with backend operators.

Example request

Example response

Response Structure

UUID
Unchanged corpus identifier.
timestamp
Original creation timestamp (never changes).
timestamp
Updated to current time when the request succeeds.
string
Normalized corpus name after update.
string
Updated description (or empty string if omitted in request).
boolean
Updated visibility flag (or false if omitted).
string
Updated indexing strategy (or VSI if omitted).
string
Processing state. May show PRS if index_type was changed and re-indexing started.
float
Unchanged storage size.
string
Vector database collection identifier (unchanged).
UUID
Unchanged corpus owner ID (read-only field).

Best Practices

Use PUT when:
  • Renaming a corpus along with other changes
  • You want to explicitly reset fields to defaults
  • You have a complete corpus object to replace
Use PATCH when:
  • Updating a single field (e.g., toggling is_published)
  • Making incremental changes without affecting other fields
  • You don’t want to risk accidentally resetting fields
Example - Wrong approach:
Example - Correct approach:
The server enforces name uniqueness across your corpora:
Tip: Use GET /api/check_corpora_name/?corpora_name=new_name before attempting the update.
Changing index_type triggers background re-indexing:
Performance impact: Large corpora may take minutes to re-index. Plan migrations during low-traffic periods.
Ensure updates succeed and verify the result:
Error Handling: 400 Bad Request indicates either a name collision or attempt to modify read-only fields like creator, id, or created_at.

Client examples

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string<uuid>
required

A UUID string identifying this Corpora.

Body

corpora_name
string
required

Name of the corpora

Maximum string length: 100
description
string | null

Description of the corpora

is_published
boolean

Is the corpora Visible to all users?

index_type
enum<string>

Type of index to be used for the corpora

  • VSI - VectorStoreIndex
  • SMI - SummaryIndex
  • DSI - DocumentSummaryIndex
Available options:
VSI,
SMI,
DSI
indexing_status
enum<string>

Status of the corpora processing

  • PND - Pending
  • IQE - In Queue
  • PRS - Processing
  • DEX - Data Extracted Successfully
  • DER - Data Extraction Error
  • IND - Indexed
  • CMP - Completed
  • ERR - Error
Available options:
PND,
IQE,
PRS,
DEX,
DER,
IND,
CMP,
ERR

Response

200 - application/json
id
string<uuid>
required
read-only
created_at
string<date-time>
required
read-only

The date and time the organization was created

updated_at
string<date-time>
required
read-only

Last updated time

corpora_name
string
required

Name of the corpora

Maximum string length: 100
size_on_disk
number<double>
required
read-only

Size of the corpora on disk (in bytes)

index_location
string | null
required
read-only

Location of the index on Remote Storage

creator
string<uuid>
required
read-only
description
string | null

Description of the corpora

is_published
boolean

Is the corpora Visible to all users?

index_type
enum<string>

Type of index to be used for the corpora

  • VSI - VectorStoreIndex
  • SMI - SummaryIndex
  • DSI - DocumentSummaryIndex
Available options:
VSI,
SMI,
DSI
indexing_status
enum<string>

Status of the corpora processing

  • PND - Pending
  • IQE - In Queue
  • PRS - Processing
  • DEX - Data Extracted Successfully
  • DER - Data Extraction Error
  • IND - Indexed
  • CMP - Completed
  • ERR - Error
Available options:
PND,
IQE,
PRS,
DEX,
DER,
IND,
CMP,
ERR