Skip to content

Update a collection

View .md
PATCH

Only defaultTtlSeconds can change. Indexes are fixed at creation: changing them would require rewriting every item in the collection.

Authorization

  • Authorizationheaderrequired

    Bearer YOUR_API_KEY. Create a key in the dashboard.

Path parameters

  • collectionstringrequired

    Collection name.

Body

application/json

  • defaultTtlSecondsintegerrequirednullable

    New default TTL, or null to clear it.

    Limitsmin 60 · max 63072000

Responses

200Collection updated.
  • collectionobjectrequired

    A namespace of JSON documents addressed by key.

    6 properties
    • namestringrequired
    • indexesobject[]required

      Fields that POST /v1/memory/collections/{collection}/query can filter on. Immutable after creation.

      1 properties
      • fieldstringrequired
    • defaultTtlSecondsintegerrequirednullable

      TTL applied to items written without their own ttlSeconds. Null means items are kept until deleted.

    • statusstringrequired

      active, or deleting while a delete drains in the background.

    • createdAtstring<date-time>required
    • updatedAtstring<date-time>required
400Invalid TTL.
  • codestringrequired
  • messagestringrequired
  • detailsobject
401Unauthorized.
  • codestringrequired
  • messagestringrequired
  • detailsobject
404Collection not found.
  • codestringrequired
  • messagestringrequired
  • detailsobject