Create User API
Creates a new user and assigns the user to a business unit with the specified user type, roles, permissions, and holder account. Available to SUPER_ADMIN, PARTNER, MERCHANT, and BRANCH users.
Overview
Creates a new user with the supplied account information and access configuration.
HTTP Method: POST
Endpoint: /api/v1/users/user
Access Levels: SUPER_ADMIN, PARTNER, MERCHANT, BRANCH
Authentication
Include your 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 |
|---|---|---|
email | String | Email address of the new user. |
businessUnitId | UUID string | Identifier of the business unit associated with the user. |
roles | Array of strings | Roles assigned to the user. |
permissions | Array of strings | Permissions assigned to the user. |
userType | String | Type of user, for example, SUPER_ADMIN. |
phoneNumber | String | User's phone number, including the country code where applicable. |
firstName | String | User's first name. |
lastName | String | User's last name. |
holderAccountId | Integer | Holder account identifier. |
Example Request
{
"email": "[email protected]",
"businessUnitId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"roles": [
"string"
],
"permissions": [
"string"
],
"userType": "SUPER_ADMIN",
"phoneNumber": "+5028789846",
"firstName": "John",
"lastName": "Smith",
"holderAccountId": 0
}Note: Example values are illustrative. Replace them with valid user details and identifiers 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 a valid email address and
businessUnitId. - Ensure that the specified user type, roles, and permissions are supported and appropriate for the intended account.
- Use a valid
holderAccountIdwhere applicable. - Handle the response according to the returned HTTP status and response fields.
Note: The API schema does not define the complete list of supported user types, roles, or permissions. Confirm the allowed values and any field-specific validation rules with the API implementation.
Updated 25 days ago