Skip to main content

Update User

This API updates an existing user account, including its role, active status, and description.

Endpoint Details

URL/v1/auth/users/id
MethodPUT
AuthorizationBearer Token

Request Headers

HeaderTypeDescription
Content-TypeStringMust be application/json

Request Path

To update an existing user, use the following request format:

/v1/auth/users/ac7a586b-a0ba-41ce-bb55-343cc8ca6838

Path Parameter

ParameterTypeDescription
idUUIDUnique identifier of the user to update

Request Body

Use the following format to make a request:

JSON Request
{
"role_code": "member",
"is_active": false,
"description": "contoh teks"
}

Body Parameters

ParameterTypeDescription
role_codeStringUpdated role assigned to the user
is_activeBooleanIndicates whether the user account is active
descriptionStringOptional description of the user account

Response

Here is an example response when the data is successfully updated:

Response
{
"user": {
"id": "ac7a586b-a0ba-41ce-bb55-343cc8ca6838",
"tenant_id": "5ebde17c-01a1-4394-977b-9e611250cf5d",
"email": "memberaplikasi12@example.com",
"first_name": "Member",
"last_name": "Aplikasi",
"role_code": "member",
"description": "contoh teks",
"created_by": "0a937c60-0ed4-4d06-870a-2e284b54287d",
"updated_by": "0a937c60-0ed4-4d06-870a-2e284b54287d",
"created_at": 1784013339,
"updated_at": 1784014922
}
}

Field Descriptions

FieldTypeDescription
idUUIDUnique identifier of the user
tenant_idUUIDIdentifier of the tenant that owns the user
emailStringEmail address of the user
first_nameStringFirst name of the user
last_nameStringLast name of the user
role_codeStringRole assigned to the user
descriptionStringDescription of the user account
created_byUUIDIdentifier of the user who created the account
updated_byUUIDIdentifier of the user who last updated the account
created_atIntegerUser creation timestamp in Unix format
updated_atIntegerLast update timestamp in Unix format

info
  • A valid Bearer Token is required to access this endpoint.
  • The id path parameter must reference an existing user.
  • Unix timestamp fields can be converted to a human-readable date and time format as needed.