Update a space
PUT /v1/spaces/{id}: Updates an existing space with new values for the specified fields.
Updates an existing space with new values for the specified fields. Only name 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 an existing space. Requires UPDATE_SPACE on the requested space. 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 <= 255Labels to replace all existing labels. Mutually exclusive with mergeLabels.
{"project":"Updated AI Research","team":"NLP Group"}properties <= 20Empty Object
Labels to merge with existing labels. Mutually exclusive with replaceLabels.
{"status":"active","priority":"high"}properties <= 20Empty Object
Response Body
curl -X PUT "https://your-goodmem-server.example.com/v1/spaces/550e8400-e29b-41d4-a716-446655440000" \ -H "Content-Type: application/json" \ -d '{ "name": "Updated Research Space", "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",
"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"
}
}
}