API Integration

Modified on Thu, 19 Nov at 11:25 PM

TABLE OF CONTENTS


Introduction

This article is aimed at developers and technical colleagues who have knowledge of REST APIs and serves as a guide to integrate Ezekia API endpoints into your applications. These are from a collection of questions that are frequently asked to our developers. Whether the application is a WordPress application or an external service, we hope this guide will help.

When developing your application, you may not want to use customers' live data. You can set up your own sandbox by signing up for a separate Ezekia account in the same way a search firm would, then create dummy data there and test your API calls safely. Register here: http://ezekia.com/#/register and once you've done so, let support@ezekia.com know, so this can then be approved.

Examples below are shown in either Postman or PHP cURL. When making calls, you will need a bearer token. Details can be found here:

https://ezekia.freshdesk.com/support/solutions/articles/101000504349-api-user-credentials

A list of these REST API endpoints and their documentation can be found at https://ezekia.com/api/documentation.

Ezekia also supports Webhooks. https://ezekia.freshdesk.com/en/support/solutions/articles/101000503988-api-webhooks

Important: API v1 and v2 are being retired on 1 January 2027

From 1 January 2027, any call to /api/v1/..., /api/v2/... or to an unversioned path such as /api/people will stop working and return a 410 Gone error. Unversioned paths are v1, so they are retired too. All examples in this article use v4, the current recommended version. If your integration uses an older version, update each call to its /api/v4/ equivalent. The API documentation marks each deprecated endpoint and names the endpoint to move to.

Screenshots are illustrative and may show older field names. Use the v4 field names and request examples in this article. Wherever a screenshot shows {{API_URL}}, use https://ezekia.com/api/v4.


Important: API Rate Limit

We have implemented API rate limits to ensure fair usage and system stability.

Limit: 5 requests per second

While you can still make up to 300 requests per minute (previously 150 requests per minute), you must distribute them evenly, so no more than 5 requests within any single second.

Action Required:

Update your code to include rate-limiting mechanisms (e.g., sleep timers) to avoid receiving `429 Too Many Requests` errors.


Probable workflow for a candidate applying for a job role on a WordPress or similar website

1. Check if the person's email already exists in Ezekia

GET /api/v4/people?query={email}&filterOn=email

If the email does not exist, create a new person and add their profile details

POST /api/v4/people

If the email does exist, then retrieve the ID of that person and update their profile details

PUT /api/v4/people/{id}

When updating a person with a JSON body, firstName and lastName are required on every request, even if they are not changing.

However, if there are multiple instances of the same email address, then you will need to determine which of those users are applying.

2. Creating/updating a person and then uploading their CV and/or cover letter

When creating or updating a person, you can send key/values such as first name, last name, emails, etc in an 'application/json' request and then send the CV/cover letter in a different API call. This will allow you to send any type of document such as CV and/or cover letter. The example below shows it being attached to the person section.

POST /api/v4/people (application/json)

or

PUT /api/v4/people/{id} (application/json)

and then 

POST /api/v4/people/{id}/documents (multipart/form-data)

3. Alternatively, parse a CV and extracting the contents to create or update a person

Alternatively you can just set the header to 'multipart/form-data' and upload the CV to the API and the contents of the CV will automatically be parsed and the data extracted will be saved to Ezekia. There is no need for any other data to be sent.

Please note, if you update the person and parse the CV automatically, it will replace existing data with that from the CV.

POST /api/v4/people (multipart/form-data)

or

PUT /api/v4/people/{id} (multipart/form-data)

4. You want to save the person's CV/cover letter to an assignment rather than to a person

After creating/updating a person, you may want to save the CV to the assignment rather than a person by including the assignment or project id.

POST /api/v4/projects/{id}/documents (multipart/form-data)

5. Assign that person to an assignment to make them a candidate

