Update user

PATCH /api/users/{userId}

Update user data for the given ID. This method performs a partial update.

Path parameters

  • userId string Required

    The unique identifier of the user.

application/json

Body Required

Responses

PATCH /api/users/{userId}
curl \
 -X PATCH https://[tenant_id].logto.app/api/users/{userId} \
 -H "Content-Type: application/json" \
 -d '{"username":"string","primaryEmail":"string","primaryPhone":"string","name":"string","avatar":"string","customData":{}}'
Request example
{
  "username": "string",
  "primaryEmail": "string",
  "primaryPhone": "string",
  "name": "string",
  "avatar": "string",
  "customData": {}
}
Response examples (200)
{
  "id": "string",
  "username": "string",
  "primaryEmail": "string",
  "primaryPhone": "string",
  "name": "string",
  "avatar": "string",
  "customData": {},
  "identities": {},
  "lastSignInAt": 42.0,
  "createdAt": 42.0,
  "applicationId": "string",
  "isSuspended": true,
  "hasPassword": true,
  "ssoIdentities": [
    {
      "id": "string",
      "userId": "string",
      "issuer": "string",
      "identityId": "string",
      "detail": {},
      "createdAt": 42.0,
      "ssoConnectorId": "string"
    }
  ]
}