GoodMemGoodMem
ReferenceAPIREST APISpaces

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.

PUT
/v1/spaces/{id}
x-api-key<token>

In: header

Path Parameters

idstring

The unique identifier of the space to update

Space update details

name?string | null

The new name for the space.

Example"Updated Research Space"
Length1 <= length <= 255
replaceLabels?object | null

Labels to replace all existing labels. Mutually exclusive with mergeLabels.

Example{"project":"Updated AI Research","team":"NLP Group"}
Propertiesproperties <= 20

Empty Object

mergeLabels?object | null

Labels to merge with existing labels. Mutually exclusive with replaceLabels.

Example{"status":"active","priority":"high"}
Propertiesproperties <= 20

Empty 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"
    }
  }
}
Empty
Empty
Empty
Empty
Empty