Add Staff
Adds a new staff member to your company. Shared rules: see Writing Data.
- Only
nameandphone_numberare required. - If
branch_namesis left out, the staff member joins the company’s main branch (its oldest branch, the one created at signup). If the company has no branch at all,branch_namesreturns400. department_namesis optional; empty or left out means no department.- If Auto employee ID is on, leave
employee_idout (sending it returns400). Otherwise it must be unique in the company, ignoring upper/lower case. - A phone number already used in the company is rejected. Non-Indian numbers are not allowed on an Indian (INR) plan.
notify_staff: truesends the WhatsApp app invite (live environment only; defaultfalse).bank_details_confirmed: trueneeds the account number and IFSC code.- When the plan’s staff limit is reached the request fails with
400. - The old
usage,branch_nameanddepartment_namekeys are rejected.
Custom role needs: staff_details:edit, plus bank_account:edit if any bank field or bank_details_confirmed is sent. It can only add staff to its own branches and departments.
Authentication
Format: “Api-Key {api-key}”
Request
2–150 characters: letters, spaces or dots; must start with a letter. Extra spaces around it are trimmed.
Digits only, up to 15; must not already be used in the company. With dial_code 91: 10 digits starting with 6, 7, 8 or 9. Other codes: 4-15 digits valid for that country (not allowed on an Indian (INR) plan).
Country dial code without +, for example 91 (the default). Must be a known country code.
Exact branch names from List Branches (not empty, no repeats). If left out, the staff member joins the main branch.
Exact department names from List Departments (no repeats). Leave out or send [] for none.
Unique in the company, ignoring upper/lower case. Leave out if Auto employee ID is on.
YYYY-MM-DD, between 1950-01-01 and one year from today.
YYYY-MM-DD; the staff member must be 16 to 100 years old.
Format ABCDE1234F (upper-cased for you).
12 digits, starting with 2-9.
12 digits, starting with 1-9.
Standard PF number, for example MHBAN00000640000000125 (upper-cased for you).
2 letters then 13 digits, for example MH1420110012345 (upper-cased for you).
3 letters then 7 digits, for example ABC1234567 (upper-cased for you).
Custom-role keys need bank_account:edit to send any bank field.
Format HDFC0001234 (upper-cased for you).
true confirms the bank details as the API key’s user; needs the account number and IFSC code.
Custom field name (exact, from List Custom Fields) mapped to a text value of 1-200 characters, for example {"Blood Donor": "Yes"}. Must not be empty.
true sends the WhatsApp app invite (live environment only). Default false.
