For agents

Build with a coding agent

Claude Code, Cursor, Copilot and ChatGPT can build right to work, right to rent, immigration status or driving licence checks for you. Every page in these docs is also plain Markdown, so your agent reads exactly what you read.

1Give your agent this prompt

Pick the check, then paste the prompt. Signed in, it has your sandbox key in it. Signed out, it tells your agent to get a sandbox key itself. The same key runs every check.

Prompt
Add UK right-to-work checks to this project using the Check Share Code API. Follow the quickstart: https://checksharecode.co.uk/docs/quickstart.md. Read my API key from the CHECKSHARECODE_API_KEY environment variable. If it isn't set, get a sandbox key yourself with POST https://api.checksharecode.co.uk/v1/agent/signup (send your name and what we are building as name and use_case), store the api_key it returns in CHECKSHARECODE_API_KEY, and give me the claim_url so I can keep the key. Test it with share code AA1AA1AA1 and date of birth 1990-01-01. AA1AA1AA1 is a sandbox test code: it only works with the sandbox key. Keep tests on the sandbox key, and never send a test code with a live key (rtw_live_…): that runs a real gov.uk check, which finds no record and still uses one of my checks. The sandbox work is done when a test check answers 200 with outcome ACCEPTED. Then go live: production reads a live key (rtw_live_…) from CHECKSHARECODE_API_KEY, and development and tests keep the sandbox key. Finish by telling me the steps that are left for me, because only I can do them. If you got the sandbox key yourself, give me its claim_url first, so the account and its keys move into mine and the free checks apply. I create a live key at https://checksharecode.co.uk/app/keys and set it as CHECKSHARECODE_API_KEY in production. Then I run the first live check with a real person's share code and date of birth, such as the next new hire's. A not found answer still shows the integration works. The first 10 live checks are free.

No account yet? Your agent can get a key

An agent can get a sandbox key with one call, no account and no auth. It sends its name and what it is building, both required, and gets a claim link to give you: open it, sign in or sign up, and the key moves into your account, so it keeps working in the project your agent set up.

POST /v1/agent/signup
curl -X POST https://api.checksharecode.co.uk/v1/agent/signup \
  -H "content-type: application/json" \
  -d '{"name": "Claude Code for Acme Ltd", "use_case": "Right to work checks in Acme onboarding"}'

# 201 Created
{
  "api_key": "rtw_test_…",
  "mode": "test",
  "name": "Claude Code for Acme Ltd",
  "use_case": "Right to work checks in Acme onboarding",
  "claim_url": "https://checksharecode.co.uk/claim#…",
  "upgrade_urls": {
    "pro": "https://checksharecode.co.uk/claim?plan=pro#…",
    "scale": "https://checksharecode.co.uk/claim?plan=scale#…",
    "platform": "https://checksharecode.co.uk/claim?plan=platform#…"
  },
  "next_steps": "…"
}
  • Claim and pay in one step. Each link in upgrade_urls claims the account and goes straight to Stripe Checkout for that plan. Your agent asks how many checks you expect a month and gives you the one that fits; claim_url keeps you on the free plan.
  • Sandbox first. The key returns fixed test data and never runs a real check.
  • No expiry. The key keeps working, claimed or not, and so does the claim link until it is used.
  • Reuse the key. Each network can make 20 agent keys a day, and a 429 RATE_LIMITED says when to try again.

Ready for real checks? Your agent can get a live key

With its sandbox key, an agent can get a live key that runs real gov.uk checks. It pays for each one itself, and gives you the claim link straight away. Claim the account and its checks run on your plan instead.

POST /v1/agent/live-key
curl -X POST https://api.checksharecode.co.uk/v1/agent/live-key \
  -H "authorization: Bearer rtw_test_…"

