Invite User API
Invites a new user by submitting their account details, business unit, user type, roles, permissions, and holder account information. Available to SUPER_ADMIN, PARTNER, MERCHANT, and BRANCH users.
Overview
Creates an invitation for a new user using the supplied user and access configuration.
HTTP Method: POST
Endpoint: /api/v1/users/invite-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 |
|---|---|---|
email | String | Email address of the user being invited. |
businessUnitId | UUID string | Identifier of the associated business unit. |
roles | Array of strings | Roles to assign to the invited user. |
permissions | Array of strings | Permissions to assign to the invited user. |
userType | String | User type, such as 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": "+963-03032098",
"firstName": "John",
"lastName": "Smith",
"holderAccountId": 0
}Note: Example values are illustrative. Replace them with valid user information 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 the specified user type, roles, and permissions are supported for the intended account.
- Use a valid
holderAccountIdwhere applicable. - Handle the response according to the returned HTTP status and response fields.
Important: The API specification does not define the invitation delivery mechanism, expiration period, or whether the invitation automatically creates an active user. Confirm these behaviors with the API implementation.
Updated 25 days ago