SuprSync
Developer Portal
Sign In

Bulk Create Staff

POST /external/v1/staff/bulk

Creates multiple staff members in a single request. Each member is created with a user account and assigned to a company, branch, and job role.

Request Body

Send a JSON array of staff objects:

[
  {
    "firstName": "John",
    "lastName": "Doe",
    "userName": "johndoe",
    "email": "john.doe@example.com",
    "phone": "+2341234567890",
    "gender": "male",
    "countryId": "country-uuid",
    "assignedBranchId": "branch-uuid-1",
    "jobRoleId": "role-uuid-1",
    "privilege": 3
  },
  {
    "firstName": "Jane",
    "lastName": "Smith",
    "userName": "janesmith",
    "email": "jane.smith@example.com",
    "phone": "+2349876543210",
    "gender": "female",
    "countryId": "country-uuid",
    "assignedBranchId": "branch-uuid-1",
    "jobRoleId": "role-uuid-2",
    "privilege": 3,
    "skillSetIds": ["skill-uuid-1", "skill-uuid-2"]
  }
]

Request Fields

FieldTypeRequiredDescription
firstNamestringYesFirst name
lastNamestringYesLast name
userNamestringYesUnique username
emailstringYesEmail address
phonestringYesPhone number (with country code)
genderstringYes"male" or "female"
countryIdstringYesCountry ID
assignedBranchIdstringYesBranch/location to assign the member to
jobRoleIdstringYesJob role ID (UUID or symbol)
privilegenumberYesPermission level: 1 = Super Admin, 2 = Admin, 3 = Member
skillSetIdsstring[]NoArray of skill set IDs to assign

Response

{
  "message": "Task completed",
  "success": 2,
  "failed": 0,
  "total": 2,
  "err": []
}

Response Fields

FieldTypeDescription
messagestringStatus message
successnumberCount of successfully created members
failednumberCount of failed creations
totalnumberTotal items processed
errarrayDetails for each failure (see below)

Error Entry Format

When a member fails to be created, the err array contains:

{
  "firstName": "John",
  "lastName": "Doe",
  "email": "john.doe@example.com",
  "status": "failed",
  "reason": "User with this email already exists"
}

Example

curl -X POST "https://api.suprsync.com/external/v1/staff/bulk" \
  -H "x-api-key: api_your_client_id" \
  -H "x-api-secret: sec_your_client_secret" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "firstName": "John",
      "lastName": "Doe",
      "userName": "johndoe",
      "email": "john.doe@example.com",
      "phone": "+2341234567890",
      "gender": "male",
      "countryId": "country-uuid",
      "assignedBranchId": "branch-uuid",
      "jobRoleId": "role-uuid",
      "privilege": 3
    }
  ]'

Notes

  • Members are processed in batches of 3. Large payloads are handled sequentially.
  • Each successfully created member receives a welcome email.
  • If a user with the same email already exists, that entry will appear in the err array.
  • Use the Locations endpoint to get valid assignedBranchId values.
  • Use the Job Roles endpoint to get valid jobRoleId values.