# 201 Created
{
  "api_key": "rtw_live_…",
  "mode": "live",
  "free_checks_remaining": 0,
  "claim_url": "https://checksharecode.co.uk/claim#…",
  "upgrade_urls": { "pro": "…", "scale": "…", "platform": "…" },
  "next_steps": "…"
}
  • Paid from the first check. An unclaimed live key has no free checks: each check answers 402 QUOTA_EXCEEDED with a payment challenge, the claim_url and upgrade_urls. See Your agent pays per check.
  • Slower than the sandbox. A live check drives gov.uk in a browser and usually answers in 15 to 40 seconds. A 503 BUSY means try again after Retry-After.
  • One claim for both keys. Claiming moves the sandbox key and the live key into your account, with the checks already run, and from then on their checks run on your plan.
  • One live key per sandbox key. It is shown once. Unclaimed live keys run POST /v1/check/right-to-work, POST /v1/check/right-to-rent, POST /v1/check/immigration-status and POST /v1/check/driving-licence only, not async checks or live webhooks.

Until you claim the account, an unclaimed live key pays £1 for each check (£2 for a driving licence check) with the Machine Payments Protocol, from a card in a Link agent wallet. Once you claim the account, its checks run on your plan.

Pay for one check with the Link CLI
# The check answers 402 with a payment challenge, the claim_url and upgrade_urls.
# The Link CLI pays it and sends the same request again.
npx @stripe/link-cli mpp pay https://api.checksharecode.co.uk/v1/check/right-to-work \
  -X POST \
  -H "Authorization: Bearer rtw_live_…" \
  -H "Content-Type: application/json" \
  -d '{"share_code":"AB1CD2EF3","date_of_birth":"1990-01-01","company_name":"Acme Ltd"}'

# 200 OK, with a Payment-Receipt header
{
  "outcome": "ACCEPTED",
  "…": "…",
  "free_checks_remaining": 0,
  "payment": { "status": "charged", "amount_gbp": "1.00", "reference": "pi_…" }
}
  • Charged only for an answer. A result, NOT_FOUND, SHARE_CODE_UNUSABLE or CHECK_CODE_UNUSABLE keeps the charge. Anything else, such as TIMEOUT or GOVUK_UNEXPECTED, is refunded in full, and payment.status says refunded.
  • Never charged for a request we refuse. INVALID_INPUT and CHECK_CODE_ALREADY_USED are answered before any payment is taken.
  • Your key stays in `Authorization`. The payment credential goes in Payment-Authorization.
  • Cards only, in pounds. Through a Shared Payment Token from Link: we never see the card. At most 20 paid checks an account a day.
  • Async checks too. Pay the same way on the /async paths: the 202 carries payment and a Payment-Receipt, and the charge is settled when the check ends, after any retries. Poll the Location header: callback_url waits until your person claims the account. At most 3 paid checks in progress at once.
  • A plan costs less. Paid checks suit a few checks. For more, give your person the link that fits from upgrade_urls; claiming moves the paid checks into their account too.

Your agent can set up webhooks and keys too

With its sandbox key, an agent can do what the dashboard’s Keys and Webhooks pages do, in the sandbox: GET /v1/account to see where it stands, PUT /v1/webhooks/settings for the URL, GET /v1/webhooks/secret to verify events, POST /v1/webhooks/test and GET /v1/webhooks/deliveries to see what your endpoint answered. Once you claim the account, its live keys can manage the live settings, and every live change is emailed to you. See Manage your account with the API.

2Where agents read from

URLWhat it is
/llms.txtIndex of every docs page, one line each. Where an agent should start.
/llms-full.txtThe whole integration in one file: auth, examples, errors, test codes and the client code.
/docs/<page>.mdAny docs page as plain Markdown. Add .md to the URL, or send Accept: text/markdown.
/openapi.jsonOpenAPI 3.1 contract, for typed clients and code generation.

3What your agent sees

The Quickstart page as Markdown, and the index it's listed in. No navigation, no scripts, nothing to parse.

GET /docs/quickstart.md
# Quickstart

> Your first check takes 10 seconds: copy the code in step 2 and run it. It uses your sandbox key, which returns test data and never uses one of your checks.

Base URL: `https://api.checksharecode.co.uk` · Auth: `authorization: Bearer <key>` · Web version: https://checksharecode.co.uk/docs/quickstart · Sign up: https://checksharecode.co.uk/signup?ref=md

## Which check are you building?

