Register new individual KRA PINs through the developer.go.ke API. This endpoint supports individual taxpayer registration using National ID, Passport, or other identification documents.
| Scope | Description |
|---|---|
kra:registration |
Register new KRA PINs for individual taxpayers |
| Method | Endpoint | KRA Path | Description |
|---|---|---|---|
POST |
/api/kra/registration/pin |
/v1/generate/pin |
Register an individual KRA PIN |
Note: This endpoint is for individual taxpayers only. Company/non-individual PIN registration requires a different process through the KRA portal.
Submit an individual PIN registration request to KRA.
Endpoint: POST /api/kra/registration/pin
Required Scope: kra:registration
Request Body:
You can submit fields in either flat or nested format. Salami wraps flat fields inside TAXPAYERDETAILS automatically.
{
"TaxpayerType": "1",
"IdentificationNumber": "12345678",
"DateOfBirth": "1990-05-15",
"MobileNumber": "0712345678",
"EmailAddress": "john.doe@example.com",
"IsPinWithNoOblig": "Y"
}
{
"TAXPAYERDETAILS": {
"TaxpayerType": "1",
"IdentificationNumber": "12345678",
"DateOfBirth": "1990-05-15",
"MobileNumber": "0712345678",
"EmailAddress": "john.doe@example.com",
"IsPinWithNoOblig": "Y"
}
}
| Field | Type | Required | Description |
|---|---|---|---|
TaxpayerType |
string | Yes | ID document type code (see table below) |
IdentificationNumber |
string | Yes | ID document number |
DateOfBirth |
string | Yes | Date of birth (YYYY-MM-DD) |
MobileNumber |
string | Yes | Mobile phone number (Kenyan format) |
EmailAddress |
string | Yes | Email address |
IsPinWithNoOblig |
string | Yes | Y for PIN with no obligations, N otherwise |
Request:
curl -X POST \
https://yourtenant.salami.dgl.co.ke/api/kra/registration/pin \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"TaxpayerType": "1",
"IdentificationNumber": "12345678",
"DateOfBirth": "1990-05-15",
"MobileNumber": "0712345678",
"EmailAddress": "john.doe@example.com",
"IsPinWithNoOblig": "Y"
}'
Success Response:
{
"success": true,
"data": {
"KRAPIN": "A001234567B",
"TaxpayerName": "JOHN DOE SMITH",
"IdentificationType": "National ID",
"IdentificationNumber": "12345678",
"Status": "Registered",
"RegistrationDate": "2026-03-29",
"StationName": "NAIROBI",
"Message": "PIN registered successfully. An SMS has been sent to the registered mobile number."
},
"message": "KRA PIN registered successfully"
}
Duplicate Response (already registered):
{
"success": false,
"message": "KRA API error: A PIN already exists for this identification number",
"error": "kra_error",
"kra_response": {
"ExistingPIN": "A001234567B"
}
}
| Field | Type | Description |
|---|---|---|
KRAPIN |
string | Newly generated KRA PIN |
TaxpayerName |
string | Name as registered (from IPRS/ID system) |
IdentificationType |
string | Type of ID used |
IdentificationNumber |
string | The ID number submitted |
Status |
string | Registered or Failed |
RegistrationDate |
string | Date of registration |
StationName |
string | Assigned KRA station |
Message |
string | Additional information from KRA |
| Code | Description | ID Number Format |
|---|---|---|
1 |
National ID | 7-8 digit number (e.g., 12345678) |
2 |
Passport | Alphanumeric (e.g., AB123456) |
3 |
Service/Military ID | Variable format |
4 |
Alien ID | Variable format |
| Taxpayer Type | Format | Example |
|---|---|---|
| National ID | 7-8 digits | 12345678 |
| Passport | Letters + digits | AB123456 |
| Service ID | Variable | SVC001234 |
| Alien ID | Variable | ALN001234 |
YYYY-MM-DD1990-05-1507XXXXXXXX or 01XXXXXXXX (10 digits)254712345678john.doe@example.com| Value | Description | Use Case |
|---|---|---|
Y |
Register PIN with no tax obligations | Personal use, students, employment-only |
N |
Register PIN with tax obligations | Business registration, self-employment |
Tip: Use
Yfor individuals who need a PIN only for identification purposes (e.g., opening a bank account, KRA agent registration). UseNwhen the individual will be filing tax returns.
| Scenario | TaxpayerType | IsPinWithNoOblig |
|---|---|---|
| Employee needing PIN | 1 (National ID) |
Y |
| Self-employed person | 1 (National ID) |
N |
| Foreign national (employed) | 2 (Passport) |
Y |
| Foreign national (business) | 2 (Passport) |
N |
| Military personnel | 3 (Service ID) |
Y |
Company, partnership, trust, and other non-individual registrations must be done through the KRA portal at itax.kra.go.ke.
{
"success": false,
"message": "Required fields missing: TAXPAYERDETAILS.TaxpayerType, TAXPAYERDETAILS.IdentificationNumber, TAXPAYERDETAILS.DateOfBirth, TAXPAYERDETAILS.MobileNumber, TAXPAYERDETAILS.EmailAddress, TAXPAYERDETAILS.IsPinWithNoOblig",
"error": "validation_error"
}
| Code | Description |
|---|---|
200 |
PIN registered successfully |
401 |
Invalid or missing Salami token |
403 |
Token lacks kra:registration scope |
422 |
Missing required fields or validation error |
409 |
PIN already exists for this ID number |
502 |
KRA server error or timeout |
Back to: KRA Overview | KRA Returns