Logo

UK Share Code

API

Getting Started

Endpoints

Responses

Testing

Getting Started

Signing Up

Every request must include an API key. Obtain one by signing up on the sign up page.

Authentication

Pass your API key as the value of the following HTTP header with every request:

X-UKRTWAPI-SECRET: <your-api-key>

Base URL

All endpoints are relative to:

https://app.ukrtwchecker.co.uk

Any HTTP library works. See the code panel on the right for ready-to-run samples in Python, Node, Java, Go, cURL, and more. Send check parameters as a JSON body with Content-Type: application/json. GET requests with query-string parameters are also accepted for backwards compatibility, but POST is recommended to avoid PII appearing in server logs and URLs.

Endpoints

/rtr

POST/rtr

Validate an applicant's Right to Rent in the UK.

Parameters

codeRequired

The applicant's Share Code (8–11 chars, letters + numbers, starts with 'R').

dobRequired

Date of birth in dd-mm-yyyy format.

forenameRequired

The applicant's first name(s).

surnameRequired

The applicant's surname(s).

checker_typeRequired

Set to 'landlord' or 'agent'.

checker_nameRequired

Your name (if landlord) or company name (if agent).

include_imageOptional

Return a base64-encoded applicant image. Default: false.

/rtw and /v2/rtw

POST/rtw

Validate an applicant's Right to Work in the UK. /v2/rtw returns additional structured fields.

Parameters

codeRequired

Share Code (8–11 chars, starts with 'W').

dobRequired

Date of birth in dd-mm-yyyy format.

forenameRequired

The applicant's first name(s).

surnameRequired

The applicant's surname(s).

company_nameRequired

Your company name — required by the government for auditing.

allow_sponsorshipOptional

Accept or reject applicants requiring sponsorship. Default: true.

allow_studentOptional

Accept or reject applicants on student visas. Default: true.

include_imageOptional

Return a base64-encoded applicant image. Default: false.

include_pdfOptional

Return the official PDF report as a base64 string. Default: false.

/immigration

beta
POST/immigration

Validate an individual's immigration status. Currently in beta.

Parameters

codeRequired

Share Code (8–11 chars, starts with 'S').

dobRequired

Date of birth in dd-mm-yyyy format.

forenameRequired

The individual's first name(s).

surnameRequired

The individual's surname(s).

company_nameRequired

Your company name — required for audit purposes.

checker_job_titleRequired

Job title of the person conducting the check, e.g. 'HR Manager'.

check_reasonRequired

Reason for the check. Must be one of:

DRIVING_LICENCEEligibility for a driving licence
LOANEligibility for a student loan
EDUCATION_OR_TRAININGEligibility for education or training
TRAVELEligibility for travel
HEALTH_INSURANCE_CARDEligibility for a health insurance card
PERSONAL_FINANCEPersonal finance (bank accounts, loans, credit cards, mortgages)
HOMELESSNESS_ASSISTANCE_OR_COUNCIL_HOUSINGHomelessness assistance or council housing
OTHERAnother reason (requires check_reason_other)
check_reason_otherOptional

Free-text reason — required only when check_reason is set to OTHER.

include_imageOptional

Return a base64-encoded applicant image. Default: false.

include_pdfOptional

Return the official immigration PDF as a base64 string. Default: false.

/usage

GET/usage

Returns how many checks you have performed in the current billing period. Only available on subscription plans.

/credit_pack

GET/credit_pack

Returns all active credit packs associated with your account.

Responses

API Response Object

The top-level response wraps a status object with the following fields:

outcome

Overall result of the verification check.

ACCEPTEDRight to Work/Rent verified — all configured conditions satisfied.
REJECTEDRight to Work/Rent not verified — code found but failed configured conditions.
NOT_FOUNDShare code is not valid.
SHARE_CODE_LOCKEDShare code is locked (too many recent checks). Usually resolves after ~10 minutes.
SHARE_CODE_EXPIREDShare code was valid but has expired.
govuk_check_details

The check date, company name, and gov.uk reference number.

conditions

Work conditions and restrictions (e.g. hours per week, restricted industries).

details

A human-readable summary of the check.

name

The applicant's full name as it appears on the government record.

start_date

