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.

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 user being invited.
businessUnitIdUUID stringIdentifier of the associated business unit.
rolesArray of stringsRoles to assign to the invited user.
permissionsArray of stringsPermissions to assign to the invited user.
userTypeStringUser type, such as 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": "+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 holderAccountId where 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.


Did this page help you?