Skip to main content
POST
/
companies
/
{company_id}
/
employees
curl -X POST https://api.companyflow.com/companies/123e4567-e89b-12d3-a456-426614174000/employees \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "password": "SecurePass123",
    "phone": "+1234567890",
    "first_name": "John",
    "last_name": "Doe",
    "date_of_birth": "1990-01-15",
    "employee_code": "EMP001",
    "department_id": "dept-uuid-here",
    "designation_id": "desig-uuid-here",
    "level_id": "level-uuid-here",
    "role_id": "role-uuid-here",
    "manager_id": "manager-uuid-here",
    "status": "active",
    "employment_type": "full_time",
    "hire_date": "2024-01-01",
    "gender": "Male",
    "address": "123 Main St, City, State",
    "emergency_contact_name": "Jane Doe",
    "emergency_contact_phone": "+1987654321"
  }'
{
  "success": true,
  "data": {
    "id": "emp-uuid-here",
    "company_id": "123e4567-e89b-12d3-a456-426614174000",
    "email": "[email protected]",
    "phone": "+1234567890",
    "first_name": "John",
    "last_name": "Doe",
    "employee_code": "EMP001",
    "department_id": "dept-uuid-here",
    "designation_id": "desig-uuid-here",
    "level_id": "level-uuid-here",
    "role_id": "role-uuid-here",
    "manager_id": "manager-uuid-here",
    "status": "active",
    "employment_type": "full_time",
    "date_of_birth": "1990-01-15T00:00:00Z",
    "hire_date": "2024-01-01T00:00:00Z",
    "termination_date": null,
    "gender": "Male",
    "address": "123 Main St, City, State",
    "emergency_contact_name": "Jane Doe",
    "emergency_contact_phone": "+1987654321",
    "profile_image_url": "",
    "last_login_at": null,
    "created_at": "2024-03-03T10:00:00Z",
    "updated_at": "2024-03-03T10:00:00Z"
  }
}

Authentication

This endpoint requires Bearer token authentication with one of the following roles:
  • super_admin
  • hr_manager

Path Parameters

company_id
string
required
The unique identifier of the company (UUID format)

Request Body

email
string
required
Employee email address (must be valid email format)
password
string
required
Employee password (minimum 8 characters)
phone
string
required
Employee phone number
first_name
string
required
Employee first name
last_name
string
required
Employee last name
date_of_birth
string
required
Employee date of birth (format: YYYY-MM-DD)
employee_code
string
required
Internal employee code/ID (e.g., EMP001)
department_id
string
required
Department UUID
designation_id
string
required
Designation UUID
level_id
string
required
Level UUID
role_id
string
required
Role UUID
manager_id
string
Manager UUID (optional)
status
string
required
Employee status. Must be one of:
  • active
  • inactive
  • on_leave
  • terminated
  • probation
employment_type
string
required
Employment type. Must be one of:
  • full_time
  • part_time
  • contract
  • intern
hire_date
string
required
Employee hire date (format: YYYY-MM-DD)
gender
string
Employee gender (optional)
address
string
Employee address (optional)
emergency_contact_name
string
Emergency contact name (optional)
emergency_contact_phone
string
Emergency contact phone number (optional)
profile_image_url
string
Profile image URL (optional)

Response

success
boolean
Indicates if the request was successful
data
object
id
string
Employee UUID
company_id
string
Company UUID
email
string
Employee email address
phone
string
Employee phone number
first_name
string
Employee first name
last_name
string
Employee last name
employee_code
string
Internal employee code
department_id
string
Department UUID
designation_id
string
Designation UUID
level_id
string
Level UUID
role_id
string
Role UUID
manager_id
string
Manager UUID
status
string
Employee status
employment_type
string
Employment type
date_of_birth
string
Date of birth (ISO 8601 format)
hire_date
string
Hire date (ISO 8601 format)
termination_date
string
Termination date (ISO 8601 format)
gender
string
Employee gender
address
string
Employee address
emergency_contact_name
string
Emergency contact name
emergency_contact_phone
string
Emergency contact phone
profile_image_url
string
Profile image URL
last_login_at
string
Last login timestamp (ISO 8601 format)
created_at
string
Creation timestamp (ISO 8601 format)
updated_at
string
Last update timestamp (ISO 8601 format)
curl -X POST https://api.companyflow.com/companies/123e4567-e89b-12d3-a456-426614174000/employees \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "password": "SecurePass123",
    "phone": "+1234567890",
    "first_name": "John",
    "last_name": "Doe",
    "date_of_birth": "1990-01-15",
    "employee_code": "EMP001",
    "department_id": "dept-uuid-here",
    "designation_id": "desig-uuid-here",
    "level_id": "level-uuid-here",
    "role_id": "role-uuid-here",
    "manager_id": "manager-uuid-here",
    "status": "active",
    "employment_type": "full_time",
    "hire_date": "2024-01-01",
    "gender": "Male",
    "address": "123 Main St, City, State",
    "emergency_contact_name": "Jane Doe",
    "emergency_contact_phone": "+1987654321"
  }'
{
  "success": true,
  "data": {
    "id": "emp-uuid-here",
    "company_id": "123e4567-e89b-12d3-a456-426614174000",
    "email": "[email protected]",
    "phone": "+1234567890",
    "first_name": "John",
    "last_name": "Doe",
    "employee_code": "EMP001",
    "department_id": "dept-uuid-here",
    "designation_id": "desig-uuid-here",
    "level_id": "level-uuid-here",
    "role_id": "role-uuid-here",
    "manager_id": "manager-uuid-here",
    "status": "active",
    "employment_type": "full_time",
    "date_of_birth": "1990-01-15T00:00:00Z",
    "hire_date": "2024-01-01T00:00:00Z",
    "termination_date": null,
    "gender": "Male",
    "address": "123 Main St, City, State",
    "emergency_contact_name": "Jane Doe",
    "emergency_contact_phone": "+1987654321",
    "profile_image_url": "",
    "last_login_at": null,
    "created_at": "2024-03-03T10:00:00Z",
    "updated_at": "2024-03-03T10:00:00Z"
  }
}

Build docs developers (and LLMs) love