Aller au contenu principal

StaffCreate

anyOf
external_idstringnullable

Possible values: <= 40 characters

name objectrequired
first_namestringrequired

Possible values: <= 100 characters

last_namestringrequired

Possible values: <= 100 characters

emailstring<email>required
phonestringnullable
birth_datestring<date>nullable
work_eligibility_period objectnullable
startstring<date-time>nullable

UTC timestamp with exactly three fractional-second digits, for example 2026-01-01T00:00:00.000Z.

endstring<date-time>nullable

UTC timestamp with exactly three fractional-second digits, for example 2026-04-01T00:00:00.000Z.

departments object

Departments to assign when creating a new staff profile. If omitted, the company's default department is assigned. Provide lookup_type 'code' with an empty codes array to create a profile without departments. All supplied codes must identify departments in the authenticated company.

lookup_typeDepartmentLookupLookupTypeEnumrequired
  • code - code

Possible values: [code]

codesstring[]required

Possible values: <= 100 characters

languageLanguageEnum
  • en - English
  • fr - French
  • es - Spanish

Possible values: [en, fr, es]

is_activeboolean
Default value: true
send_invitationboolean

Request an email invitation with instructions to install the Workstaff mobile app. An invitation is sent only if the profile has an email address and the worker has not activated their account. Replies go to the company's default contact.

Default value: false
home_location object

The staff member's home location. If omitted, the company's default location is used.

lookup_type ZipcodeLookupLookupTypeEnumrequired

The staff member's home location. If omitted, the company's default location is used.

Possible values: [zipcode, city, address]

zipcodestringrequired

Possible values: <= 15 characters

StaffCreate
{
"external_id": "string",
"name": {
"first_name": "string",
"last_name": "string"
},
"email": "user@example.com",
"phone": "string",
"birth_date": "2024-07-29",
"work_eligibility_period": {
"start": "2024-07-29T15:51:28.071Z",
"end": "2024-07-29T15:51:28.071Z"
},
"departments": {
"lookup_type": "code",
"codes": [
"string"
]
},
"language": "en",
"is_active": true,
"send_invitation": false,
"home_location": {
"lookup_type": "zipcode",
"zipcode": "string"
}
}