post
https://demo-api.edfapay.com/api/v1/users/user
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Overview
Create a new user.
Endpoint
POST https://demo-api.edfapay.com/api/v1/users/user
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| String | Yes | User email | |
| businessUnitId | UUID | Yes | Business unit |
| roles | Array | Yes | Roles |
| permissions | Array | No | Permissions |
| userType | String | Yes | USER / SUPER_ADMIN |
| phoneNumber | String | Yes | Phone |
Request Example
curl --location 'https://demo-api.edfapay.com/api/v1/users/user' \
--header 'X-API-KEY: <Your API Key>' \
--header 'Content-Type: application/json' \
--data '{
"email": "[email protected]",
"businessUnitId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"roles": ["Admin"],
"permissions": [],
"userType": "USER",
"phoneNumber": "+966-500000000"
}'Response Body
| Field | Type | Description |
|---|---|---|
| code | Integer | Response code |
| message | String | Status |
| data.id | UUID | Created user ID |
| data.username | String | |
| data.phoneNumber | String | Phone |
| data.userType | String | Type |
Response Example
{
"code": 200,
"message": "Success",
"data": {
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"username": "[email protected]",
"phoneNumber": "+966-500000000",
"userType": "USER"
}
} 200