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.
ApiKeyAuthx-api-key<token>id*stringThe unique identifier of the space to update
GoodMem-Timeout-Ms?integerOptional waiting budget in milliseconds, measured from REST servlet ingress and shared across all internal gRPC calls. Supply one decimal integer from 1 to 86400000. Omission adds no deadline. Existing shorter deadlines still apply. Expiry returns HTTP 504 before streaming starts; after streaming starts, no successful completion event is sent. Use SSE or opt into GoodMem-Stream-Terminal for an explicit terminal outcome. Retrieval work is cooperatively cancelled. An accepted mutation may still commit after timeout or disconnect; a failed response does not imply rollback.
int641 <= value <= 86400000Space update details
application/json- body
Request parameters for updating a space.
name?|The new name for the space.
1 <= length <= 255"Updated Research Space"replaceLabels?|Labels to replace all existing labels. Mutually exclusive with mergeLabels.
properties <= 20{ "project": "Updated AI Research", "team": "NLP Group"}mergeLabels?|Labels to merge with existing labels. Mutually exclusive with replaceLabels.
properties <= 20{ "status": "active", "priority": "high"}Successfully updated space
application/json- response
A Space is a container for organizing related memories with vector embeddings.
spaceId*stringThe UUID for this space.
uuid"550e8400-e29b-41d4-a716-446655440000"name*stringThe name of the space.
1 <= length <= 255"Research Project Space"labels*Key-value pairs of metadata associated with the space.
{ "project": "AI Research", "team": "NLP Group"}spaceEmbedders*array<>The list of embedders associated with this space.
createdAt*integerTimestamp when this space was created (milliseconds since epoch).
int641651483320000updatedAt*integerTimestamp when this space was last updated (milliseconds since epoch).
int641651483320000ownerId*stringThe ID of the user who owns this space.
uuid"550e8400-e29b-41d4-a716-446655440000"createdById*stringThe ID of the user who created this space.
uuid"550e8400-e29b-41d4-a716-446655440000"updatedById*stringThe ID of the user who last updated this space.
uuid"550e8400-e29b-41d4-a716-446655440000"defaultChunkingConfig?||Default chunking strategy for memories in this space
{ "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" }}curl -X PUT 'https://your-goodmem-server.example.com/v1/spaces/550e8400-e29b-41d4-a716-446655440000' \ -H 'GoodMem-Timeout-Ms: 30000' \ -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" } }}