Skip to content

Update a user

Request

Update the details of a user identified by the user_id in the the path parameter. After calling this endpoint you need to step-up ( issue a challenge /stepup/challenges/otp/{channel} ). More details on how to step-up a token can be found here Step-Up..

Only the fields that are specified in the request body will be updated. All other fields will remain unchanged.

When patching a mobile number, the new mobile number should be enrolled for Additional Factors.

Required user role: ADMIN

Security
apiKey and authToken
Path
user_idstring^[0-9]+$required

The unique identifier for the user.

Example:110747174434373672
Bodyapplication/jsonrequired
namestring, <= 20 characters

The first name of the user.

surnamestring, <= 20 characters

The last name of the user.

emailstring, (email)

E-mail Address of the user

mobileobject

Mobile number of the user

dateOfBirthobject

Date of birth of the authorised user.

rolesArray of strings, non-empty

Roles define the level of access assigned to the user.

  • CREATOR: Users assigned this role can create, view and update payment runs.
  • CONTROLLER: Users assigned this role can view and link their company's bank accounts as well as fund payment runs.
Items Enum:"CREATOR""CONTROLLER"
curl -i -X PATCH \
  https://sandbox.weavr.io/payment-run/v1/users/110747174434373672 \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'api-key: YOUR_API_KEY_HERE' \
  -d '{
    "name": "string",
    "surname": "string",
    "email": "user@example.com",
    "mobile": {
      "countryCode": "string",
      "number": "string"
    },
    "dateOfBirth": {
      "year": 1900,
      "month": 1,
      "day": 1
    },
    "roles": [
      "CREATOR"
    ]
  }'

Responses

Success

Bodyapplication/json
idstring^[0-9]+$required

The unique identifier of the user.

buyerIdstring^[0-9]+$required

The identifier for the identity.

namestring, <= 100 charactersrequired

The first name of the user.

surnamestring, <= 100 charactersrequired

The last name of the user.

emailstring, (email)required

E-mail Address of the user

mobileobject

Mobile number of the user

activebooleanrequired

The state of the user. If the active attribute is false, then the user will not be able to log in.

dateOfBirthobject

Date of birth of the authorised user.

rolesArray of strings, non-emptyrequired

Roles define the level of access assigned to the user.

  • CREATOR: Users assigned this role can create, view and update payment runs.
  • CONTROLLER: Users assigned this role can view and link their company's bank accounts as well as fund payment runs.
Items Enum:"CREATOR""CONTROLLER"
addedByobject
Response
{ "id": "string", "buyerId": "string", "name": "string", "surname": "string", "email": "user@example.com", "mobile": { "countryCode": "string", "number": "string" }, "active": true, "dateOfBirth": { "year": 1900, "month": 1, "day": 1 }, "roles": [ "CREATOR" ], "addedBy": { "rolesNames": [ … ], "userId": "string" } }