Update a space
Updates an existing space with new values for the specified fields. Only name, publicRead, and labels can be updated. Fields not included in the request remain unchanged.
IMMUTABLE FIELDS: space_embedders, default_chunking_config, and ownerId cannot be modified after creation.
NAME UNIQUENESS: Name must be unique per owner - returns ALREADY_EXISTS if name conflicts with existing space. Requires UPDATE_SPACE_OWN permission for spaces you own (or UPDATE_SPACE_ANY for admin users). This operation is idempotent.
In: header
Path Parameters
The unique identifier of the space to update
Space update details
The new name for the space.
"Updated Research Space"1 <= length <= 255Whether the space is publicly readable by all users.
trueLabels to replace all existing labels. Mutually exclusive with mergeLabels.
{"project":"Updated AI Research","team":"NLP Group"}Empty Object
Labels to merge with existing labels. Mutually exclusive with replaceLabels.
{"status":"active","priority":"high"}Empty Object
Response Body
curl -X PUT "http://localhost:8080/v1/spaces/550e8400-e29b-41d4-a716-446655440000" \ -H "Content-Type: application/json" \ -d '{ "name": "Updated Research Space", "publicRead": true, "replaceLabels": { "project": "ai-embedding-project", "team": "NLP Group", "category": "updated-research" }, "mergeLabels": { "status": "active", "priority": "high" } }'{
"spaceId": "550e8400-e29b-41d4-a716-446655440000",
"name": "Research Project Space",
"labels": {
"project": "AI Research",
"team": "NLP Group"
},
"spaceEmbedders": [
{
"spaceId": "550e8400-e29b-41d4-a716-446655440000",
"embedderId": "550e8400-e29b-41d4-a716-446655440000",
"defaultRetrievalWeight": 1,
"createdAt": 1651483320000,
"updatedAt": 1651483320000,
"createdById": "550e8400-e29b-41d4-a716-446655440000",
"updatedById": "550e8400-e29b-41d4-a716-446655440000"
}
],
"createdAt": 1651483320000,
"updatedAt": 1651483320000,
"ownerId": "550e8400-e29b-41d4-a716-446655440000",
"createdById": "550e8400-e29b-41d4-a716-446655440000",
"updatedById": "550e8400-e29b-41d4-a716-446655440000",
"publicRead": false,
"defaultChunkingConfig": {
"recursive": {
"chunkSize": 1000,
"chunkOverlap": 200,
"separators": [
"\n\n",
"\n",
".",
" "
],
"keepStrategy": "KEEP_END",
"separatorIsRegex": false,
"lengthMeasurement": "CHARACTER_COUNT"
},
"sentence": {
"maxChunkSize": 1000,
"minChunkSize": 100,
"enableLanguageDetection": true,
"lengthMeasurement": "CHARACTER_COUNT"
}
}
}