Update Resource

Method: PUT /{api_prefix}/{collection_path}/{resource_key}/ Auth: Flux API Keyalways required for writes, even on public APIs. The key's role must grant update on this API, and the target collection's connection must allow update (off by default).

Replaces a resource's document with a new revision and publishes it immediately. This is a full-document replace, not a partial patch — send the complete document. The REST twin of the MCP update_record tool.


URL Pattern

PUT https://{environment_key}.fxns.io/{api_prefix}/{collection_path}/{resource_key}/

There is no PATCH: partial updates would diverge from the revision model, where every revision is a complete, schema-valid document. PATCH returns 405 with a hint to use PUT.


Request Body

  • Name
    data
    Type
    object
    Required
    required
    Description

    The full replacement document. Must match the collection schema — invalid documents return 422 with the standard content validation payload.


Response

200 OK:

{
  "resource_key": "kDLT9jjrcAzh",
  "revision_key": "r_2xX0",
  "write_units": 1,
  "published": true
}

The previous revision is preserved in the revision history (Management API); the new revision becomes current and is re-vectorized, so search reflects the update once embedding completes.


Example

curl -sS -X PUT "https://7c9h4pwu.fxns.io/assistant/users/usr_8f2k1/memories/kDLT9jjrcAzh/" \
  -H "Authorization: Simple <public_key>:<private_key>" \
  -H "Content-Type: application/json" \
  -d '{
        "data": {
          "content": "Prefers concise answers; time zone changed to EET.",
          "kind": "preference",
          "source": "chat-2026-07-22"
        }
      }'

Errors

Same table as Create Resource, with two differences: 404 also covers an unknown resource_key, and 409 external_id_conflict does not apply (no key field on update).


Was this page helpful?