View as Markdown
Clerk icon

Clerk ACTION

Update User

Update a user's attributes. You can set the user's primary contact identifiers (email address and phone numbers) by updating the Primary Email Address Id and Primary Phone Number Id attributes respectively. Both IDs should correspond to verified identifications that belong to the user. See the documentation
  • Action
  • Writes data
  • Destructive
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Clerk account once, then configure and run Update User from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "clerk-update-user",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    clerk: { authProvisionId: "apn_xxxxxxx" },
    userId: "User Id",
    externalId: "External Id",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Update User inputs
Property Type Description
userId User Id string
The Id of the user.
Required Dynamic
externalId External Id string
The ID of the user as used in your external systems or your previous authentication solution. Must be unique across your instance.
Optional
firstName First Name string
The first name to assign to the user.
Optional
lastName Last Name string
The last name to assign to the user.
Optional
primaryEmailAddressId Primary Email Address Id string
The ID of the email address to set as primary. It must be verified, and present on the current user.
Optional Dynamic
notifyPrimaryEmailAddressChanged Notify Primary Email Address Changed boolean
If set to true, the user will be notified that their primary email address has changed. By default, no notification is sent.
Optional
primaryPhoneNumberId Primary Phone Number Id string
The ID of the phone number to set as primary. It must be verified, and present on the current user.
Optional Dynamic
primaryWeb3WalletId Primary Web3 Wallet Id string
The ID of the web3 wallets to set as primary. It must be verified, and present on the current user.
Optional Dynamic
username Username string
The username to give to the user. It must be unique across your instance.
Optional
profileImageId Profile Image Id string
The ID of the image to set as the user's profile image
Optional
password Password string
The plaintext password to give to the user. Must be at least 8 characters long, and can not be in any list of hacked passwords.
Optional
skipPasswordChecks Skip Password Checks boolean
When set to true all password checks are skipped. It is recommended to use this method only when migrating plaintext passwords to Clerk. Upon migration the user base should be prompted to pick stronger password.
Optional
signOutOfOtherSessions Sign Out Of Other Sessions boolean
Set to true to sign out the user from all their active sessions once their password is updated. This parameter can only be used when providing a password.
Optional
totpSecret TOTP Secret string
In case TOTP is configured on the instance, you can provide the secret to enable it on the newly created user without the need to reset it.
Optional
backupCodes Backup Codes string[]
If Backup Codes are configured on the instance, you can provide them to enable it on the newly created user without the need to reset them. You must provide the backup codes in plain format or the corresponding bcrypt digest.
Optional
publicMetadata Public Metadata object
Metadata saved on the user, that is visible to both your Frontend and Backend APIs.
Optional
privateMetadata Private Metadata object
Metadata saved on the user, that is only visible to your Backend API.
Optional
unsafeMetadata Unsafe Metadata object
Metadata saved on the user, that can be updated from both the Frontend and Backend APIs. Note: Since this data can be modified from the frontend, it is not guaranteed to be safe.
Optional
deleteSelfEnable Delete Self Enable boolean
If true, the user can delete themselves with the Frontend API.
Optional
createOrganizationEnabled Create Organization Enabled boolean
If true, the user can create organizations with the Frontend API.
Optional
createdAt Created At string
A custom date/time denoting when the user signed up to the application, specified in RFC3339 format (e.g. 2012-10-20T07:15:20.902Z).
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
clerk-update-user
Version
0.0.3
App
Clerk
Authentication
API key
Read-only
No
Destructive
Yes
Open world
Yes