Connecting your ATS

The pattern for connecting any applicant tracking system to Dio: send interview links on a stage change and write scorecards back when they are ready.

Any applicant tracking system (ATS) that can tell your service about a stage change, and accept a note or an attachment back, can be connected to Dio with the API. This page describes the pattern, then the details that make it reliable.

The pattern

  1. A candidate reaches a stage in your ATS, such as "Dio interview". The ATS's webhook or automation tells your service.
  2. Your service creates an interview link with createInterviewLink, sending an Idempotency-Key, and stores the link's id against the application.
  3. The candidate gets the link. Your service emails the url, or writes it to a field on the candidate so that your ATS's own email template sends it.
  4. The candidate takes the interview. Dio sends session.completed when it ends.
  5. Dio sends scorecard.ready when the interview is scored, usually several minutes later.
  6. Your service fetches the results: the scorecard with getScorecard and the PDF with getScorecardPdf.
  7. Your service writes back to the ATS: a note with the overall score and the summary, the PDF as an attachment, a score in a custom field.

Leave the decision to move the candidate on to a person. The scorecard is evidence for a recruiter to review; Reading a scorecard explains what it holds.

Mapping roles

Each ATS job you send candidates from needs a Dio role with a published interview plan. Keep a mapping from the ATS's job id to Dio's job_id in your own service, and let a recruiter choose from the roles listRoles reports with "published": true. A role created with the API is a draft until a recruiter publishes its plan in the Studio.

Your ATS may deliver the same stage change more than once, and your own calls can time out. Two habits keep that from sending a candidate two links:

  • Check your own records first. If you already stored an interview link for this application, don't create another.
  • Make one Idempotency-Key per link and store it before the first attempt, so a retry, even after a restart, sends the same key. Dio keeps the first answer for 24 hours and replays it. See Idempotency.

Use the label for something a recruiter in Dio will recognise, such as the application id: it is shown beside the link in the role's Invites tab.

import requests

API = "https://api.getdio.ai/v1"


def on_stage_change(application, headers):
    """Called when the ATS says an application reached the interview stage."""
    if application.dio_invite_id:
        return  # this application already has a link
    if not application.dio_idempotency_key:
        application.dio_idempotency_key = new_uuid()
        application.save()  # stored before the first attempt
    response = requests.post(
        f"{API}/jobs/{application.dio_job_id}/invites",
        headers={**headers, "Idempotency-Key": application.dio_idempotency_key},
        json={"label": f"Application {application.id}"},
        timeout=30,
    )
    if response.status_code == 409:
        notify_recruiter(application, response.json()["detail"])  # a person acts on this
        return
    response.raise_for_status()
    link = response.json()
    application.dio_invite_id = link["id"]
    application.save()
    send_interview_email(application.candidate, link["url"])

new_uuid, notify_recruiter and send_interview_email stand for your own code.

The link lasts 72 hours. If the candidate hasn't started by then, create a new link with a new Idempotency-Key.

Handling a 409

When createInterviewLink answers 409, no link was made. There are two common reasons, and detail says which:

  • The role has no published plan. A recruiter needs to publish it in the Studio.
  • The workspace can't start new interviews right now, for example because its interviews for the period are used up. detail begins "No link was made" and says what to do.

Neither fixes itself, so don't retry automatically. Show the detail to a person: a note on the application, or a message to the recruiter. A refusal is kept against its Idempotency-Key for 24 hours like any answer, so once the cause is fixed, send the request with a new key.

Matching results to applications

The scorecard.ready event carries the interview's session_id, not the link it came from. To find the application:

  1. Call getInterview with the session_id.
  2. Read its invite_id: the link the interview was started from.
  3. Look up the application you stored that invite_id against.

Then fetch the scorecard and the PDF, and write them back.

Keep the ATS's ids in your own service. Carrying them on the link itself, so that every event and interview names your application id, is in early access.

When no scorecard arrives

Not every interview is scored. A candidate may stop early, or the call may drop. If scorecard.ready hasn't arrived well after session.completed, read the interview's scoring_status with getInterview:

scoring_status Means
queued, transcribing, scoring Still in progress.
scored Done: fetch the scorecard.
failed, skipped No scorecard is coming on its own. Point a recruiter to the interview in Dio.

listInterviews with job_id lists a role's interviews with their invite_id, which also tells you which links were never used.

Deletion requests

Candidates are told they can ask for their interview to be deleted. When that request reaches your system, call deleteInterview with the session_id and an Idempotency-Key. It removes the interview's transcript, recording, scorecard and PDF, and the candidate's record, and it cannot be undone.

curl -X DELETE https://api.getdio.ai/v1/sessions/sess_7d0e5b9c2a14 \
  -H "Authorization: Bearer $DIO_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"reason": "candidate_request"}'

reason is candidate_request (the default), recruiter_request, test_data or retention. While the interview is still running or being scored, the call answers 409; send it again once that has finished, which usually takes a few minutes.

What's native today

  • No native ATS connection is generally available yet. A Recruitee connection is in early access; write to hello@getdio.ai if you use Recruitee.
  • Zapier and Make apps are coming, for connecting an ATS without writing a service.
  • Posting import: in the app, a recruiter can start a role from a job posting on a Greenhouse, Lever, Ashby or Bullhorn job board. It is not an API feature.

Until a native connection covers your ATS, the pattern on this page is how to connect it.