When the right to work/rent is valid from (dd-mm-yyyy).

expiry_date

When the right to work/rent expires (dd-mm-yyyy).

image

The applicant's photo, base64-encoded. Only present when include_image=true.

rejected_reason

Present when the check is rejected due to a configured parameter filter.

SPONSORSHIPApplicant requires sponsorship and the check was configured to reject such applicants.
STUDENTApplicant has a student visa and the check was configured to reject student visa holders.
title

Label for the type of check (e.g. "Right to Work", "Right to Rent").

Testing

Test Codes

Use these special share codes to test your integration without consuming quota. Optional parameters (e.g. include_image) apply in test mode too.

TEST_ACCEPTED

/rtw, /v2/rtw, /rtr, /immigration

Mock a valid share code.

TEST_NOT_FOUND

/rtw, /v2/rtw, /rtr, /immigration

Mock an invalid share code (not found).

TEST_NAME_MISMATCH

/rtw, /v2/rtw, /rtr, /immigration

Mock a valid code where the name does not match.

TEST_SPONSOR

/rtw, /v2/rtw

Mock a valid code for an applicant requiring sponsorship. Useful for testing allow_sponsorship.

TEST_STUDENT

/rtw, /v2/rtw

Mock a valid code for a student visa holder. Useful for testing allow_student.

TEST_EXPIRED

/rtw, /v2/rtw, /rtr

Mock a valid but expired share code.

TEST_LOCKED

/rtw, /v2/rtw, /rtr, /immigration

Mock a locked share code.

Language

Endpoint

Request

import requests

response = requests.post(
    "https://app.ukrtwchecker.co.uk/rtw",
    headers={"X-UKRTWAPI-SECRET": "YOUR_API_KEY"},
    json={
        "code": "TEST_ACCEPTED",
        "forename": "John",
        "surname": "Doe",
        "dob": "07-09-1999",
        "company_name": "UK RTW Checker Ltd.",
        "allow_student": "true",
        "allow_sponsorship": "true",
    },
)
print(response.json())

Response

{
    "code": 200,
    "status": {
        "conditions": "N/A",
        "govuk_check_details": {
            "check_date": "16 June 2025",
            "company_name": "UK Share Code API",
            "reference_number": "WE-G98V497-OI"
        },
        "details": "They have permission to work in the UK until 30 March 2028",
        "expiry_date": "30/03/2028",
        "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD
                    +wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII",
        "pdf": "JVBERi0xLjEKMSAwIG9iajw8IC9UeXBlL0NhdGFsb2cvUGFnZXMgMiAwIFI+PmVu
                ZG9iagoyIDAgb2JqPDwgL1R5cGUvUGFnZXMvS2lkc1szIDAgUl0vQ291bnQgMT4+
                ZW5kb2JqCjMgMCBvYmo8PCAvVHlwZS9QYWdlL1BhcmVudCAyIDAgUi9NZWRpYUJv
                eFswIDAgMSAxXS9Db250ZW50cyA0IDAgUj4+ZW5kb2JqCjQgMCBvYmo8PCAvTGVu
                Z3RoIDA+PnN0cmVhbQplbmRzdHJlYW0KZW5kb2JqCnhyZWYKMCA1CjAwMDAwMDAw
                MDAgNjU1MzUgZiAKMDAwMDAwMDAwOSAwMDAwMCBuIAowMDAwMDAwMDUzIDAwMDAw
                IG4gCjAwMDAwMDAxMDMgMDAwMDAgbiAKMDAwMDAwMDE3OCAwMDAwMCBuIAp0cmFp
                bGVyPDwgL1Jvb3QgMSAwIFIgL1NpemUgNT4+CnN0YXJ0eHJlZgoyMjMKJSVFT0YK
                ",
        "name": "JOHN DOE",
        "outcome": "ACCEPTED",
        "start_date": "08/02/2025",
        "title": "Right to work"
    }}

Quick Links

Get StartedContact UsPrivacy PolicyTerms of ServiceCookies
UK Share Code API Logo

UK Share Code

API

© 2026 UK Share Code API. All rights reserved.

Get in Touch

LinkedIncontact@ukrtwchecker.co.uk+44 740 467 2447