Update User API
Update an existing user’s profile, roles, permissions, image URL, and holder account information. Available to authorized SUPER_ADMIN, PARTNER, MERCHANT, and BRANCH users.
Overview
Updates an existing user using the supplied user information.
HTTP Method: PUT
Endpoint: /api/v1/users/user
Access Levels: SUPER_ADMIN, PARTNER, MERCHANT, BRANCH
Authentication
Include the API key in the request headers.
| Header | Value |
|---|---|
X-API-KEY | YOUR_API_KEY |
Accept | */* |
Content-Type | application/json |
Production Base URL: https://app-api.edfapay.com
Request Parameters
No path or query parameters are required.
Request Body
The request body is required and must be provided as JSON.
| Field | Type | Description |
|---|---|---|
id | UUID string | Unique identifier of the user to update. |
firstName | String | User's first name. |
lastName | String | User's last name. |
phoneNumber | String | User's phone number, including the country code where applicable. |
userType | String | User type, such as SUPER_ADMIN. |
roles | Array of strings | Roles assigned to the user. |
permissions | Array of strings | Permissions assigned to the user. |
imageUrl | String | URL of the user's profile image. |
holderAccountId | Integer | Holder account identifier. |
Example Request
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"firstName": "John",
"lastName": "Smith",
"phoneNumber": "+3637-390419156",
"userType": "SUPER_ADMIN",
"roles": [
"string"
],
"permissions": [
"string"
],
"imageUrl": "https://example.com/profile.jpg",
"holderAccountId": 0
}Note: The example values are illustrative. Use valid user identifiers, supported user types, roles, permissions, and account IDs for your environment.
Responses
200 OK
The request was processed successfully.
Example response:
{
"code": 0,
"message": "string",
"errorCode": "string",
"data": {}
}400 Bad Request
The request could not be processed because of invalid or incorrect request data.
Example response:
{
"code": 0,
"message": "string",
"errorCode": "string",
"data": {}
}Integration Notes
- Provide the existing user's
idin the request body. - Ensure the user type, roles, and permissions are valid for the target environment.
- Use the correct
holderAccountIdwhere applicable. - Handle the response according to the returned HTTP status and response fields.
Important: The API schema does not specify whether omitted fields remain unchanged or are overwritten. Confirm the backend update behavior before submitting partial user data.
Updated 25 days ago