Users

Update User

Updates an existing user by email.

Only the fields provided in the request body will be updated.

owner_ids applies to machine users only and replaces the whole owner set, so send every owner you want to keep. Use it to assign owners to a machine user that was created without any.

patch/api/users

Request

  • Base URL: https://app.withwillow.ai
  • URL: https://app.withwillow.ai/api/users
  • Auth: HTTP bearer

Query parameters

emailstring email required

The email address of the user to update

Request body

namestring

User's display name

owner_idsstring[]

The complete set of owners for a machine user, not a delta: any current owner left out of the array is removed, and [] clears every owner. Each ID must belong to a regular user in your organization. Rejected with 400 for a regular user.

risk_scoreinteger nullable

Identity risk score, where a higher number means a riskier user. Omit the field to leave the current score untouched, or send null to clear it back to unscored.

Scores set through this endpoint are recorded with source api, which overwrites a score an admin set by hand. They take effect once the User Risk Score beta feature is enabled.

Example request

{
  "name": "John Updated",
  "owner_ids": [
    "user_123",
    "user_456"
  ],
  "risk_score": 72
}

Response

User updated successfully

Example response

{
  "data": {
    "name": "John Doe",
    "email": "john.doe@example.com",
    "slug": "john-doe",
    "group_ids": [
      "group_123",
      "group_456"
    ],
    "owner_ids": [
      "user_123"
    ],
    "owned_machine_user_ids": [
      "user_bot_456"
    ],
    "risk_score": 72,
    "risk_score_source": "crowdstrike",
    "risk_score_updated_at": "2024-01-20T03:00:00Z",
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-20T14:45:00Z",
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "org_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.