Skip to the content

The API

Read results and invite candidates from your own systems, in whatever format suits you.

Get a key

An owner makes keys in Settings, under API keys. A key can either read results, or read results and invite candidates. It is shown once, so copy it straight away. Revoking a key stops it working at once.

Send the key as a bearer token with every request. Keep it on your server; never put it in a web page or an app.

curl https://assess.cogniprep.app/api/v1/roles \
  -H "Authorization: Bearer cpa_your_key"

Endpoints

Everything is JSON. Lists come back as { "data": [...] } and single records as { "data": {...} }. Dates are ISO 8601 in UTC.

GET/roles

Your roles, newest first, with candidate counts. Add ?include_archived=true for archived roles too.

GET/roles/{role_id}

One role, with its tasks and the profile it is scored against.

GET/roles/{role_id}/candidates

Everyone invited to the role, with status, fit score and positions. Filter with ?status=, one of invited, opened, started, completed, expired, revoked.

GET/candidates/{candidate_id}

One candidate in full: each dimension against the role, the reasons for a second look, and task timings.

POST/roles/{role_id}/invites

Invite people to a role. Needs a key that can invite.

GET/roles/{role_id}/invites?email=

One person's invite to a role, with its status and link. Needs a key that can invite, because the link opens the assessment.

Reading results

curl "https://assess.cogniprep.app/api/v1/roles/{role_id}/candidates?status=completed" \
  -H "Authorization: Bearer cpa_your_key"
{
  "data": [
    {
      "id": "6f1c...",
      "role_id": "b2a0...",
      "name": "Sam Taylor",
      "email": "sam@example.com",
      "status": "completed",
      "fit_score": 78,
      "worth_a_second_look": false,
      "norms": "provisional",
      "invited_at": "2026-11-02T09:00:00.000Z",
      "deadline": "2026-11-16T09:00:00.000Z",
      "completed_at": "2026-11-05T14:12:00.000Z",
      "extra_time_percent": 0,
      "source": "api",
      "tasks": { "completed": 6, "total": 6, "waived": 0, "not_scored": 0 },
      "dimensions": [
        { "key": "discover_rule", "name": "Discovering the rule", "kind": "ability", "position": 3, "percentile": 71 }
      ],
      "recorded_interview": {
        "status": "submitted",
        "score": 3.25,
        "score_label": "solid",
        "automatic_score": 3,
        "submitted_at": "2026-11-09T10:40:00.000Z",
        "scored_at": "2026-11-09T10:43:00.000Z"
      }
    }
  ]
}
  • fit_score runs from 1 to 100 and is null until every task is done. It is also null for a finished candidate when nothing in the role profile could be scored. It orders candidates; it is not a probability, and scores within 8 points of each other are too close to tell apart (12 for a result from before measures that are less repeatable began to count for a little less).
  • position runs from 1 to 4 against the comparison group. For an ability more is better. For a working style neither end is better, and the role says which end suits it.
  • norms is provisional until enough people have taken a task, then established. See the science.
  • tasks.waived counts tasks the candidate was excused from as an adjustment. They are not in the total, and the fit score is worked out from the other tasks. In a single candidate, such a task has the status waived.
  • tasks.not_scored counts tasks that ended with too little answered to score, for example after a closed tab. They are treated like waived tasks: their dimensions are absent and the fit score is worked out from the rest. In a single candidate, such a task has not_scored set to true.
  • recorded_interview is null unless the candidate has been sent a recorded interview. Its status is one of invited, opened, started, submitted, expired or revoked. score is the mean over the questions, from 1 to 4, using a reviewer's score wherever someone on your team gave one and the automatic score otherwise. automatic_score is the automatic scores alone. Both are null until the answers have been scored, which takes a few minutes after submitted_at. The recordings and transcripts are not in the API.

Inviting candidates

curl -X POST https://assess.cogniprep.app/api/v1/roles/{role_id}/invites \
  -H "Authorization: Bearer cpa_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "candidates": [
      { "email": "sam@example.com", "name": "Sam Taylor" }
    ],
    "deadline_days": 14,
    "extra_time_percent": 0,
    "send_email": true
  }'
candidatesUp to 500 people, each with an email and an optional name.
deadline_daysFrom 1 to 90. Defaults to your organisation's default deadline.
deadlineAn exact date and time instead of deadline_days.
extra_time_percentOne of 0, 25, 50, 100. Defaults to 0.
send_emailDefaults to true. Set it to false to send the returned invite links yourself.

People already invited to the role are skipped and listed with a reason. On a paid plan, invites carry on past your candidate allowance as they do in the app: each extra candidate who starts is charged at your plan's price and added to your next invoice. If the list would go past what your account can invite, which is the allowance on a trial and double the allowance in one period on a paid plan, nobody is invited and you get a 422 saying how many places are left.

If you send links yourself, fetch a skipped person's link with GET /roles/{role_id}/invites?email=sam@example.com. It returns their id, email, status, invite_link, deadline and completed_at, or a 404 if that address has no invite to the role.

A single candidate also carries invite_link. Because the link opens the assessment, it is filled in only for a key that can invite. With a read key, and for a revoked invite, it is null.

Errors and limits

400The request is malformed. The message says what to fix.
401No key, or a key that is wrong or revoked.
403A read key used to invite, or a suspended account.
404No role or candidate with that id in your organisation.
422Valid, but not possible: an archived role, a deadline out of range, or no places left to invite.
429Too many requests. Wait for the number of seconds in Retry-After.
500Something went wrong on our side. Try again, and if it keeps happening send us the request_id from the response.

Errors look like { "error": { "code": "not_found", "message": "..." } }. Each key can make 120 requests a minute, and 10 invite requests a minute.

Help

Signed in, use Support and choose “Something is not working”. Tell us the time of the request and the X-Request-ID header from the response.