Create Account
The Create Account API allows authorized users to create a new account in the system, specifying the account holder's details, role, and associated branch if applicable.
API Method
POST
Endpoint
https://cebuana-apiuat.veryfyglobal.com/accounts
Headers
Key
Value
Accept
application/json
Authorization
Bearer <YOUR_TOKEN>
Request Body
Form Data Parameters
Parameter
Type
Required
Description
role
integer
Yes
The role assigned to the account refer Role Enum Get ID.
branch_id
integer
No
The ID of the branch associated with the account.
employee_id
string
Yes
A unique identifier for the employee (must be unique across users).
name
string
Yes
The full name of the account holder.
email
string
Yes
The email address of the account holder (must be unique).
password
string
Yes
The password for the account (minimum 6 characters).
Example Request
Request URL
POST /accountsRequest Body
{
"role": "admin",
"branch_id": 1,
"employee_id": "emp123",
"name": "John Doe",
"email": "[email protected]",
"password": "StrongPassword123"
}Response Sample
{
"message": "Ok",
"data": []
}{
"code": "422.000.000",
"message": "The role field is required. (and 5 more errors)",
"errors": {
"role": [
"The role field is required."
],
"branch_id": [
"The branch id field is required."
],
"employee_id": [
"The employee id field is required."
],
"name": [
"The name field is required."
],
"email": [
"The email field is required."
],
"password": [
"The password field is required."
]
}
}{
"code": "403.000.000",
"message": "This action is unauthorized."
}Last updated