Mutations

Mutations allow for modifying data within the Worksome API.

createSmsMultiFactor

Type: SmsCreateMultiFactorPayload!

Create a new multi-factor authentication implementation.

Arguments
inputCreateSmsMultiFactorInput!
The details for the new SMS multi-factor authentication implementation.

verifySmsMultiFactor

Type: SmsMultiFactor

Verify a multi-factor authentication implementation.

Arguments
inputVerifySmsMultiFactorInput!
The details for the verification of the SMS multi-factor authentication implementation.

createTotpMultiFactor

Type: TotpCreateMultiFactorPayload!

Create a new multi-factor authentication implementation.

Arguments
inputCreateTotpMultiFactorInput!
The details for the new TOTP multi-factor authentication implementation.

verifyTotpMultiFactor

Type: TotpMultiFactor

Verify a TOTP multi-factor authentication implementation.

Arguments
inputVerifyTotpMultiFactorInput!
The details for the verification of the TOTP multi-factor authentication implementation.

removeMultiFactor

Type: MultiFactor

Remove a multi-factor authentication implementation.

Arguments
inputRemoveMultiFactorInput!
The details for removing the multi-factor authentication implementation instance.

updatePassword

Type: User!

Update a user’s password.

Arguments
inputUpdatePasswordInput!
The input for the user update mutation.

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.

Arguments
inputCreatePasswordInput!
The input for creating a password.

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.

Arguments
inputChangeEmailInput!
The input for changing the email.

forceLogoutUser

Type: ForceLogoutPayload!

Log out of other sessions.

This will invalidate all session tokens.

Arguments
inputForceLogoutInput!
The input for forcing the user to sign out.

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.

Arguments
inputImpersonateInput!
The input for impersonating a user.

createCustomTimesheet

Type: CreateCustomTimeSheetResponse!

Create a custom timesheet.

Use this endpoint to create timesheets in Worksome from a custom data format. The endpoint requires data in a custom format, as defined by the input schema.

Arguments
inputCreateCustomTimesheetInput!
The details for creating a custom timesheet.

createApprovalRule

Type: ApprovalRule!

Create an approval rule for one or more fields.

Arguments
inputCreateApprovalRuleInput!
The input required for creating an approval rule.

createApproval

Type: Approval!

Create an approval.

Only companies can create approvals.

Arguments
inputCreateApprovalInput!
The input required for creating an approval.

updateApproval

Type: Approval!

Update an approval.

Arguments
inputUpdateApprovalInput!
The input required for updating an approval.

createApprover

Type: Approver!

Create an approver for an approver rule.

Arguments
inputCreateApproverInput!
The input required for creating an approver.

updateApprover

Type: Approver!

Update an approver.

Arguments
inputUpdateApproverInput!
The input required for updating an approver.

actionApprovalApprovable

Type: ApprovalApprovable

Create action for an approval approvable.

Arguments
inputActionApprovalApprovableInput!
The ID of the approval approvable to action.

storeBankDetails

Type: BankDetail!

Update the bank account details.

Arguments
inputStoreBankDetailsInput!
The details for updating the bank account record.

generateInviteLink

Type: Company!

Generate the company invite link token.

Arguments
inputGenerateInviteLinkInput!
The input required to generate the company invite link token.

createCompanyRecruiter

Type: CompanyRecruiter

Add and invite a new recruiter.

Only companies can add and invite recruiters.

Arguments
inputCreateCompanyRecruiterInput!
The details for adding & inviting the recruiter.

updateCompanyRecruiter

Type: CompanyRecruiter

Update a recruiter relationship.

Only companies can edit recruiter relationships.

Arguments
inputUpdateCompanyRecruiterInput!
The details of the recruiter relationship to be updated.

deleteCompanyRecruiter

Type: CompanyRecruiter

Delete a recruiter relationship.

Both the company and the recruiter can delete the relationship.

Arguments
inputDeleteCompanyRecruiterInput!
The details of the recruiter relationship to be deleted.

inviteCompanyRecruiter

Type: CompanyRecruiter!

Invite an existing recruiter.

Only companies can invite the recruiter.

Arguments
inputInviteCompanyRecruiterInput!
The details of the recruiter to be invited.

createCustomField

Type: CustomField!

Create a custom field.

Arguments
inputCreateCustomFieldInput!
The input for creating a custom field.

updateCustomField

Type: CustomField!

Update a custom field.

All fields must be provided.

Arguments
inputUpdateCustomFieldInput!
The input for updating a custom field.

deleteCustomField

Type: CustomField!

Delete a custom field.

All fields details must be provided.