When you create a new person you can add a 'projects' array to the request, for example "projects": [{"projectId": 530, "projectType": "assignment"}]. If you are creating the person by uploading a CV (multipart/form-data), send each project as a 'projects[]' form field containing a JSON string, for example projects[]={"projectId": 530, "projectType": "assignment"}. Separate 'projectId' and 'projectType' form fields are ignored.

POST /api/v4/people

Alternatively, you can use this endpoint. You will need the person id and the project id. This is also the way to link an existing person after updating them with PUT /api/v4/people/{id}, because that endpoint does not link people to projects.

POST /api/v4/projects/candidates

Send the person IDs, the project ID and the project type in the body, for example {"candidates": [15236], "projectId": 530, "label": "assignment"}.

6. Add a status tag to the candidate of an assignment

POST /api/v4/projects/{projectId}/candidates/statuses/{tagId}

Send the candidate IDs in the body, for example {"candidates": [15236]}. The pipeline tag is taken from {tagId} in the URL.

To add several pipeline tags at once, leave {tagId} out of the URL and send the tag IDs in the body instead:

POST /api/v4/projects/{projectId}/candidates/statuses
{"candidates": [15236], "tags": [1234, 5678]}

You can add a custom field to a person and scope it to “Assignment (as candidate)”. Include the field ID, value, scopedModel: "assignment", and the assignment ID as modelId in the customValues array.

PUT /api/v4/people/{id}/additional-info

Custom Fields

How do I return results by type (projects, people or companies) with their custom fields and values?

GET /api/v4/<type>?fields=manager.customValues

For example, to return projects with their custom fields and values:

GET /api/v4/projects?fields=manager.customValues

You can then filter the results on your side by the custom field and value you need.

How do I return results that contain specific custom field values?

If you want to retrieve all records where 'Place of birth' is 'Japan', you will need to do:

GET /api/v4/<type>?fields=manager.customValues&filterOn=customField&query=Japan

This also works for yes/no custom fields, for example to return projects where a custom field is set to true:

GET /api/v4/projects?fields=manager.customValues&filterOn=customField&query=true


NOTE: Currently you cannot search by one specific custom field, only by custom fields as a whole. If more than one custom field could hold the same value, include fields=manager.customValues as above and check the field ID in the results on your side.

How do I return custom fields and their values belonging to a specific type?

Including type details

GET /api/v4/<type>/<id>?fields=manager.customValues

Just custom fields and their values:

GET /api/v4/<type>/<id>/additional-info

How do I set custom values belonging to a specific type?

You will need to retrieve the IDs of the custom fields you want to use. We are using 'people' in this example. You can use 'projects' or 'companies' depending on the custom field type.

GET /api/v4/custom-fields/<type>

Using the custom field IDs, you can now set the custom fields on a specific person.

PUT /api/v4/<type>/<id>/additional-info

The custom fields and their values can now be seen on the platform.

How do I clear a custom field value?

To clear an existing custom value, include its saved custom-value id, its fieldId, and value: null in the request. The saved value ID is different from the custom-field ID. Retrieve the existing values using GET /api/v4/<type>/<id>/additional-info.

Send the following body to PUT /api/v4/<type>/<id>/additional-info, replacing the example IDs with your saved value ID and field ID. Sending only fieldId and a null value does not delete an existing value. Mandatory-field rules may prevent clearing a required field.

{"customValues": [{"id": 456, "fieldId": 123, "value": null}]}

After a successful request, the saved value is removed.



Updating Companies

PUT and PATCH /api/v4/companies/{companyId} use the same validation and update handler. Include _type to choose what to update: info updates company information, addresses updates addresses only, and all updates both. For info and all, you must include name and owner.ownerId on every request. These fields are not required for an address-only update.


Omitted company information fields, including industries and links, are preserved. If you send industries, the supplied IDs replace the existing list, so include any existing industry IDs you want to keep. Addresses are handled separately as described below.


