Pdf migration guidance

Action required by 1 December 2026.

Testlify is moving PDF report generation in the API to an asynchronous flow. The new endpoints are available now. On 1 December 2026 we will stop generating PDF reports through the current endpoint. Please move your integration to the new flow before that date.

This guide explains what is changing, how the API worked before, how the new flow works, and how to update your integration.


Summary

Current endpoint (retiring 1 December 2026):

GET /v1/assessment/{assessmentId}/candidate/{candidateId}?fileType=pdf

New endpoints (available now):

GET /v1/assessment/{assessmentId}/candidate/{candidateId}/report/async?fileType=pdf
GET /v1/workspace/job/{jobId}/status
Current flow New flow
What the request does Generates the PDF while you wait Starts generating the PDF in the background
Response time Up to several minutes for large assessments Under a second
What you receive The PDF URLs in the same response A jobId
How you get the PDF Directly from the response Check the job status endpoint until the job is completed, then read the URLs

Why we are making this change

Generating a PDF report can take more than a minute for assessments with many tests, AI insights or psychometric sections. In the current flow your request stays open the whole time. Long requests can hit network or client timeouts, so some integrations received an error even though the report would have been ready shortly afterwards.

In the new flow the report is generated by a background service. Your request returns immediately, and you collect the finished report when it is ready. This makes report downloads faster to start, more reliable for large assessments, and safe to retry.


How it worked before

You requested the candidate's report with fileType=pdf :

GET https://api.testlify.com/v1/assessment/{assessmentId}/candidate/{candidateId}?fileType=pdf
Authorization: Bearer <your-access-token>

The API generated the PDF during the request and returned the candidate details with the report URLs, for example pdfUrl , in the same response. For large assessments, this single request could take several minutes.


How it works now

The new flow has two steps: start the report, then collect it.

Step 1: Start the report

Call the new endpoint. It takes the same path parameters and the same query parameters as the current endpoint.

GET https://api.testlify.com/v1/assessment/{assessmentId}/candidate/{candidateId}/report/async?fileType=pdf
Authorization: Bearer <your-access-token>
Query parameter Required Description
fileType Yes pdf
report No A specific report type, the same values as today
testLibId No The report for a single test, the same as today
assessmentCandidateId No A specific attempt, for a candidate who was invited more than once
regenerateReport No true to create a fresh report instead of reusing a recent one

The response arrives in under a second:

{
  "jobId": "pdf-4b1f2c9e-7a3d-4e51-9c0b-2f6d8a1e5b47",
  "status": "IN_PROGRESS",
  "assessmentName": "Senior Backend Engineer",
  "testLibrary": [
    {
      "testLibraryId": "64f1c2a9e1b2c3d4e5f6a7b8",
      "testLibraryTitle": "Node.js",
      "pdfReportUrl": null
    }
  ]
}

IN_PROGRESS  refers only to the report being generated. It does not mean the candidate's assessment is in progress.

Treat jobId  as an opaque string: store it exactly as returned and pass it back unchanged. Do not parse it or rely on its format, which can differ between report types.

Step 2: Check the job and collect the report

Check the job status with the jobId  from step 1, using the same authentication:

GET https://api.testlify.com/v1/workspace/job/{jobId}/status
Authorization: Bearer <your-access-token>

While the report is being generated, status  is waiting , active  or delayed . When it is ready, status  is completed  and the report links are in result :

{
  "id": "pdf-4b1f2c9e-7a3d-4e51-9c0b-2f6d8a1e5b47",
  "name": "generatePdfReport",
  "status": "completed",
  "assessmentId": "64f1c2a9e1b2c3d4e5f6a7b9",
  "result": {
    "pdfUrl": "https://.../assessment-report.pdf",
    "cefrCertificatePdfUrl": "",
    "commonSJTReports": [],
    "files": [
      {
        "kind": "assessmentReport",
        "name": "Jane Doe - Senior Backend Engineer.pdf",
        "url": "https://.../assessment-report.pdf"
      }
    ]
  }
}
Field in result What it contains
pdfUrl The main Assessment Report. This is the same field the current endpoint returns.
files Every report file generated for this request, each with a kind, a ready-to-use file name and its url. Use this list to download all files, including individual test reports.
Other URL fields The same sub-report fields the current endpoint returns, such as cefrCertificatePdfUrl and commonSJTReports. A field is empty when that report does not apply to the candidate.

