Change Collection Environment

Move a collection from one environment to another (e.g., development to production) without reindexing. All files, indexed data, and vector embeddings are preserved. The collection's internal ID stays the same — only the environment label changes. ## Use Cases - Promote a development collection to production after testing - Move a production collection back to staging for debugging - Reorganize collections across environments ## Error Cases - **400**: Collection is already in the target environment - **404**: Collection not found in current environment - **409**: A collection with the same name already exists in the target environment

Path parameters

collection_namestringRequired
Name of the collection to move

Headers

AuthorizationstringRequired
Captain API key for authentication. The key's current environment determines the source environment.
X-Organization-IDstringRequired
Organization UUID

Request

This endpoint expects an object.
new_environmentenumRequired
The target environment to move the collection to
Allowed values:

Response

Environment Changed Successfully
successboolean
Whether the environment change was successful
messagestring

Human-readable status message

collection_namestring
Name of the collection that was moved
previous_environmentstring
The environment the collection was moved from
new_environmentstring
The environment the collection was moved to
files_movedinteger

Number of files associated with the collection (all preserved)

Errors