Update user's standard attributes

Overview

To update the user's standard attributes:

  1. Fetch the user's original standard attributes by query first.

  2. Change the attributes payload and update the user's standard attributes by mutation.

API Details

Generate the user node id

Follow the document here to generate the user node id.

Fetch the user's standard attributes by query

The query:

query {
  node(id: "<BASE64URL_ENCODED_USER_NODE_ID>") {
    ... on User {
      standardAttributes
    }
  }
}

The sample response:

Update the user's standard attributes by mutation

The query:

The variables:

The sample variables:

The sample response:

Updating Custom Attributes

To learn how to update a user's custom attributes, see the update custom attribute example.

Last updated

Was this helpful?