Staffing Agency Integration
What this integration is for
This integration is for staffing agencies that receive vacancies from a Worksome client. It covers reading the vacancies that clients share with your account, so you can load them into your own ATS or recruitment system instead of copying them by hand.
If you are a Worksome client publishing vacancies rather than receiving them, this page is not for you: see the GraphQL API introduction instead.
Read the API, do not read the portal
Some staffing agencies retrieve vacancies by driving the Worksome web portal with automated software. Do not do this. Our protection against automated traffic blocks or challenges such requests without warning, and the portal pages change without notice. The API on this page is the supported and stable route.
Authentication and API access
Staffing agency accounts authenticate exactly like any other account. See Authentication for OAuth 2.0 and personal access tokens.
To create a personal access token or an OAuth client, you need the Owner or Admin role on your agency’s account, and your agency must have an active relationship with at least one verified client. An invited or pending relationship does not count. Without both, the API Tokens and API Clients buttons do not appear on the Integrations page. Those pages also require multi-factor authentication, so enable it on your user before you open them.
Use an OAuth client for a product that serves multiple staffing agencies. A personal access token belongs to one person and expires six months after you create it. Use it to explore the API, not for a production integration.
All requests go to:
POST https://api.worksome.com/graphql Authorization: Bearer <your token>
Listing the vacancies shared with you
A vacancy reaches a staffing agency as a job share: a link between a job and your account. Query jobShares to list them.
query SharedVacancies($first: Int!, $page: Int) { jobShares(isActive: true, first: $first, page: $page) { paginatorInfo { currentPage hasMorePages total } data { id createdAt job { id name status updatedAt startDate endDate currency rateType minimumRate maximumRate requiredWorkers location { city country { isoCode } } skills { name } company { id name } } } } }
jobShares returns only the shares that belong to your own account, so you do not need a filter to scope the result to your agency. Pass isActive: true to leave out the vacancies that a client withdrew from you.
Keep this query lean. It runs on every poll, so read large fields such as description from job(id:) for the vacancies you actually take, rather than on every page of every poll.
The API returns the results in pages. Request one page at a time and follow paginatorInfo.hasMorePages until it returns false.
Working with more than one client
An agency can supply to more than one client at the same time, and jobShares returns the vacancies from each of them in one feed. Read job.company to see which client a vacancy came from, or narrow the query with the companies argument:
query VacanciesForOneClient($companyId: ID!, $first: Int!) { jobShares(isActive: true, companies: [$companyId], first: $first) { data { id job { id name } } } }
Pass the client’s global ID — the same value job.company.id returns, not the numeric database id. Sending a numeric id produces an internal error rather than a validation message, so read the IDs from a first unfiltered call and store those.
Two things follow from this, and both matter when you build:
Your credential covers every client, not one of them. A token grants what its owner can see, so it reads the vacancies of every client your agency works with — including clients you take on after you created the token. The companies argument narrows what a given query returns; it does not limit what the credential can reach. If you have committed to one client that you will only process their vacancies, apply that filter on every request and keep the client IDs in your configuration rather than deriving them from whatever the feed happens to return.
job.company is the client you contract with, not always the hiring organisation. Where a managed service provider (MSP) runs the programme, the vacancies you receive belong to the MSP. Read job.endClient to get the organisation that will hire the worker: it returns that company on a vacancy the MSP copied from its client, and null when you supply the client directly. Do not build client-level reporting on job.company alone.
Fetching a single vacancy
Once you hold a job’s ID you can read it directly:
query Vacancy($id: ID!) { job(id: $id) { id name description contactName contactEmail } }
This works for any vacancy actively shared with your account. If the client deletes a vacancy, job(id:) returns null for it, although its share can still appear in jobShares. Treat that vacancy as withdrawn.
Queries that will not work for a staffing agency
Two queries in the reference look correct for this purpose, but they serve client accounts only. They return nothing useful to a staffing agency:
incomingJobsreturns the error “Incoming jobs are only available for company accounts.”jobsreturns an empty page rather than an error, which reads as “no vacancies available” instead of signalling a scoping problem.
Use jobShares, as in Listing the vacancies shared with you.
Keeping your system up to date
Receive webhooks
Create a webhook with the createWebhook mutation, and pass your agency’s account ID in account. Subscribe to these events:
JOB_SHARED: a client shared a vacancy with you.JOB_SHARE_REMOVED: a client withdrew a vacancy from you.JOB_UPDATEDandJOB_CLOSED: a shared vacancy changed or closed.
See Webhooks for the payload format and how to verify the signature.
Poll as a fallback
A webhook can fail to arrive, so poll jobShares on a schedule as well. A few minutes between polls is enough for most recruitment workflows.
Store the job share id, the job id and the job updatedAt on your side. On each poll, treat IDs you have not seen before as new vacancies, and shares that isActive: true no longer returns as withdrawn. For a vacancy you already have, compare updatedAt with the stored value, and read the vacancy again when it changed.
Working with Worksome
Worksome sets up API access for each staffing agency account. If you cannot create a token, or the queries on this page return nothing when you expect vacancies, contact your Worksome customer success manager. They can check the API access of your account, and give you sandbox credentials so that you can build against test data first.