Skip to main content
PUT
/
user
/
{userId}
Update user
curl --request PUT \
  --url https://apiweb.mile.app/api/v3/user/{userId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "your update name"
}
'
{
  "title": "newExampleUsers",
  "example": {
    "status": true,
    "data": {
      "_id": "65c1f4eeca7c4816d94587b7",
      "name": "Example",
      "email": "example@mile.app",
      "provider": "web",
      "hubId": [
        "65c1f68ea735b522d370ea22",
        "65c1f7b800da624e7267a822",
        "65cf10ace3103030040ad152",
        "65c1f79069b4a9333c5a3d12",
        "6661404dfe5cf5096220cb42",
        "65d2d821035413251965f242"
      ],
      "organizationId": "65c1f4eeca7c4816d94587b2",
      "status": "active",
      "lastLogin": "2024-06-18T03:54:47+00:00",
      "roleId": "65c1f4eeca7c4816d94587b3",
      "activationCode": "5dc25a36e280ba34ef6dfe1f54dcb5d6",
      "onboardingStep": [],
      "teamId": [],
      "updatedTime": "2024-06-18T04:42:04+00:00",
      "createdTime": "2024-02-06T08:59:26+00:00",
      "phoneNumber": null,
      "dynamicVisitTime": []
    },
    "message": "Data has been updated successfully.",
    "statusCode": 200
  }
}

Authorizations

Authorization
string
header
required

Use a valid Bearer token to authenticate.

Path Parameters

userId
string
required

The identifier for the user that generated by system. Example: 621dd813eb3ebf16b94d6969

Body

application/json
name
string
required

The name of user. Example: Jhon doe

email
string

The email of user. Example: example@mile.app

phoneNumber
string

The phone number of user. Example: +628123456789

hubId
string[]

The hub id of user. Example: ['621dd813eb3ebf16b94d6969','621dd813eb3ebf16b94d6968']

teamId
string[]

The team id of user. If you set empty array, it will assigned to all team. Example: ['621dd813eb3ebf16b94d6969','621dd813eb3ebf16b94d6968']

Response

OK

The response is of type object.