Mutations
Mutations allow for modifying data within the Worksome API.
createApprovalRule
Type: ApprovalRule!
Create an approval rule for one or more fields.
createApproval
Type: Approval!
Create an approval.
Only companies can create approvals.
updateApproval
Type: Approval!
Update an approval.
createApprover
Type: Approver!
Create an approver for an approver rule.
updateApprover
Type: Approver!
Update an approver.
actionApprovalApprovable
Type: ApprovalApprovable
Create action for an approval approvable.
storeBankDetails
Type: BankDetail!
Update the bank account details.
generateInviteLink
Type: Company!
Generate the company invite link token.
createCompanyRecruiter
Type: CompanyRecruiter
Add & invite a new recruiter.
Only companies can add & invite recruiters.
updateCompanyRecruiter
Type: CompanyRecruiter
Update a recruiter relationship.
Only companies can edit recruiter relationships.
deleteCompanyRecruiter
Type: CompanyRecruiter
Delete a recruiter relationship.
Both the company and the recruiter can delete the relationship.
inviteCompanyRecruiter
Type: CompanyRecruiter!
Invite an existing recruiter.
Only companies can invite the recruiter.
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.
createCustomField
Type: CustomField!
Create a new CustomField
updateCustomField
Type: CustomField!
Updates an existing CustomField All fields details must be provided
deleteCustomField
Type: CustomField!
Deletes an existing CustomField All fields details must be provided
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.
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.
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.
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.
updateWorker
Type: Worker!
Update the worker.
createWorkflow
Type: Workflow!
Create a workflow.
Only companies can create workflows.
updateWorkflow
Type: Workflow!
Update a workflow.
Only companies can create workflows.
deleteWorkflow
Type: Workflow!
Delete a workflow.
Only companies can delete workflows.
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.