Links: omitted links are kept; if links is sent, it replaces the full list. The top-level website field is not applied on update, so use PUT /api/v4/companies/{companyId}/links/{linkId}.


Addresses: on “addresses” or “all”, omitting addresses deletes all existing addresses. Each address needs label plus building, street, city, state, postcode and country keys (null values are accepted).


Size is free text (max 255 characters) with no fixed list of values.


There is no bulk update endpoint; calls must stay within the rate limit of 5 requests per second.

Pagination

How do I paginate the results returned from the API?

Paginated list endpoints support the count and page parameters. Single-record responses are not paginated.

You can control how many records are returned per page using the count parameter, and specify which page to retrieve using the page parameter.

Example: To retrieve 50 results per page and load page 3 (records 101 to 150):

GET /api/v4/projects?count=50&page=3

count=50 - Return 50 results per page.

page=3 - Return the third page of results.

Why am I getting errors when trying to retrieve more than 10,000 results

Our API currently has a hard limit of 10,000 records when paginating using only page and count. We are working on removing this restriction, but in the meantime you may encounter a 422 error if your pagination goes beyond the 10K threshold.

Why the error happens

If you set count=100 and request page 5, you have viewed 500 records so far.

But if you request page 100 with count=100, you hit 10,000 records (100 × 100).

Requesting page 101 would go beyond this limit, triggering a 422.

How to retrieve more than 10,000 records

To safely retrieve records beyond the 10K limit, use the from parameter along with sorting by id. This allows you to “continue” from the last ID of the previous batch rather than relying on numbered pages alone.

Start by retrieving a page of results sorted by id in ascending order.

Note the last id returned.

Use that id as the from value in your next request, keeping page at 1.

Loop until all records are retrieved.

Example:

GET /api/v4/people?count=100&sortBy=id&sortOrder=asc&from=8853342

sortBy=id - Sort the results by ID.

sortOrder=asc - Sort from lowest to highest ID. This is the default, but setting it explicitly avoids skipped records if a different order is used.

from=8853342 - Return only records with an ID greater than 8853342 (the last ID from your previous batch).

Keep page at 1 (or leave it out) when using from. The page parameter still skips records within the filtered results, so page=100 with count=100 would skip the first 9,900 records after the from ID.

This approach lets you retrieve all available records without hitting the 10K pagination limit.


Uploading CVs/resumes and other documents

How do I upload a CV/resume belonging to a person?

Method 1 - When creating a new person.

Use POST /api/v4/people and then choose multipart/form-data. This method will scan the CV/resume and will identify the person’s details and add them to the platform automatically.

resume - The file attachment (ensure you select 'File').

projects[] - If you want to link the person to a specific assignment, add a JSON string with the project id and type, for example {"projectId": 530, "projectType": "assignment"}. Repeat the field to link more than one project.

owner[ownerId] - Optional. The ID of the user who should own the person. If omitted, the API user is the owner.

The above screenshot is only valid in Postman and Insomnia. To achieve this using cURL, then do:

curl --location 'https://ezekia.com/api/v4/people' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--form 'resume=@"/Users/cvs/Downloads/john-smith.pdf"' \
--form 'projects[]={"projectId": 530, "projectType": "assignment"}' \
--form 'owner[ownerId]=13520'

Method 2 - When updating an existing person.

Use POST /api/v4/people/{id} and again choose multipart/form-data. Don’t forget to use _method=PUT.

Updating a person does not link them to a project. To add them to an assignment, call POST /api/v4/projects/candidates afterwards (see step 5 above).

curl --location 'https://ezekia.com/api/v4/people/15236' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--form '_method="PUT"' \
--form 'resume=@"/Users/cvs/Downloads/john-smith.pdf"'

If you are using WordPress, you may want to use:

<?php
// needless to say, but replace everything wrapped in < > with correct values

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://ezekia.com/api/v4/people/15236',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => array('resume'=> new CURLFILE('<ABSOLUTE FILE PATH>'),'_method' => 'PUT'),
  CURLOPT_HTTPHEADER => array(
    'Accept: application/json',
    'Authorization: Bearer <TOKEN>'
  ),
));

