> ## Client identification
>
> Requests to this API should include a `Client-Platform` header alongside
> `Authorization`, identifying the application, tool, or model making the
> request. This is used for integration support and analytics.
>
> Use your model or tool name, for example `claude-code` or `chatgpt`.
>
> Example:
>
> ```bash
> curl https://api.salaryboxapp.com/... \
>   -H "Authorization: Api-Key <api-key>" \
>   -H "Client-Platform: claude-code"
> ```

# Verify New Staff

POST https://api.salaryboxapp.com/v2/customer/v1/verification/new-staff
Content-Type: application/json

**This call is charged from the SalaryBox Wallet on the FIRST call for a phone number. You must send `confirm_charge: true`.** Without it you get `400` with the current fee and nothing is charged. Calling it again for the same phone number is not charged again.

Verifies someone who is not staff yet, before you add them. The flow has 3 steps, as in the app's Add Staff with verification:

1. Verify New Staff (this call) with the person's phone number and IDs. The first call is charged and looks up the phone number and the IDs you sent.
2. Read the result: `ready_to_add`, the ID statuses and issues, and the `name` and `dob` the government records show. Fetch New Staff Verification returns it again, free.
3. Add Verified Staff to add them. Adding closes the check, and the staff member then shows in Staff Verification as pending review (an admin marks them verified in the SalaryBox app).

