---
title: "Update collection properties"
method: PUT
path: "/_fabric/{fabric}/_api/collection/{collection-name}/properties"
tags: ["Collections"]
---

# Update collection properties

`PUT /_fabric/{fabric}/_api/collection/{collection-name}/properties`

## Request

- The document declares no server URL.
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/macrometa/apis/macrometa-api-reference/docs/_fabric/:fabric/_api/collection/:collection-name/properties/put.ts> (a function with typed inputs; its response is checked against the schema)

Changes the properties of a collection.

## Path parameters

- `fabric` string, string, required
- `collection-name` string, string, required

## Request body

- ApiCollectionPutPropertiesHttpExamplesRc200
  - `hasStream` boolean, required: *True* if a local stream is associated with the collection.
  - `waitForSync` boolean: *True* if all data must be synced to storage before operation returns.
  - `cacheEnabled` boolean: *True* if collection has cache enabled

## Response `200`

Successfully updated the document.

- ApiCollectionPutCollectionPropertyHttpExamplesRc200
  - `code` integer: HTTP response code.
  - `error` boolean: Flag if there is an error in response. *False* for this response.
  - `id` string: Id of the the collection.
  - `objectId` string: Object id of the the collection.
  - `name` string: Name of the collection.
  - `statusString` 'unloaded' | 'loading' | 'loaded' | 'unloading' | 'deleted' | 'unknown': Status of the collection.
  - `type` number: Type of the collection.
  - `collectionModel` string: Type of collection model. - *DOC*: document model - *KV*: key/value model - *DYNAMO*: dynamo model
  - `isSpot` boolean: *True* if collection is a spot collection.
  - `isLocal` boolean: *True* if collection is a local collection.
  - `cacheEnabled` boolean: *True* if collection has cache enabled
  - `hasStream` boolean: *True* if collection has a stream.
  - `waitForSync` boolean: *True* if all data must be synced to storage before operation returns.
  - `keyOptions` FabricCollectionValidateKeyoption: Additional options for key generation. If specified, *keyOptions* should be a JSON array containing the following attributes:
    - `allowUserKeys` boolean: If set to *true*, you can supply a key value in the *_key* attribute of a document. If set to *false*, the key generator creates keys and an error occurs if you add a *_key* value
    - `increment` integer: Increment value for *autoincrement* key generator. Not used for other key generator types.
    - `offset` integer: Initial offset value for *autoincrement* key generator. Not used for other key generator types.
    - `type` string: Specifies the type of the key generator. - *traditional*: generates numerical keys in ascending order. - *autoincrement:* generates numerical keys in ascending order with configurable initial offset and spacing. - *padded:* generates keys of a fixed length (16 bytes) in ascending lexicographical sort order. - *uuid64*: generates universally unique keys.
  - `isSystem` boolean: *True* if collection is a system collection.
  - `globallyUniqueId` string: Collection's global unique Id.
  - `searchEnabled` boolean: *True* if collection is searchable.
  - `status` 0 | 2 | 3 | 4 | 5 | 6: Status of the collection. - *0*: corrupted - *2*: unloaded - *3*: loaded - *4*: unloading - *5*: deleted - *6*: loading

## Other responses

- `400`: Failed due to missing or malformed data. Verify that all parameters are complete.
- `404`: Failed to find specified collection.

---

[API](https://skmtc.dev/macrometa/apis/macrometa-api-reference.md) - [All operations](https://skmtc.dev/macrometa/apis/macrometa-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/macrometa/apis/macrometa-api-reference/revisions/2006b6d7f31d?raw)
