Directus icon

Directus

Consume Directus API

User → Update

AI-generated

Summary

Update a user in Directus

Inputs

  • userId (required) — ID of the user to update.
  • userFields — Collection of fields to update; each field includes a 'name' (field ID or name) and a 'value' to set.

Output shape

a single updated user object

Returns the updated user data; simplification may affect payload structure.

Examples

Example 1: Update a user's email address

Set userId to 123 and add a field 'email' with value 'new@example.com'.

Example 2: Update multiple fields at once

Add two fields: {name: 'status', value: 'active'} and {name: 'role', value: 'admin'}.

Example 3: Update a user without simplification

Provide userId and fields; leave simplification disabled to get raw response.

Discussion