$response = curl_exec($curl);

// Response HTTP code
$responseCode = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);

curl_close($curl);

// ECHO BEING USED FOR TESTING PURPOSES ONLY
// $response will be either a person object, if the request was successful OR
// it will be a message object (see below)
echo $response;

How do I attach other documents such as cover letters to a record?

To attach a document to a person, project or company model, use the documents endpoint as shown below.

POST /api/v4/<model>/<id>/documents

You can add an array of files to the request.

curl --location 'https://ezekia.com/api/v4/people/14736/documents' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--form 'files[]=@"/Users/cvs/Downloads/test.pdf"'

How do I retrieve all uploaded document information for all candidates on a specific project?

Enter the project id in GET /api/v4/projects/<id>/candidates?fields=manager.attachments.

Add fields=manager.attachments parameter to ensure all documents are returned.

Security for uploaded documents

All files uploaded via the API are actively virus-scanned on intake. Uploads go through the same webserver pipeline as the application itself, and every file is passed through our malware-scanning layer. We’ve validated this internally using the EICAR test file, and the scanner correctly blocks it at upload. This applies to all file types supported by the upload endpoint. CV uploads through the person endpoints are also validated for file size and permitted file types. Check the API documentation for the supported file types and upload limits for each endpoint, and handle validation errors in your integration.

For Ezekia's hosting, encryption and other security measures, see Data Retention in Ezekia: Roles, Responsibilities, and GDPR Compliance.


Downloading Documents

How do I download and store documents I have previously uploaded to Ezekia?

The best way is to use cURL in your own application to retrieve the people, company and project documents and download it to your own server.

You need to retrieve the list of documents from an endpoint. In this case, we will retrieve all candidates attachments from a specific project.

You will need to do:

GET /api/v4/projects/<id>/candidates?fields=manager.attachments

This will return an array of attachments in the 'manager' object. You will need to retrieve the attachment id, attachment filename and the person id.

In your own web application, you would retrieve the documents and download it using CURL similar to the example below:

<?php
$fp = fopen ('attachment.pdf', 'w+');
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_FILE => $fp,
  CURLOPT_URL => 'https://ezekia.com/api/v4/people/14269/documents/947',
  CURLOPT_BINARYTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1Ni.....'
  ),
));

$response = curl_exec($curl);
$error = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($error === 404) {
  echo 'not found';
}
curl_close($curl);
fclose($fp);

Pipeline Tags

How do I retrieve pipeline tags for all candidates on a specific project?

Enter the project id in GET /api/v4/projects/<id>/candidates?fields=meta.candidate.

Add fields=meta.candidate parameter to ensure pipeline tags are returned.


Bulk Imports

I want to import many project or person records into the API?

The API does not support bulk uploads but there is a file import feature on the platform.

For more information, see https://ezekia.freshdesk.com/support/solutions/articles/101000415132-what-is-the-basic-spreadsheet-import-process-

Incremental updates

I want to poll new or updated records periodically?

Use webhooks to receive notifications of new or updated records. Alternatively, poll using since. A timestamp by itself filters by creation time; to include updates to existing people, specify updatedAt|<timestamp> and sort by updatedAt ascending. The pipe character is URL-encoded as %7C in the example below. Paginate through all results before advancing your checkpoint. Since the timestamp comparison is exclusive, use a small overlap between polling windows and deduplicate by record ID and update timestamp to avoid missing records with the same timestamp.

GET /api/v4/people?since=updatedAt%7C1620136853&sortBy=updatedAt&sortOrder=asc

Notes

How do I add a note to a candidate on a specific assignment?

To add a note, enter the person id in POST /api/v4/people/<id>/notes. Inside the context array, add the assignment id and enter assignment as type.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article