Arguments
inputDeleteCustomFieldInput!
“ The input for deleting a custom field.

uploadFiles

Type: [TemporaryFileUploadResponse!]!

Generate temporary upload URLs for files for the given account.

The temporary URL will expire after 1 week.

Arguments
input[UploadFileInput!]!
The input required for upload a file.

markFilesAsUploaded

Type: [File!]!

Mark one or more files as uploaded to the temporary URL.

Arguments
inputMarkFilesAsUploadedInput!
The input required for marking files as uploaded.

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).

Arguments
inputAcceptBidInput!
The input required for hiring a worker for a job.

rejectHire

Type: Hire!

Reject a hire.

Arguments
inputRejectHireInput!
The input required to reject a hire.

hire

Type: Hire!

Hire a trusted contact.

Only companies can make hires.

Arguments
inputHireInput!
The input required for hiring a trusted contact.

createJob

Type: Job!

Create a job.

Only companies can create jobs.

Arguments
inputCreateJobInput!
The details for the new job.

updateJob

Type: Job!

Update a job.

Only companies can update jobs.

Arguments
inputUpdateJobInput!
The details to update for the job.

endJob

Type: Job!

End a job.

Only companies can end jobs.

Arguments
inputEndJobInput!
The details to end the job.

setInternalBudgetOnJob

Type: Job!

Set the internal budget of a job.

Only companies can set the internal budget on the job.

Arguments
inputSetInternalBudgetOnJobInput!
The details of internal budget for the job.

createJobCandidate

Type: [JobCandidate!]!

Create a job candidate.

This will make the workers eligible and proposed for a job.

Arguments
inputCreateJobCandidateInput!
Input data to create the job candidate.

updateJobCandidateStatus

Type: JobCandidate!

Update a job candidate status.

A reason and comment can be provided.

Arguments
inputUpdateJobCandidateStatusInput!
Input data to update a job candidates status.

updateJobCandidatePreferred

Type: JobCandidate!

Update job candidates “preferred” status.

Arguments
inputUpdateJobCandidatePreferredInput!
Input data to update a job candidate preferred status.

createJobShare

Type: [JobShare!]!

Create a job share.

Arguments
inputCreateJobShareInput!
The details for the job share.

removeJobShare

Type: [JobShare!]!

Remove a job share.

Arguments
inputRemoveJobShareInput!
The details for removing the job share.

createNote

Type: Note!

Create a note.

Arguments
inputCreateNoteInput!
The details for creating a note.

updateNote

Type: Note!

Update a note.

Arguments
inputUpdateNoteInput!
The details for updating a note.

deleteNote

Type: Note!

Delete a note.

Arguments
inputDeleteNoteInput!
The details for deleting a note.

createPaymentRequest

Type: PaymentRequest!

Create a payment request.

Arguments
inputCreatePaymentRequestInput!
The details for creating a payment request.

updatePaymentRequest

Type: PaymentRequest!

Update a payment request.

Arguments
inputUpdatePaymentRequestInput!
The details for updating a payment request.

deletePaymentRequest

Type: PaymentRequest!

Delete a payment request.

Arguments
inputDeletePaymentRequestInput!
The details for deleting a payment request.

createProject

Type: Project!

Create a project.

Only companies can create projects.

Arguments
inputCreateProjectInput!
The details for creating a project.

updateProject

Type: Project!

Update a project.

Only companies can update projects.

Arguments
inputUpdateProjectInput!
The details for updating a project.

deleteProject

Type: Project!

Soft delete a project.

Only companies can delete projects.

Arguments
inputDeleteProjectInput!
The details for deleting a project.

attachJobsToProject

Type: Project!

Attach one or more jobs to a project.

Only companies can attach jobs to projects.

Arguments
inputAttachJobsToProjectInput!
The details for attaching a job to a project.

detachJobFromProject

Type: Project!

Detach a job from a project

Only companies can detach a job from a project.

Arguments
inputDetachJobFromProjectInput!
The details for attaching a job to 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.

Arguments
inputEndProjectInput!
The details for ending a project.

openProject

Type: Project!

Open a project.

This is used to set the end date on the project to null to make it open again.

Arguments
inputOpenProjectInput!
The details for opening a project.

createRecruiterCandidate

Type: RecruiterCandidate

Add and invite a new candidate.

Only recruiters can add and invite candidates.

Arguments
inputCreateRecruiterCandidateInput!
The details for adding & inviting the candidate.

updateRecruiterCandidate

Type: RecruiterCandidate

Update a recruiter candidate information.

Only recruiters can edit the relationship.

