Skip to content

Update a user

Request

Update the details of a user identified by the user_id in the the path parameter.

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 Authentication Factors.

Security
auth_token and api-key
Path
user_idstring(UserId)^[0-9]+$required

The unique identifier for the user.

Headers
idempotency-refstring

A unique call reference generated by the caller that, taking into consideration the payload as well as the operation itself, helps avoid duplicate operations. Idempotency reference uniqueness is maintained for at least 24 hours.

Bodyapplication/jsonrequired
namestring, [ 1 .. 50 ] characters

The first name of the user.

surnamestring, [ 1 .. 50 ] characters

The last name of the user.

emailstring, (email)(Email)

E-mail Address of the user

mobileobject(Mobile)
dateOfBirthobject(Date)

Date of birth of the authorised user.

tagstring, <= 50 characters(Tag)^[a-zA-Z0-9_-]+$

The tag field is a custom field that can be used to search and filter.

localestring, <= 5 characters(UserLocale)^[a-z]{2}(-[A-Z]{2})?$

BCP47 locale code (e.g. en, en-US). The locale determines which email and SMS user notification templates are used.

Example:"en-GB"
brandstring, <= 25 characters(Brand)^[a-zA-Z0-9]+$

Brand identifier used to determine the set of email and SMS user notification templates. Must be alphanumeric, up to 25 characters, and contain no spaces.

rolesArray of strings(UserPredefinedRole)

Optional roles to assign to the user. This uses overwrite behaviour - roles included in this list will be assigned, and roles not included will be unassigned. Users cannot update their own roles. For a full description of the permissions associated to each role, see our product documentation.

Items Enum:"CARD_ASSIGNEE""CARDS_MANAGEMENT_ROLE""FUNDS_MANAGEMENT_ROLE""ACCESS_MANAGEMENT_ROLE""ADMIN"
curl -i -X PATCH \
  'https://sandbox.weavr.io/multi/users/{user_id}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'api-key: YOUR_API_KEY_HERE' \
  -H 'idempotency-ref: string' \
  -d '{
    "name": "string",
    "surname": "string",
    "email": "user@example.com",
    "mobile": {
      "countryCode": "stri",
      "number": "string"
    },
    "dateOfBirth": {
      "year": 1900,
      "month": 1,
      "day": 1
    },
    "tag": "string",
    "locale": "en-GB",
    "brand": "string",
    "roles": [
      "CARD_ASSIGNEE"
    ]
  }'

Responses

Success

Headers
request-refstringrequired

A request identifier. Providing this reference when contacting our support team will help us investigate your query.

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

The unique identifier of the user.

identityobject(IdentityId)required

The identity that the user belongs to.

namestring, <= 100 charactersrequired

The first name of the user.

surnamestring, <= 100 charactersrequired

The last name of the user.

emailstring, (email)(Email)required

E-mail Address of the user

mobileobject(Mobile)
activebooleanrequired

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

dateOfBirthobject(Date)

Date of birth of the authorised user.

tagstring, <= 50 characters(Tag)^[a-zA-Z0-9_-]+$

The tag field is a custom field that can be used to search and filter.

countryOfResidencestring, = 2 characters^[A-Z]+$
localestring, <= 5 characters(UserLocale)^[a-z]{2}(-[A-Z]{2})?$

BCP47 locale code (e.g. en, en-US). The locale determines which email and SMS user notification templates are used.

Example:"en-GB"
brandstring, <= 25 characters(Brand)^[a-zA-Z0-9]+$

Brand identifier used to determine the set of email and SMS user notification templates. Must be alphanumeric, up to 25 characters, and contain no spaces.

rolesArray of strings(UserPredefinedRole)
Items Enum:"CARD_ASSIGNEE""CARDS_MANAGEMENT_ROLE""FUNDS_MANAGEMENT_ROLE""ACCESS_MANAGEMENT_ROLE""ADMIN"
Response
{ "id": "string", "identity": { "type": "CONSUMER", "id": "string" }, "name": "string", "surname": "string", "email": "user@example.com", "mobile": { "countryCode": "stri", "number": "string" }, "active": true, "dateOfBirth": { "year": 1900, "month": 1, "day": 1 }, "tag": "string", "countryOfResidence": "st", "locale": "en-GB", "brand": "string", "roles": [ "CARD_ASSIGNEE" ] }