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.

HeaderValue
X-API-KEYYOUR_API_KEY
Accept*/*
Content-Typeapplication/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.

FieldTypeDescription
emailStringEmail address of the new user.
businessUnitIdUUID stringIdentifier of the business unit associated with the user.
rolesArray of stringsRoles assigned to the user.
permissionsArray of stringsPermissions assigned to the user.
userTypeStringType of user, for example, SUPER_ADMIN.
phoneNumberStringUser's phone number, including the country code where applicable.
firstNameStringUser's first name.
lastNameStringUser's last name.
holderAccountIdIntegerHolder 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 holderAccountId where 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.


Did this page help you?