Mutations
Mutations allow for modifying data within the Worksome API.
storeBankDetails
Type: BankDetail!
Update the bank account details.
generateInviteLink
Type: Company!
Generate the company invite link token.
uploadFiles
Type: [File!]!
Upload and store a file for the given account.
acceptBid
Type: Hire!
Hire a worker for a job.
Only companies can make hires. Once a hire is created a draft contract will automatically be created also, hire.latestContract
, which will be pending acceptance from the other party (usually a worker).
hire
Type: Hire!
Hire a trusted contact.
Only companies can make hires.
createJob
Type: Job
Create new job.
Only companies can create jobs.
updateJob
Type: Job
Update an existing job.
Only companies can update jobs.
endJob
Type: Job
End an existing job.
Only companies can end jobs.
setInternalBudgetOnJob
Type: Job!
Set internal budget of the job
Only companies can set the internal budget on the job.
createNote
Type: Note!
Create new note.
updateNote
Type: Note!
Update an existing note.
deleteNote
Type: Note!
Delete a note.
createTrustedContact
Type: TrustedContact!
Add & invite a new trusted contact.
Only companies can add & invite trusted contacts.
updateTrustedContact
Type: TrustedContact!
Update a trusted contact.
Only companies can edit trusted contacts.
deleteTrustedContact
Type: TrustedContact
Delete a trusted contact.
Only companies can delete trusted contacts.
approveTrustedContact
Type: TrustedContact!
Approve a trusted contact.
Only companies can approve trusted contacts.
updateWorker
Type: Worker!
Update the worker.
createProject
Type: Project
Create a new project.
Only companies can create projects.
updateProject
Type: Project
Update an existing project.
Only companies can update projects.
deleteProject
Type: Project
Soft delete a project.
Only companies can delete projects.
attachJobsToProject
Type: Project!
Attach one or more jobs to a project.
Only companies can attach jobs to projects.
detachJobFromProject
Type: Project!
Detach a job from a project
Only companies can detach a job from a project.
endProject
Type: Project
End a project.
This is used to set an end date on the project to consider it no longer active.
openProject
Type: Project
Open a project.
This is used to set the end date on the project to null to make it open again.
createUserGroup
Type: UserGroup
Create a new user group.
Only companies can create user groups.
updateUserGroup
Type: UserGroup
Update an existing user group.
Only companies can update user groups.
deleteUserGroup
Type: UserGroup
Soft delete a user group.
Only companies can delete user groups.
attachUsersToUserGroup
Type: UserGroup!
Attach one or more users to a group.
Only companies can attach users to groups.
detachUsersFromUserGroup
Type: UserGroup!
Detach one or more user from a group
Only companies can detach users from a group.
createExport
Type: CreateExportResponse
Create export for given input The export url and count of rows will be returned (minus headings)
createSmsMultiFactor
Type: SmsCreateMultiFactorPayload!
Create a new multi-factor authentication implementation.
verifySmsMultiFactor
Type: SmsMultiFactor
Verify a multi-factor authentication implementation.
createTotpMultiFactor
Type: TotpCreateMultiFactorPayload!
Create a new multi-factor authentication implementation.
verifyTotpMultiFactor
Type: TotpMultiFactor
Verify a TOTP multi-factor authentication implementation.
removeMultiFactor
Type: MultiFactor
Remove a multi-factor authentication implementation.
updatePassword
Type: User!
Update a user’s password.
createPassword
Type: User!
Create a password for the authenticated user.
This operation is only allowed if the user currently does not have a password for changing the password see updatePassword
operation instead.
sendVerificationEmail
Type: User!
Sends a new verification email.
This operation is only allowed if the user has not verified their email.
changeEmail
Type: User!
Change the email of the currently authenticated user.
forceLogoutUser
Type: ForceLogoutPayload!
Log out of other sessions.
This will invalidate all session tokens.
impersonateUser
Type: AuthenticationToken!
Creates a token which can be used for authenticating as the selected user.
To stop the impersonation, simply use the old token again.