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_name
Name of the collection to move
Headers
Authorization
Captain API key for authentication. The key's current environment determines the source environment.
X-Organization-ID
Organization UUID
Request
This endpoint expects an object.
new_environment
The target environment to move the collection to
Allowed values:
Response
Environment Changed Successfully
success
Whether the environment change was successful
message
Human-readable status message
collection_name
Name of the collection that was moved
previous_environment
The environment the collection was moved from
new_environment
The environment the collection was moved to
files_moved
Number of files associated with the collection (all preserved)