update

user.document.update

Replaces the content of an existing document and increments its version. The DEK is shared across versions, so keys are not rotated on update.

Auth

Bearer JWT + unsealed vault.

Arguments

Arg Type Description
id ID! Document UUID
input DocumentInput! Same shape as create

See create for the DocumentInput fields. uniquePerVault cannot be changed on update (ignored).

GraphQL

mutation($id: ID!, $input: DocumentInput!) {
  user {
    document {
      update(id: $id, input: $input) {
        id
        version
        audit { updatedAt updatedBy }
      }
    }
  }
}

Response

DocumentMetadata with version incremented by 1.

curl

curl -X POST https://api.test.geena.eu/graphql \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "mutation($id: ID!, $i: DocumentInput!) { user { document { update(id: $id, input: $i) { id version } } } }",
    "variables": {
      "id": "7b4f-...",
      "i": { "name": "My name", "schemaRef": "https://schema.identa.io/core/PersonFullName.json", "data": { "firstName": "Alice" } }
    }
  }'