Job status values

status Meaning What to do
waiting Queued Check again in 10 seconds
delayed Queued, starting shortly Check again in 10 seconds
active Generating Check again in 10 seconds
completed Ready Read the URLs from result
failed Generation failed Start a new report (step 1)

  • Check every 10 seconds, for up to 10 minutes. Most reports are ready well within that time.
  • Treat a network error while checking as temporary. Check again on the next interval instead of failing.
  • If the job returns failed , or polling reaches 10 minutes, start a new report by repeating step 1.
  • If the status endpoint returns 404 , the job is no longer available. Start a new report.
  • Download or store the PDF soon after the job completes. Completed jobs are not kept indefinitely.
  • Repeating step 1 is safe. If a report for the same candidate and the same parameters is already being generated, you receive the same jobId  instead of starting a second report. Once that job has finished, the next request generates a fresh report.
  • Run the polling in a background task, not inside a request your own users are waiting on.

Example (JavaScript)

const BASE_URL = "https://api.testlify.com/v1";
const POLL_INTERVAL_MS = 10_000; // 10 seconds
const MAX_ATTEMPTS = 60;         // 10 minutes

const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));

async function getCandidatePdfReport(assessmentId, candidateId, token) {
  const headers = { Authorization: `Bearer ${token}` };

  // Step 1: start the report.
  const startRes = await fetch(
    `${BASE_URL}/assessment/${assessmentId}/candidate/${candidateId}/report/async?fileType=pdf`,
    { headers }
  );
  if (!startRes.ok) throw new Error(`Could not start the report: ${startRes.status}`);
  const start = await startRes.json();
  if (!start.jobId) throw new Error("No jobId returned");

  // Step 2: check the job until it finishes.
  for (let attempt = 0; attempt < MAX_ATTEMPTS; attempt++) {
    await sleep(POLL_INTERVAL_MS);

    const res = await fetch(`${BASE_URL}/workspace/job/${start.jobId}/status`, { headers });
    if (res.status === 404) throw new Error("Job expired; start a new report");
    if (!res.ok) continue; // temporary error: check again

    const job = await res.json();
    if (job.status === "completed") return job.result; // { pdfUrl, files, ... }
    if (job.status === "failed") throw new Error("Report generation failed; start a new report");
    // waiting, active or delayed: keep checking
  }
  throw new Error("Report not ready after 10 minutes; start a new report");
}

What does not change

  • Your authentication. Use the same access token for both new endpoints.
  • Your request parameters. fileType , report , testLibId  and the other parameters work as they do today.
  • Report content. The PDF reports are the same as today, for past and new assessments.
  • Candidate details. Calling GET /v1/assessment/{assessmentId}/candidate/{candidateId}  without fileType  still returns the candidate's details directly, and is not affected by this change.
  • Webhooks. Webhook payloads are unchanged. If your integration receives reports only through webhooks, no action is needed.

Timeline

Date What happens
Now The new asynchronous endpoints are available. The current endpoint keeps working as before.
Now to 30 November 2026 Migration period. Move your integration to the new flow and test it.
1 December 2026 The current endpoint stops generating PDF reports. Integrations that still request PDFs from it will no longer receive report URLs.

Migration checklist

  • Find every place your integration requests a report with fileType=pdf .
  • Change those calls to the new /report/async  endpoint.
  • Read the jobId  from the response.
  • Check GET /v1/workspace/job/{jobId}/status  every 10 seconds, for up to 10 minutes.
  • When the status is completed , read result.pdfUrl , or result.files  for every report file.
  • Start a new report when the job is failed , returns 404 , or is not ready after 10 minutes.
  • Test the updated flow with a candidate who has completed an assessment.
  • Release the change before 1 December 2026.

Regional API addresses

Use the API address for the region your workspace is hosted in. The paths in this guide are the same in every region.

Region Base URL
Europe https://api.testlify.com/v1
United States https://api-usa.testlify.com/v1
Saudi Arabia https://api-ksa.testlify.com/v1

Need help?

If you have questions or would like us to review your updated integration, contact our support team or your Testlify account manager. We are happy to help you complete the migration before 1 December 2026.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us