Arguments
inputUpdateRecruiterCandidateInput!
The details of the recruiter candidate relationship to be updated.

deleteRecruiterCandidate

Type: RecruiterCandidate

Delete a recruiter candidate relationship.

Both the recruiter and the candidate can delete the relationship.

Arguments
inputDeleteRecruiterCandidateInput!
The details of the recruiter candidate relationship to be deleted.

createTimesheet

Type: Timesheet

Create a timesheet.

Only workers can create timesheets.

Arguments
inputCreateTimesheetInput!
The details for the new timesheet.

updateTimesheet

Type: Timesheet!

Update a timesheet.

Only workers can update timesheets.

Arguments
inputUpdateTimesheetInput!
The details for the timesheet.

deleteTimesheet

Type: Timesheet!

Delete a timesheet.

Only workers can delete timesheets.

Arguments
inputDeleteTimesheetInput!
The details for the timesheet.

updateTimesheetRegistration

Type: TimesheetRegistration!

Update a timesheet registration.

Only workers can update timesheet registrations.

Arguments
inputUpdateTimesheetRegistrationInput!
The details for the timesheet registration.

deleteTimesheetRegistration

Type: TimesheetRegistration!

Delete a timesheet registration.

Only workers can delete timesheet registrations.

Arguments
inputDeleteTimesheetRegistrationInput!
The details for the timesheet registration.

createTrustedContact

Type: TrustedContact!

Add and invite a new trusted contact.

Only companies can add & invite trusted contacts.

Arguments
inputCreateTrustedContactInput!
The details for adding & inviting the trusted contact.

updateTrustedContact

Type: TrustedContact!

Update a trusted contact.

Only companies can edit trusted contacts.

Arguments
inputUpdateTrustedContactInput!
The details of the trusted contact to be edited.

deleteTrustedContact

Type: TrustedContact

Delete a trusted contact.

Only companies can delete trusted contacts.

Arguments
inputDeleteTrustedContactInput!
The details of the trusted contact to be soft deleted.

approveTrustedContact

Type: TrustedContact!

Approve a trusted contact.

Only companies can approve trusted contacts.

Arguments
inputApproveTrustedContactInput!
The details of the trusted contact to be approved.

blockTrustedContact

Type: TrustedContact!

Block an applied trusted contact.

Only companies can block trusted contacts.

Arguments
inputBlockTrustedContactInput!
The details of the trusted contact to be blocked.

createUserGroup

Type: UserGroup!

Create a user group.

Only companies can create user groups.

Arguments
inputCreateUserGroupInput!
The details for creating a group.

updateUserGroup

Type: UserGroup!

Update a user group.

Only companies can update user groups.

Arguments
inputUpdateUserGroupInput!
The details for updating a group.

deleteUserGroup

Type: UserGroup!

Soft delete a user group.

Only companies can delete user groups.

Arguments
inputDeleteUserGroupInput!
The details for deleting a user group.

attachUsersToUserGroup

Type: UserGroup!

Attach one or more users to a group.

Only companies can attach users to groups.

Arguments
inputAttachUsersToUserGroupInput!
The details for attaching users to a group.

detachUsersFromUserGroup

Type: UserGroup!

Detach one or more user from a group.

Only companies can detach users from a group.

Arguments
inputDetachUsersFromUserGroupInput!
The details for detaching users from a group.

createWebhook

Type: Webhook!

Create a webhook.

Only companies can create webhooks.

Arguments
inputCreateWebhookInput!
The input required for creating a webhook.

updateWebhook

Type: Webhook!

Update a webhook.

Arguments
inputUpdateWebhookInput!
The input required for updating a webhook.

deleteWebhook

Type: Webhook!

Delete a webhook.

Arguments
inputDeleteWebhookInput!
The input required for deleting a webhook.

updateWorker

Type: Worker!

Update a worker.

Arguments
inputUpdateWorkerInput!
The details for updating a worker.

createWorkflow

Type: Workflow!

Create a workflow.

Only companies can create workflows.

Arguments
inputCreateWorkflowInput!
The input required for creating an workflow.

updateWorkflow

Type: Workflow!

Update a workflow.

Only companies can create workflows.

Arguments
inputUpdateWorkflowInput!
The input required for updating an workflow.

deleteWorkflow

Type: Workflow!

Delete a workflow.

Only companies can delete workflows.

Arguments
inputDeleteWorkflowInput!
The ID of the workflow to delete.

createExport

Type: CreateExportResponse

Create an export.

The export URL and the number of rows will be returned (excluding headings).

Arguments
inputCreateExportInput!
The input for creating an export.