Shared rules: see [Writing data](/conventions#writing-data).

- `confirm_charge` must be exactly `true`, or you get `400` "Set confirm_charge to true: this check is paid for from the SalaryBox Wallet."
- `phone_number` is required, digits only. `dial_code` is digits only and defaults to `91`. Indian numbers are 10 digits starting with 6, 7, 8 or 9. An Indian plan can't verify numbers outside India.
- `pan`, `driving_license`, `voter_id` and `uan` are optional and follow the same format rules as Verify Staff Again, with errors under the field you sent. Send `dob` for the driving license lookup.
- Calling it again for the same phone number is not charged again: IDs that changed are looked up within the same check, and an interrupted check is finished. If `ready_to_add` is `false`, send it again.
- A phone number that is already staff (or an admin) in your company is refused with `400`: use Verify Staff for them.
- If the plan's staff limit is reached you get `400`. This is checked before charging, so nobody is paid for who can't be added.
- The call runs synchronously and can take several seconds.
- If the wallet balance is too low you get `402`. If the wallet can't be charged right now you get `502` and nothing is charged.
- The result is the same object Fetch New Staff Verification returns. Marking them verified is done in the SalaryBox app, not in this API.
- Needs the Background Verification feature on your plan, else `403` with the plan upgrade message.


Reference: https://docs.salarybox.in/api-reference/staff-verification/verification-new-staff-verify

## Authentication

- `Authorization` header (required) (prefixed with ` Api-Key   `) — Format: "Api-Key \{api-key}"

## Request

### Body (application/json)

This endpoint expects a NewStaffVerificationVerifyRequest.

- `confirm_charge` (boolean, required) — Must be exactly `true`. Confirms that this check is paid for from the SalaryBox Wallet (on the first call for a phone number).
- `phone_number` (string, required) — Digits only. Indian numbers are 10 digits starting with 6, 7, 8 or 9. An Indian plan can't verify numbers outside India.
- `dial_code` (string, optional) — Digits only. Defaults to `91`.
- `pan` (string, optional) — Format `ABCDE1234F` (upper-cased for you).
- `driving_license` (string, optional) — 2 letters then 13 digits, for example `MH1420110012345` (upper-cased for you).
- `voter_id` (string, optional) — 3 letters then 7 digits, for example `ABC1234567` (upper-cased for you).
- `uan` (string, optional) — 12 digits, starting with 1-9.
- `dob` (date, optional) — Date of birth, `YYYY-MM-DD`, for the driving license lookup.

## Response

### 200

The check was done. `data` is the new staff verification result.

- `message` (string, required)
- `status` (boolean, required)
- `data` (NewStaffVerificationResult, required) — The verification result for a phone number that is not staff yet. Returned by Fetch New Staff Verification and Verify New Staff.

## Errors

### 400 Bad Request Error

Validation failed, the phone number is already staff (or an admin), or the plan's staff limit has been reached.

- `message` (string, required)
- `status` (boolean, required)
- `errors` (map from string to any, optional, nullable)

### 402 Payment Required Error

The SalaryBox Wallet balance is too low for this check. Nothing was charged. `errors` shows the balance, the amount required and the shortfall.

- `message` (string, required)
- `status` (boolean, required)
- `errors` (map from string to any, optional, nullable)

### 403 Forbidden Error

Your company has no active subscription.

- `message` (string, required)
- `status` (boolean, required)
- `errors` (map from string to any, optional, nullable)

### 502 Bad Gateway Error

The wallet couldn't be charged right now. Nothing was charged; try again later.

- `message` (string, required)
- `status` (boolean, required)
- `errors` (map from string to any, optional, nullable)

## Types

### NewStaffVerificationResult

The verification result for a phone number that is not staff yet. Returned by Fetch New Staff Verification and Verify New Staff.

- `dial_code` (string, required)
- `phone_number` (string, required) — Masked: all but the last 4 characters are `X`.
- `ready_to_add` (boolean, required) — `true` once the lookups have finished. `false` means the check was paid for but hasn't finished: send Verify New Staff again (not charged again).
- `ids` (list of StaffVerificationId, required) — One entry per government ID checked.
- `issues` (list of StaffVerificationIssue, required) — Problems for an admin to review.
- `name` (string, optional, nullable) — What the government records show (or what was entered), to use when adding the person. May be `null`.
- `dob` (date, optional, nullable) — Date of birth the government records show. May be `null`.

### StaffVerificationId

- `id_type` (enum, optional)
  - Allowed values: `pan`, `driving_license`, `voter_id`, `uan`
- `number` (string, optional) — Masked: all but the last 4 characters are `X`.
- `status` (enum, optional) — `valid`, `invalid` (government records say the ID is wrong) or `not_fetched` (the lookup couldn't be completed).
  - Allowed values: `valid`, `invalid`, `not_fetched`
- `retry_available` (boolean, optional)
- `name` (string, optional, nullable) — Name on the ID, when the lookup returned one.
- `dob` (date, optional, nullable) — Date of birth on the ID, when the lookup returned one.

### StaffVerificationIssue

- `type` (enum, optional) — `invalid_id`; `name_mismatch` / `dob_mismatch` (the IDs disagree); `profile_name_mismatch` / `profile_dob_mismatch` (the profile differs from the IDs); `excel_name_mismatch` / `excel_dob_mismatch` / `excel_pan_mismatch` / `excel_uan_mismatch` (a bulk upload row differs).
  - Allowed values: `invalid_id`, `name_mismatch`, `dob_mismatch`, `profile_name_mismatch`, `profile_dob_mismatch`, `excel_name_mismatch`, `excel_dob_mismatch`, `excel_pan_mismatch`, `excel_uan_mismatch`
- `field` (string, optional)
- `id_types` (list of string, optional)
- `values` (map from string to string, optional) — Maps each source to what it shows (ID numbers masked).
- `resolved` (boolean, optional) — `true` once an admin settled it in the app.

## Examples

**Request**

```json
{
  "confirm_charge": true,
  "phone_number": "9876549999",
  "pan": "ABCDE1234F"
}
```

**Response**

```json
{
  "message": "Verification done",
  "status": true,
  "data": {
    "dial_code": "91",
    "phone_number": "XXXXXX9999",
    "ready_to_add": true,
    "ids": [
      {
        "id_type": "pan",
        "number": "XXXXXX234F",
        "status": "valid",
        "retry_available": false,
        "name": "RAVI KUMAR",
        "dob": "1994-06-12"
      }
    ],
    "issues": [],
    "name": "RAVI KUMAR",
    "dob": "1994-06-12"
  }
}
```

**SDK Code**

```python Example
import requests

url = "https://api.salaryboxapp.com/v2/customer/v1/verification/new-staff"

payload = {
    "confirm_charge": True,
    "phone_number": "9876549999",
    "pan": "ABCDE1234F"
}
headers = {
    "Authorization": "Api-Key  <apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Example
const url = 'https://api.salaryboxapp.com/v2/customer/v1/verification/new-staff';
const options = {
  method: 'POST',
  headers: {Authorization: 'Api-Key  <apiKey>', 'Content-Type': 'application/json'},
  body: '{"confirm_charge":true,"phone_number":"9876549999","pan":"ABCDE1234F"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.salaryboxapp.com/v2/customer/v1/verification/new-staff"

	payload := strings.NewReader("{\n  \"confirm_charge\": true,\n  \"phone_number\": \"9876549999\",\n  \"pan\": \"ABCDE1234F\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Api-Key  <apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Example
require 'uri'
require 'net/http'

url = URI("https://api.salaryboxapp.com/v2/customer/v1/verification/new-staff")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Api-Key  <apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"confirm_charge\": true,\n  \"phone_number\": \"9876549999\",\n  \"pan\": \"ABCDE1234F\"\n}"

response = http.request(request)
puts response.read_body
```

```java Example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.salaryboxapp.com/v2/customer/v1/verification/new-staff")
  .header("Authorization", "Api-Key  <apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"confirm_charge\": true,\n  \"phone_number\": \"9876549999\",\n  \"pan\": \"ABCDE1234F\"\n}")
  .asString();
```

```php Example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.salaryboxapp.com/v2/customer/v1/verification/new-staff', [
  'body' => '{
  "confirm_charge": true,
  "phone_number": "9876549999",
  "pan": "ABCDE1234F"
}',
  'headers' => [
    'Authorization' => 'Api-Key  <apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Example
using RestSharp;

var client = new RestClient("https://api.salaryboxapp.com/v2/customer/v1/verification/new-staff");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Api-Key  <apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"confirm_charge\": true,\n  \"phone_number\": \"9876549999\",\n  \"pan\": \"ABCDE1234F\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Example
import Foundation

let headers = [
  "Authorization": "Api-Key  <apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "confirm_charge": true,
  "phone_number": "9876549999",
  "pan": "ABCDE1234F"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.salaryboxapp.com/v2/customer/v1/verification/new-staff")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```