Skip to content

Create new employee

Request

Security
oauth2ClientCredentials(Required scopes: employees:write)
Headers
org_wallet_refstring

Organization wallet reference, defaults to "1" if not provided

business_idstringrequired

Business identifier for the request

Bodyapplication/jsonrequired
namestringrequired

Employee name

organization_emailstringrequired

Organization email

personal_emailstring

Personal email

phonestring

Phone number

statusobject

Employee status

roleobject

Employee role

is_directorboolean

Is director

team_codestring

Team Code

supervisorstring

Supervisor ID

external_idstring

External ID

tagsArray of strings

Employee tags

invited_onstring

Invited on date

access_expiry_dateobject

Employee access expiry date

curl -i -X POST \
  https://developer.boyahq.com/_mock/v2/openapi/employees \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'business_id: string' \
  -H 'org_wallet_ref: string' \
  -d '{
    "name": "string",
    "organization_email": "string",
    "personal_email": "string",
    "phone": "string",
    "status": {},
    "role": {},
    "is_director": true,
    "team_code": "string",
    "supervisor": "string",
    "external_id": "string",
    "tags": [
      "string"
    ],
    "invited_on": "string",
    "access_expiry_date": {}
  }'

Responses

Employee created successfully

Bodyapplication/json
_idstring

Employee MongoDB ID

namestring

Employee name

employee_idstring

Employee ID

userstring

User ID

walletsArray of objects(EmployeeWalletDto)

Employee wallets

businessstring

Business ID

invited_onstring

Invited on date

organization_emailstring

Organization email

phonestring

Phone number

email_verifiedboolean

Email verified flag

statusstring

Employee status (ACTIVE/INACTIVE)

rolestring

Employee role

is_directorboolean

Is director flag

consent_pendingboolean

Consent pending flag

cardsArray of strings

Associated cards

createdAtstring

Created timestamp

updatedAtstring

Updated timestamp

__vnumber

Version key

permissionsobject(EmployeePermissionsDto)

Employee permissions

last_login_atstring

Last login timestamp

teamobject(EmployeeTeamDto)

Employee team

notification_preferencesArray of strings

Notification preferences

tagsArray of strings

Employee tags

supervisorstring

Supervisor ID

external_idstring

External ID

idstring

Auto-generated ID

Response
{ "_id": "string", "name": "string", "employee_id": "string", "user": "string", "wallets": [ {} ], "business": "string", "invited_on": "string", "organization_email": "string", "phone": "string", "email_verified": true, "status": "string", "role": "string", "is_director": true, "consent_pending": true, "cards": [ "string" ], "createdAt": "string", "updatedAt": "string", "__v": 0, "permissions": { "ALLOCATIONS_INITIATE": 0, "ALLOCATIONS_VIEW": 0, "BULK:PAYOUTS_INITIATE": 0, "BULK:PAYOUTS_VIEW": 0, "BUSINESS:STATEMENTS_VIEW": 0, "BUSINESS:BALANCE_VIEW": 0, "BUSINESS:BALANCE_EDIT": 0, "BUSINESS:TRENDS_VIEW": 0, "BUSINESS:SETTINGS_VIEW": 0, "BUSINESS:SETTINGS_EDIT": 0, "CARDS_VIEW": 0, "CARDS_EDIT": 0, "EMPLOYEES:BALANCE_VIEW": 0, "PAYROLL_INITIATE": 0, "PAYROLL_VIEW": 0, "PAYABLES_INITIATE": 0, "PAYABLES_VIEW": 0, "PEOPLE_VIEW": 0, "PEOPLE_EDIT": 0, "PEOPLE_ARCHIVE": 0, "PEOPLE_ALLOCATE": 0, "EXPENSES_VIEW": 0, "EXPENSES_EXPORT": 0, "EXPENSES_REVIEW": 0, "SETTINGS:CATEGORY_VIEW": 0, "SETTINGS:CATEGORY_EDIT": 0, "SETTINGS:INTEGRATIONS_VIEW": 0, "SETTINGS:INTEGRATIONS_EDIT": 0, "SETTINGS:ROLES_VIEW": 0, "SETTINGS:REPRESENTATIVES_VIEW": 0, "SETTINGS:REPRESENTATIVES_EDIT": 0, "INVOICE_VIEW": 0, "INVOICE_EDIT": 0, "SUPPLIER_VIEW": 0, "SUPPLIER_EDIT": 0, "SUB:ACCOUNTS_VIEW": 0, "SUB:ACCOUNTS_EDIT": 0, "SUB:ACCOUNTS_ALLOCATE": 0, "BUDGETS_CREATE": 0, "SUBSCRIPTIONS_VIEW": 0, "EXPENSES:RECEIPT_EDIT": 0 }, "last_login_at": "string", "team": { "code": "string", "name": "string", "_id": "string", "status": "string" }, "notification_preferences": [ "string" ], "tags": [ "string" ], "supervisor": "string", "external_id": "string", "id": "string" }