younifyd
Menu

Update User Attributes

Update User Attributes

POST/v2026-04-27/organizations/{organizationId}/users/{sanityUserId}/attributes

Use it in a workflow

  1. Add a step and choose the Sanity connector.
  2. Pick the Update User Attributes action (under User Attributes).
  3. Fill in the fields below, then reference the result from later steps as {{updateUserAttributes.response.data}}.

Request

Path parameters

organizationIdstringrequired

Unique identifier of the organization

sanityUserIdstringrequired

Unique identifier of the Sanity user

Request body

Enter the body as JSON in the step's Body field.

attributesarray<object>required

Array of attributes to set with their keys and values

keystringrequired

Textual name of the attribute (e.g., 'location', 'department')

valueoneOfrequired

Value to set for the attribute

json
{
  "attributes": [
    {
      "key": "string",
      "value": null
    }
  ]
}

Response

Returns 200 with an object. Read it in later steps with {{updateUserAttributes.response.data.<field>}}.

sanityUserIdstring

ID of the user

organizationIdstring

ID of the organization

attributesarray<object>
typestringrequired

Type of the attribute

One ofstringstring-arrayintegerinteger-arraynumbernumber-arrayboolean

keystringrequired

Textual name of the attribute

valuesobjectrequired2 fields

Values from all available sources. Contains 'saml' and/or 'sanity' keys with their respective values. Shows all values regardless of precedence, making it clear which values are being shadowed.

activeSourcestringrequired

Source of the attribute: - `saml`: Automatically synced from SSO providers (cannot be created or managed via this API) - `sanity`: Created and managed through this API by organization administrators

One ofsamlsanity

activeValueoneOfrequired

The value currently in effect, taken from the activeSource. This is the value that will be used in access control evaluations and role filters.

updatedAtstring (date-time)

Timestamp when attributes were last updated (only returned by mutation endpoints)

json
{
  "sanityUserId": "user-xyz",
  "organizationId": "org-123",
  "attributes": [
    {
      "type": "string",
      "key": "location",
      "values": {
        "saml": "US",
        "sanity": "UK"
      },
      "activeSource": "saml",
      "activeValue": "UK"
    }
  ],
  "updatedAt": "2025-11-26T19:30:00.000Z"
}

Need more? See the Sanity guide for connection setup and behaviour shared by every action.