Responses, errors and limits
Every check answers with the same errors and the same limits, set out here once, with the fields each one returns. What you send is on each endpoint’s own page.
Endpoints
Every endpoint is on https://api.checksharecode.co.uk, under /v1. Integrations that call https://checksharecode.co.uk/api/... (the same paths, with /api in place of /v1) keep working: Moving to api.checksharecode.co.uk.
Response fields
Right to work and right to rent return the same fields. Immigration status returns its own, because gov.uk shows a status rather than a yes or no, and so does driving licence, with the record DVLA shows. A few fields read differently depending on the check:
| Field | Right to work | Right to rent | Immigration status | Driving licence |
|---|---|---|---|---|
| title | "Right to work" | "Right to rent" | "Immigration status" | "Driving licence" |
| outcome | "ACCEPTED" or "REJECTED" | "ACCEPTED" or "REJECTED" | Always "ACCEPTED" | Always "ACCEPTED" |
| recheck_date | The date their permission ends | The later of the date their permission ends and one year after this check | Not sent. valid_until is the date their permission ends, null when there is no limit | Not sent. licence_valid_to is the date the licence ends, and flags warn 90 days before |
Every synchronous answer also carries mode, the key's: test is a sandbox key's made-up result, never a real person's. An asynchronous check carries it on the check itself.
The fields right to work and right to rent return:
| Field | Type | Meaning |
|---|---|---|
| outcome | "ACCEPTED" | "REJECTED" | Whether gov.uk says this person has the right to work, or to rent. |
| title | "Right to work" | "Right to rent" | "Immigration status" | "Driving licence" | Which check it was, and so which fields follow. |
| name | string | Applicant name as gov.uk holds it. |
| details | string | gov.uk’s summary sentence, for example "They have the right to work in the UK from 14 November 2024 until 14 November 2026." |
| start_date, expiry_date | date | null | YYYY-MM-DD. null when gov.uk shows none. |
| recheck_date | date | null | YYYY-MM-DD. When gov.uk says you must check again, worked out for each check. null when no follow-up check is due. |
| conditions, restrictions | string[] | Work conditions and restrictions, one sentence, bullet or sub-heading each. Empty array when there are none. |
| requires_sponsorship | boolean | null | Right to work: true when gov.uk’s conditions say they work for a sponsor (a sponsored worker’s result says “They must work for the employer who sponsored them”). Read from gov.uk’s wording, so a sponsored visa worded differently could be missed. null for right to rent, for REJECTED, and when a time-limited result could not be read. Sandbox: AA1AA1AA1 is true. |
| student_visa | boolean | null | Right to work: true when gov.uk’s conditions are a student’s (they can work “up to 20 hours a week during term time”). null for right to rent, for REJECTED, and when a time-limited result could not be read. Sandbox: ST5ST5ST5 is true. |
| photo_data_url | string | null | Applicant photo as a JPEG data URL. Compare it with the person. |
| pdf_data_url | string | null | The gov.uk PDF as a data URL. Keep it as your record. |
| reference | string | null | gov.uk reference for your audit trail. |
| company_name, check_date | string | null, date | null | Who checked and when, as gov.uk recorded them. For right to rent, company_name holds the checker_name you sent. |
| nationality, permission_type | null | Deprecated. gov.uk’s result page shows neither, so both are always null. |
| checked_at | date-time | When the check finished, ISO 8601 UTC. |
Immigration status fields
Immigration status keeps gov.uk’s own wording, and has no details, start_date, expiry_date, recheck_date or conditions. Any failure is an error code, as for the other checks.
| Field | Type | Meaning |
|---|---|---|
| outcome | "ACCEPTED" | Always ACCEPTED: gov.uk showed a status. |
| title | "Immigration status" | Which kind of share code it was. |
| name, date_of_birth | string, date | null | As gov.uk shows them. |
| nationality | string | null | gov.uk’s three letter code, for example CAN. |
| status | string | gov.uk’s name for their status, for example "Skilled Worker" or "Settled status, also known as indefinite leave to remain". |
| valid_from, valid_until | date | null | YYYY-MM-DD. valid_until is when their permission ends: check again before then. null when there is no time limit. |
| activities | string[] | What gov.uk says they can do, one item each, for example "study". Empty array when it lists none. |
| restrictions | string[] | What gov.uk says they cannot do, for example "They cannot access public funds." |
| reference | string | null | gov.uk reference for your audit trail. |
| company_name, job_title, purpose, check_date | string | null | Who checked, why and when, as gov.uk recorded them. purpose is in gov.uk’s words. |
| photo_data_url, pdf_data_url | string | null | The photo as a JPEG data URL, and the result as a PDF: gov.uk’s own when it supplies one, otherwise a print of gov.uk’s result page. Keep it as your record. |
| share_code, checked_at | string, date-time | The code checked, and when the check finished. |
Driving licence fields
Driving licence returns only what DVLA’s or DVA’s page shows. For a GB licence that is no date of birth, address or photo; for a Northern Ireland licence, DVA also shows the date of birth and address, and we return them. Dates are YYYY-MM-DD. Any failure is an error code, as for the other checks.
| Field | Type | Meaning |
|---|---|---|
| outcome | "ACCEPTED" | Always ACCEPTED: DVLA showed a record. |
| title | "Driving licence" | Which check it was. |
| issuer | "DVLA" | "DVA" | Whose record: DVLA for a GB licence, DVA for a Northern Ireland one (an 8-digit number). |
| name | string | The driver’s title and names, as DVLA or DVA shows them. |
| driving_status | string | The service’s words for the licence: DVLA’s "Current full licence", or DVA’s "CURRENT". |
| licence_number_last8, issue_number | string, string | null | The last 8 characters of a GB licence number (a Northern Ireland number’s 8 digits), and the 2-digit issue number of their latest photocard (null for Northern Ireland). |
| licence_valid_from, licence_valid_to | date | null | When the licence started, and when it ends. |
| offences, points | integer | How many offences are on the record, and their penalty points in all. |
| has_penalties | boolean | false when DVLA says there are no penalties or disqualifications, or DVA lists no endorsements. |
| endorsements | array or null | Each endorsement on the record, in the order DVLA or DVA lists it; [] when there are none. Each has code as shown (GB's, such as SP30, DR10 or IN14; Northern Ireland's, such as 50 08 201 or TOT UP), description (the offence's wording), category (below), offence_date, points, points_expired (true when the points have expired: they no longer count in points, but the endorsement stays until removal_date), points_expiry_date and removal_date. A field is null when the record does not show it. DVLA's check page shows no conviction date and no details of a ban, so neither is returned: whether the driver may drive today is in driving_status. points can be 0 for a serious offence, because a court that bans gives no points: judge an offence by its code or category, never its points. null instead of a list when the record has penalties we could not read whole: then use offences, points, has_penalties and the PDF. |
| endorsements[].category | string or null | Our grouping of a GB code, so you can find drink, drug or insurance offences without a code list: drink, drugs, insurance, dangerous, careless, speeding, disqualified_driving, accident, construction_and_use, licence, motorway, pedestrian_crossing, traffic_signs, vehicle_taking, totting_up, miscellaneous or other. It follows DVLA's code families, except that drink and drug offences are always drink or drugs (DR80 is drugs, CD40 drink), and the aiding (ends in 2), causing or permitting (4) and encouraging (6) forms count as the offence itself (IN14, permitting no insurance, is insurance). null for a Northern Ireland code, until DVA publishes its list. |
| automatic_only | boolean | true when their full category B (car) licence has restriction 78 or 106: automatic cars only. |
| entitlements | object[] | One per vehicle category: category as DVLA shows it ("B", "AM"), kind (full or provisional), valid_from, valid_to, automatic_only, restrictions (each a code and its text, for example 78) and description, DVLA’s words for what they can drive. |
| flags | object[] | What to look at, each a code and a severity. points_9_or_more is high. points_6_to_8, not_current_full_licence, licence_valid_to_within_90_days and category_valid_to_within_90_days are medium. Empty array when there is nothing to look at. |
| viewed_at | date-time | null | When DVLA says the record was viewed, UK time with its offset. null for Northern Ireland. |
| date_of_birth, address | date | null, string | null | Northern Ireland only, when DVA shows them: the driver’s date of birth, and their address as DVA writes it. Not in a GB answer. |
| pdf_data_url | string | null | DVLA’s own "Save or print" PDF of the record, or for Northern Ireland a printout of DVA’s page, as a data URL. Keep it as your audit record: neither accepts a printout as proof of what someone can drive. The sandbox returns a sample PDF of each scenario’s own record, its endorsements included, marked as a sandbox sample. |
| checked_at | date-time | When the check finished, ISO 8601 UTC. |
Live responses also carry X-RateLimit-Limit and X-RateLimit-Remaining for your checks, and X-RateLimit-Reset when they reset (none on Free, whose first checks are a one-off), and every response has an X-Request-Id.
How recheck_date is worked out
The same permission gives different dates. Both examples were checked on 1 October 2026, for someone whose permission ends on 1 January 2027:
| Check | Permission ends | Checked on | recheck_date |
|---|---|---|---|
| Right to work | 2027-01-01 | 2026-10-01 | 2027-01-01 |
| Right to rent | 2027-01-01 | 2026-10-01 | 2027-10-01 |
Right to rent waits for one year after the check, because that is later than the end of their permission. When gov.uk says a right to work check is valid for a number of months, recheck_date is that many months after the check. When their permission has no end date, recheck_date is null for right to work and right to rent. Immigration status has no recheck_date: use valid_until, here 2027-01-01. Driving licence has none either: check again when you need to, with a new code from the driver.
Errors
Errors come back as { "error": { "code", "message", "docs_url" } }. Switch on code. message is written for a person and says what to do next, and docs_url links to the code's section of Errors, which lists every field an error can carry. QUOTA_EXCEEDED and PAYMENT_REQUIRED also carry an upgrade_url, and QUOTA_EXCEEDED an add_card_url for the other way on: a card for extra checks on the Free plan.
| code | HTTP | What to do |
|---|---|---|
| INVALID_INPUT | 400 | Fix the field named in field (and in message). Don't retry as is. The management API answers 409 with this code for a change that conflicts, such as a key revoking itself. |
| UNAUTHENTICATED | 401 | No API key reached us: the Authorization header is missing or isn't Bearer <your API key>. Keys are at https://checksharecode.co.uk/app/keys. Don't retry as is. |
| INVALID_KEY | 401 | We don't know this key: it was cut off when copied, revoked or rolled, or is the hidden key a team member sees. message says which. Copy it again from https://checksharecode.co.uk/app/keys. The agent routes also answer 403 or 409 with this code, saying why. Don't retry as is. |
| QUOTA_EXCEEDED | 402 | The Free plan's free live checks are used up. Send the person who manages billing to upgrade_url (the plans) or add_card_url (a card for extra checks on Free). An unclaimed agent's live key gets a payment challenge and claim_url instead: see Build with an agent. |
| PAYMENT_REQUIRED | 402 | The subscription is past due. Send the person who manages billing to upgrade_url to settle the latest invoice; checks run again once it is paid. |
| PERMISSION_DENIED | 403 | This key can read this but not change it: an unclaimed agent's live key. Give your user claim_url; once they claim the account, its keys can make changes. |
| NOT_FOUND | 404 | gov.uk has no record matching this share code and date of birth together. Either could be wrong, or the code has expired: gov.uk says a code has expired only the first time it is checked with the right date of birth, and "Details do not match our records" every time after (and for a wrong date of birth). Ask the applicant to check both, or for a new code if it's more than 90 days old. For an SIA licence check: the SIA register has no licence with that number, so check the 16 digits against the front of the licence card. |
| CHECK_NOT_FOUND | 404 | No asynchronous check with that id for this key's account and mode: a sandbox key can't read a live check, or the other way round. Use the id from the Location the check gave you. |
| RESOURCE_NOT_FOUND | 404 | The management API has no key, webhook delivery or team member with that id in this key's account and mode. List them first to get the id. |
| ENDPOINT_NOT_FOUND | 404 | No endpoint at that method and path on api.checksharecode.co.uk. Its paths start /v1/: see https://api.checksharecode.co.uk/openapi.json. Not NOT_FOUND, which means gov.uk has no record. |
| CHECK_CODE_ALREADY_USED | 409 | Driving licence only. Your account sent this licence number and check code in the last 21 days, and a code works once, so it was not sent to DVLA again and is not charged. first_check names the earlier check: its asynchronous id (chk_…), which you can read back, or its request id. Otherwise ask the driver for a new code. |
| SHARE_CODE_UNUSABLE | 422 | gov.uk won't use this share code for this check, for example a status code (it starts with S) sent to right to work, or an expired code on its first check. Ask them for a new one. Counts as a check, like NOT_FOUND, and is not retried. |
| CHECK_CODE_UNUSABLE | 422 | Driving licence only. DVLA did not accept the licence number and check code: the number is wrong, or the code is wrong, expired, used or cancelled. DVLA does not say which. DVLA may also answer that it couldn't display the licence details with the information given: most likely its lock-out page, when DVLA briefly pauses checks after failed attempts (the pauses seen so far cleared within about a minute). Then check_code_used is true: check the licence number, and send a new code after a minute. Ask the driver to check their licence number and make a new code. Counts as a check, 2 of your allowance, and is not retried. |
| RATE_LIMITED | 429 | Too many requests. Wait the Retry-After seconds, then retry. |
| INTERNAL | 500 | Our fault. Retry once, then contact us with the request_id (or X-Request-Id header) if it has one. |
| GOVUK_UNEXPECTED | 502 | gov.uk, DVLA or the SIA register returned a page we didn't expect. Retry later. For a driving licence, only when check_code_used is false. |
| BUSY | 503 | All check slots in use, or (driving licence) DVLA briefly pauses checks after failed attempts: we hold your account's licence checks for up to 75 seconds after one of its codes is refused, and every account's while DVLA shows its lock-out page, and nothing is sent. Either way the check didn't run, isn't charged, and a licence check's code is unused (check_code_used is false). Retry the same request after the Retry-After seconds. |
| TIMEOUT | 504 | gov.uk or DVLA was too slow. Safe to retry, except a driving licence whose check_code_used is not false. |
A driving licence check code works once, so the errors of a driving licence check also carry check_code_used, and CHECK_CODE_ALREADY_USED a first_check. An error without check_code_used, such as a 401, came before the check, so the code was not sent.
| check_code_used | Meaning | What to do |
|---|---|---|
| false | DVLA never saw the code. | Send the same code again. |
| true | DVLA saw the code. | Ask the driver for a new code. |
| "unknown" | The code was sent, and no record came back. | Ask the driver for a new code. |
A right to rent request without checker_type, or another check’s request with one, is refused with 400 INVALID_INPUT. So is an immigration status request without job_title or purpose, a request to another endpoint with job_title, purpose or other_purpose, and other_purpose without purpose: other. A share code is made for one service, and its first letter usually says which: W for right to work, R for right to rent, S for immigration status. When gov.uk refuses a code for this check, or says it has expired (it says so only the first time an expired code is checked with the right date of birth; after that it answers NOT_FOUND), you get 422 SHARE_CODE_UNUSABLE (try it with DD4DD4DD4): ask the applicant for a new code for the right service. It counts as a check, like NOT_FOUND, because gov.uk answered. Some codes for the wrong service end as NOT_FOUND instead, because gov.uk shows its no-record page for them.
Rate limits and quota
Every check comes out of the same allowance. A driving licence check uses 2 checks of it.
| Plan | Live checks | After that | Requests/second per key |
|---|---|---|---|
| Free | The first 10, once | Refused, or £0.75 per check with a card | 5 |
| Pro | 100 a month | £0.25 per check | 20 |
| Scale | 500 a month | £0.10 per check | 50 |
| Platform | 2,000 a month | £0.07 per check | 50 |
Only answers from gov.uk count: accepted, rejected, not found, and a share code gov.uk refuses. For a driving licence, a record DVLA shows and a code it refuses count, 2 checks each; CHECK_CODE_ALREADY_USED never reaches DVLA and never counts. Sandbox calls and other errors never count. The OpenAPI 3.1 contract is at /openapi.json.
Deprecated: POST /api/check
POST /api/check is the original right to work endpoint. It still runs right to work checks, with the same body as before, but nothing else: a right to rent or immigration status request there (another check, a checker_type, or a job_title, purpose or other_purpose) is refused with 400 INVALID_INPUT. Its responses carry a Deprecation header and a Link header with rel="deprecation" pointing at this page. No date has been set to turn it off.
- To move, send the same body to
POST /v1/check/right-to-work. Responses and errors stay the same. Moving off POST /api/check has the steps. - Right to rent goes to
POST /v1/check/right-to-rent, withchecker_nameandchecker_type. See Right to rent. - Immigration status goes to
POST /v1/check/immigration-status, withjob_titleandpurpose. See Immigration status. - Driving licence goes to
POST /v1/check/driving-licence, withlicence_numberandcheck_code. See Driving licence. - Asynchronous checks move the same way. See Asynchronous checks.