Favicon

You are here: Home > API Reference > Users > Update user

Update user

Update user

PUT
/v1/users/:userId
Copy to clipboard

Update user

Update user

Request

Add parameter in header authorization
Example: Authorization: Bearer <token>
userId string
required
Entity Id
Match pattern: ^[a-fA-F0-9]{24}$
Body Params application/json
password string optional
Password
≤ 128 characters · ≥ 8 characters
firstName string optional
≤ 128 characters
lastName string optional
≤ 128 characters
picture string optional
role string optional
admin adminViewer user serviceAccount
language string optional
es en fr de it zh pt ru
{
    "password": "string",
    "firstName": "string",
    "lastName": "string",
    "picture": "string",
    "role": "admin",
    "language": "es"
}

Responses

200 Response application/json
status boolean optional
data object optional
id string optional
Entity Id
Match pattern: ^[a-fA-F0-9]{24}$
email string optional
Email
≤ 256 characters · Format: email
firstName string optional
≤ 128 characters
lastName string optional
≤ 128 characters
fullName string optional
≤ 128 characters
picture string optional
role string optional
admin adminViewer user serviceAccount
newsletter boolean optional
hasPassword boolean optional
has2FAActive boolean optional
ssoUser boolean optional
organizationId string optional
Entity Id
Match pattern: ^[a-fA-F0-9]{24}$
organizations array [object] optional
id string optional
Entity Id
Match pattern: ^[a-fA-F0-9]{24}$
name string optional
≤ 128 characters
slug string optional
≤ 128 characters
picture string optional
organizationInfo object optional
id string optional
Entity Id
Match pattern: ^[a-fA-F0-9]{24}$
name string optional
≤ 128 characters
slug string optional
≤ 128 characters
picture string optional
createdBy string optional
Entity Id
Match pattern: ^[a-fA-F0-9]{24}$
branding object optional
store object optional
configuration object optional
language string optional
es en fr de it zh pt ru
updatedAt string optional
Format: date-time
createdAt string optional
Format: date-time
verificationStatus string optional
verified unverified unknown
activityTrace object optional
lastLogin object optional
dashboard string optional
Format: date-time
sdk string optional
Format: date-time
store string optional
Format: date-time
lastAction object optional
dashboard string optional
Format: date-time
sdk string optional
Format: date-time
store string optional
Format: date-time
intercomUserHash string optional
≤ 128 characters
{
    "status": true,
    "data": {
        "id": "string",
        "email": "user@example.com",
        "firstName": "string",
        "lastName": "string",
        "fullName": "string",
        "picture": "string",
        "role": "admin",
        "newsletter": true,
        "hasPassword": true,
        "has2FAActive": true,
        "ssoUser": true,
        "organizationId": "string",
        "organizations": [
            {
                "id": "string",
                "name": "string",
                "slug": "string",
                "picture": "string"
            }
        ],
        "organizationInfo": {
            "id": "string",
            "name": "string",
            "slug": "string",
            "picture": "string",
            "createdBy": "string",
            "branding": {},
            "store": {},
            "configuration": {}
        },
        "language": "es",
        "updatedAt": "2024-01-01T00: 00:00Z",
        "createdAt": "2024-01-01T00: 00:00Z",
        "verificationStatus": "verified",
        "activityTrace": {
            "lastLogin": {
                "dashboard": "2024-01-01T00: 00:00Z",
                "sdk": "2024-01-01T00: 00:00Z",
                "store": "2024-01-01T00: 00:00Z"
            },
            "lastAction": {
                "dashboard": "2024-01-01T00: 00:00Z",
                "sdk": "2024-01-01T00: 00:00Z",
                "store": "2024-01-01T00: 00:00Z"
            }
        },
        "intercomUserHash": "string"
    }
}
401 Response application/json
status boolean optional
false
error object optional
code number optional
4004
message string optional
Invalid Token
{
    "status": false,
    "error": {
        "code": 4002,
        "message": "No auth token"
    }
}
404 Response application/json
status boolean optional
false
error object optional
code number optional
3001
message string optional
Entity not found
{
    "status": false,
    "error": {
        "code": 3001,
        "message": "Entity not found"
    }
}