Each check has its own endpoint, and the same key runs all four, so you can build any of them. The three share code checks take the same test codes; driving licence has its own.

Each check is shown below: right to work first, then right to rent, then immigration status, then driving licence.

> **Using a coding agent?** Paste this into Claude Code, Cursor or Copilot and it will do the steps below for you. [See Build with an agent](https://checksharecode.co.uk/docs/agents.md)

Right to work:

```text
Add UK right-to-work checks to this project using the Check Share Code API. Follow the quickstart: https://checksharecode.co.uk/docs/quickstart.md. Read my API key from the CHECKSHARECODE_API_KEY environment variable. If it isn't set, get a sandbox key yourself with POST https://api.checksharecode.co.uk/v1/agent/signup (send your name and what we are building as name and use_case), store the api_key it returns in CHECKSHARECODE_API_KEY, and give me the claim_url so I can keep the key. Test it with share code AA1AA1AA1 and date of birth 1990-01-01. AA1AA1AA1 is a sandbox test code: it only works with the sandbox key. Keep tests on the sandbox key, and never send a test code with a live key (rtw_live_…): that runs a real gov.uk check, which finds no record and still uses one of my checks. The sandbox work is done when a test check answers 200 with outcome ACCEPTED. Then go live: production reads a live key (rtw_live_…) from CHECKSHARECODE_API_KEY, and development and tests keep the sandbox key. Finish by telling me the steps that are left for me, because only I can do them. If you got the sandbox key yourself, give me its claim_url first, so the account and its keys move into mine and the free checks apply. I create a live key at https://checksharecode.co.uk/app/keys and set it as CHECKSHARECODE_API_KEY in production. Then I run the first live check with a real person's share code and date of birth, such as the next new hire's. A not found answer still shows the integration works. The first 10 live checks are free.
```

Right to rent:

```text
Add UK right to rent checks to this project using the Check Share Code API. Follow the quickstart: https://checksharecode.co.uk/docs/quickstart.md. Read my API key from the CHECKSHARECODE_API_KEY environment variable. If it isn't set, get a sandbox key yourself with POST https://api.checksharecode.co.uk/v1/agent/signup (send your name and what we are building as name and use_case), store the api_key it returns in CHECKSHARECODE_API_KEY, and give me the claim_url so I can keep the key. Test it with share code AA1AA1AA1 and date of birth 1990-01-01. AA1AA1AA1 is a sandbox test code: it only works with the sandbox key. Keep tests on the sandbox key, and never send a test code with a live key (rtw_live_…): that runs a real gov.uk check, which finds no record and still uses one of my checks. Use POST https://api.checksharecode.co.uk/v1/check/right-to-rent with checker_type "agent" and checker_name set to our letting agency's name, and store recheck_date so we check the tenant again in time. The sandbox work is done when a test check answers 200 with outcome ACCEPTED. Then go live: production reads a live key (rtw_live_…) from CHECKSHARECODE_API_KEY, and development and tests keep the sandbox key. Finish by telling me the steps that are left for me, because only I can do them. If you got the sandbox key yourself, give me its claim_url first, so the account and its keys move into mine and the free checks apply. I create a live key at https://checksharecode.co.uk/app/keys and set it as CHECKSHARECODE_API_KEY in production. Then I run the first live check with a real person's share code and date of birth, such as the next tenant's. A not found answer still shows the integration works. The first 10 live checks are free.
```

Immigration status:

```text
Add UK immigration status checks to this project using the Check Share Code API. Follow the quickstart: https://checksharecode.co.uk/docs/quickstart.md. Read my API key from the CHECKSHARECODE_API_KEY environment variable. If it isn't set, get a sandbox key yourself with POST https://api.checksharecode.co.uk/v1/agent/signup (send your name and what we are building as name and use_case), store the api_key it returns in CHECKSHARECODE_API_KEY, and give me the claim_url so I can keep the key. Test it with share code AA1AA1AA1 and date of birth 1990-01-01. AA1AA1AA1 is a sandbox test code: it only works with the sandbox key. Keep tests on the sandbox key, and never send a test code with a live key (rtw_live_…): that runs a real gov.uk check, which finds no record and still uses one of my checks. Use POST https://api.checksharecode.co.uk/v1/check/immigration-status with company_name set to our organisation's name, job_title set to the job title of the person checking, and purpose set to why we check (for example personal_finance), and store status and valid_until. The sandbox work is done when a test check answers 200 with outcome ACCEPTED. Then go live: production reads a live key (rtw_live_…) from CHECKSHARECODE_API_KEY, and development and tests keep the sandbox key. Finish by telling me the steps that are left for me, because only I can do them. If you got the sandbox key yourself, give me its claim_url first, so the account and its keys move into mine and the free checks apply. I create a live key at https://checksharecode.co.uk/app/keys and set it as CHECKSHARECODE_API_KEY in production. Then I run the first live check with a real person's share code (it starts with S) and date of birth, such as the next applicant's. A not found answer still shows the integration works. The first 10 live checks are free.
```

Driving licence:
GET /llms.txt
# Check Share Code

> Right to work, right to rent and immigration status check API for UK share codes, and driving licence checks with a DVLA or DVA check code. gov.uk has no API for these checks; POST /v1/check/right-to-work, /v1/check/right-to-rent and /v1/check/immigration-status on https://api.checksharecode.co.uk run the official checks and return the outcome, conditions, photo, reference and gov.uk PDF as JSON. The first 10 live checks are free.

Last updated: 2026-11-23

One call: `POST https://api.checksharecode.co.uk/v1/check/right-to-work` with `authorization: Bearer <key>` and a JSON body of `share_code`, `date_of_birth` (YYYY-MM-DD) and `company_name`. Keys starting `rtw_test_` return fixed sandbox answers and are free and unlimited; `rtw_live_` keys run a real gov.uk check. Sign up at https://checksharecode.co.uk/signup?ref=llms. An agent without a key can get a sandbox key itself with `POST https://api.checksharecode.co.uk/v1/agent/signup` (no auth; send its name and what it is building as `{"name": "...", "use_case": "..."}`, both required): it returns `api_key`, a `claim_url` for its user to keep the key, and `upgrade_urls`, one link a paid plan that keeps the key and goes straight to payment. With that sandbox key as the Bearer token, `POST https://api.checksharecode.co.uk/v1/agent/live-key` returns a live key, whose checks it pays for until its user claims the account: each check returns `402 QUOTA_EXCEEDED` with the `claim_url`, `upgrade_urls` and a Machine Payments Protocol (https://mpp.dev) challenge in `WWW-Authenticate`. The agent can pay £1 for the check (£2 for a driving licence check) from a card in a Link agent wallet, then send the same request again with the credential in `Payment-Authorization` and its key still in `Authorization`. It is charged only when the check answers; anything else is refunded. See https://checksharecode.co.uk/docs/agents.md#paid-checks.

## Facts

- A live check usually takes 15 to 40 seconds, because it runs the real gov.uk check. Set a 60 second timeout, or use async. Sandbox keys answer instantly and are never charged.
- The first 10 live checks are free, with no card. They are a one-off trial, not a monthly allowance.
- Pro costs £14 a month for 100 checks, then £0.25 a check; Scale £49 for 500, then £0.10; Platform £149 for 2,000, then £0.07.
- Check inputs and gov.uk pages, including the result, are kept for up to 7 days to investigate problems, then deleted automatically.
- Right to rent has its own endpoint, `POST https://api.checksharecode.co.uk/v1/check/right-to-rent`: `share_code`, `date_of_birth`, `checker_name` (the landlord or company) and `checker_type` (landlord or agent). `POST https://checksharecode.co.uk/api/check` still runs right to work checks but is deprecated.
- Immigration status has its own endpoint, `POST https://api.checksharecode.co.uk/v1/check/immigration-status`: `share_code`, `date_of_birth`, `company_name`, `job_title` and `purpose` (why you are checking, e.g. `personal_finance`). It returns gov.uk’s `status`, `valid_until` (`null` when there is no limit), `activities` and `restrictions`; `outcome` is always `ACCEPTED`.
- Driving licence has its own endpoint, `POST https://api.checksharecode.co.uk/v1/check/driving-licence`: `licence_number` (all 16 characters, or the last 8) and `check_code`, which the driver makes at gov.uk/view-driving-licence. It returns DVLA’s `driving_status`, `points`, `automatic_only`, `entitlements` and `flags`, usually takes 5 to 15 seconds, and uses 2 checks of the allowance. A check code works once: errors carry `check_code_used`, and when it is `false` the same code can be sent again.
- Client code to copy into a project, one file each with no dependencies: https://checksharecode.co.uk/clients/checksharecode.ts (TypeScript or JavaScript) and https://checksharecode.co.uk/clients/checksharecode.py (Python). Each runs every check, retries only what is safe (never a driving licence code that may have been used), polls asynchronous checks and verifies webhooks: https://checksharecode.co.uk/docs/clients.md
- The API is at `https://api.checksharecode.co.uk`, every path under `/v1`. Integrations that call `https://checksharecode.co.uk/api/...` (the same paths, with `/api` in place of `/v1`) keep working.
- Check Share Code is not affiliated with HM Government, the Home Office, DVLA or gov.uk.

## Docs

- [Overview](https://checksharecode.co.uk/docs.md): Four checks, an endpoint each.
- [Quickstart](https://checksharecode.co.uk/docs/quickstart.md): Your first check takes 10 seconds: copy the code in step 2 and run it.
- [TypeScript and Python](https://checksharecode.co.uk/docs/clients.md): One file for TypeScript or JavaScript, one for Python, with no dependencies.
- [Right to work endpoint](https://checksharecode.co.uk/docs/api/right-to-work.md): POST https://api.checksharecode.co.uk/v1/check/right-to-work checks a candidate or employee can work in the UK, on gov.uk, as their employer.
- [Right to rent endpoint](https://checksharecode.co.uk/docs/api/right-to-rent.md): POST https://api.checksharecode.co.uk/v1/check/right-to-rent checks a tenant can rent in England, on gov.uk, as a landlord or a letting agent.
- [Immigration status endpoint](https://checksharecode.co.uk/docs/api/immigration-status.md): POST https://api.checksharecode.co.uk/v1/check/immigration-status checks a person's UK immigration status on gov.uk, for a bank, lender, university, council or anyone else who needs it.
- [Driving licence endpoint](https://checksharecode.co.uk/docs/api/driving-licence.md): POST https://api.checksharecode.co.uk/v1/check/driving-licence checks a GB driving licence on DVLA's Check a driving licence service, with the check code the driver makes at gov.uk/view-driving-licence.
- [SIA licence endpoint (beta)](https://checksharecode.co.uk/docs/api/sia-licence.md): POST https://api.checksharecode.co.uk/v1/check/sia-licence looks up a Security Industry Authority (SIA) licence on the SIA's public register of licence holders, by the 16-digit number on the front of the licence card, and answers with what the register shows: the holder's name, the licence sector and role, its status and expiry, and any conditions the register makes public.
- [Responses, errors and limits](https://checksharecode.co.uk/docs/api/check.md): Every check answers with the same errors and the same limits, set out here once, with the fields each one returns.
- [Errors](https://checksharecode.co.uk/docs/errors.md): Every error code the API answers, what it means and what to do next.
- [Asynchronous checks](https://checksharecode.co.uk/docs/api/check-async.md): POST https://api.checksharecode.co.uk/v1/check/right-to-work/async, POST https://api.checksharecode.co.uk/v1/check/right-to-rent/async, POST https://api.checksharecode.co.uk/v1/check/immigration-status/async and POST https://api.checksharecode.co.uk/v1/check/driving-licence/async queue a check and answer at once with its id.
- [Webhooks](https://checksharecode.co.uk/docs/webhooks.md): When an asynchronous check ends, we post its result to your callback URL, signed with your account’s secret in the Standard Webhooks format.
- [Account and keys API](https://checksharecode.co.uk/docs/api/account.md): Everything the dashboard does, with an API key: see the account, make, roll and revoke keys, set the webhook URL, read or rotate the secret, send a test event and read each delivery, see usage, logs, billing and the team, and read the audit log of every change.
- [Moving off /api/check](https://checksharecode.co.uk/docs/guides/moving-off-api-check.md): Each check now has its own endpoint.
- [Moving to api.](https://checksharecode.co.uk/docs/guides/moving-to-api.md): The API has its own address, https://api.checksharecode.co.uk/v1.
- [Build with an agent](https://checksharecode.co.uk/docs/agents.md): Claude Code, Cursor, Copilot and ChatGPT can build right to work, right to rent, immigration status or driving licence checks for you.
- [OpenAPI 3.1 spec](https://checksharecode.co.uk/openapi.json): the full contract
- [llms-full.txt](https://checksharecode.co.uk/llms-full.txt): the whole integration in one file

## Pages

- [Right to work check API](https://checksharecode.co.uk/right-to-work-check-api.md): why gov.uk has no API, and one call instead of the form
- [Driving licence check API](https://checksharecode.co.uk/driving-licence-check-api.md): check a UK driving licence with a DVLA check code; for employers and small fleets checking drivers with no contract or signed declarations; a licence check uses 2 checks
- [Northern Ireland driving licence check API](https://checksharecode.co.uk/northern-ireland-driving-licence-check-api.md): check a Northern Ireland licence with a DVA check code at POST /v1/check/driving-licence-ni; in beta since 13 November 2026; the API reference is the driving licence page, /docs/api/driving-licence.md
- [British and Irish passport check API](https://checksharecode.co.uk/british-irish-passport-check-api.md): early access, request access on the page: right to work and right to rent checks of British and Irish passports through a certified provider registered with OfDIA (Check Share Code is not a registered digital verification service provider itself)
- [Right to rent check API](https://checksharecode.co.uk/right-to-rent-check-api.md): check a tenant’s right to rent share code, same plans as right to work
- [Immigration status check API](https://checksharecode.co.uk/immigration-status-check-api.md): check an immigration status share code for banks, lenders, universities and councils, same plans as right to work
- [All checks](https://checksharecode.co.uk/checks.md): every gov.uk check on one API
- [Pricing](https://checksharecode.co.uk/pricing.md): plans, what counts as a check, and what a month costs
- [How to check a share code](https://checksharecode.co.uk/guides/how-to-check-a-share-code.md): the five steps on gov.uk, and what to keep as evidence
- [How to check a driving licence](https://checksharecode.co.uk/guides/how-to-check-a-driving-licence.md): the five steps with a DVLA check code, and what the record shows
- [Automate right to work checks](https://checksharecode.co.uk/guides/automate-right-to-work-checks.md): what can be automated, the steps, and checking at volume
- [Which right to work check API?](https://checksharecode.co.uk/compare.md): share code APIs and registered RtW DVSPs compared: what each checks, prices and signup
- [Compared with ukrtwchecker.co.uk](https://checksharecode.co.uk/compare/ukrtwchecker.md): prices, test mode, response format and right to rent cover
- [Gig and agency workers from 1 October 2026](https://checksharecode.co.uk/right-to-work-checks-gig-agency-workers.md): who the extended duty covers: online matching platforms, contractor chains and worker contracts
- [Quickstart in Node.js](https://checksharecode.co.uk/tutorials/quickstart-node.md): a right to work check from Node.js: authentication, the request and the response
- [Quickstart in Python](https://checksharecode.co.uk/tutorials/quickstart-python.md): a right to work check from Python: authentication, the request and the response
- [Handling errors](https://checksharecode.co.uk/tutorials/handling-errors.md): every error `code` and what to do
- [Quota and billing](https://checksharecode.co.uk/tutorials/quota-and-billing.md): monthly quotas, rate limits and going over

How these docs are written

  • Same words, two formats. Each page is written once. The HTML and the Markdown come from the same source, so they never drift.
  • Complete on its own. Each page names the base URL, the auth header and a working example, so an agent that reads one page can still make a call.
  • Errors that say what to do. Every error has a stable code and a message with the next step. A 402 includes the upgrade_url.
  • Real test data. Sandbox test codes give an agent every outcome to write handling for, without using a check.