GoodMem
ReferenceAPIREST APISpaces

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.

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.

Default"Updated Research Space"
Length1 <= length <= 255
publicRead?boolean | null

Whether the space is publicly readable by all users.

Defaulttrue
replaceLabels?object | null

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

Default{"project":"Updated AI Research","team":"NLP Group"}

Empty Object

mergeLabels?object | null

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

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