Skip to main content
POST
Generate OTP
Prefill data is the information the e-Filing portal holds for the taxpayer, such as their personal details. Use it to prepare the ITR JSON.
  1. Call Generate OTP with the PAN, assessment_year and source.
  2. Ask the taxpayer for the OTPs the e-Filing portal sends them.
  3. Call Verify OTP with the OTPs, data.smsTransactionId and data.emailTransactionId.

Headers

Authorization
string
required

Sandbox access token. Send the token without the Bearer prefix. For token-generation steps, see the Quickstart guide.

x-api-key
string
required

Sandbox API key.

Path Parameters

tax_payer_id
string
required

PAN of the taxpayer.

Pattern: ^[A-Z]{5}[0-9]{4}[A-Z]$

Query Parameters

assessment_year
string
required

Assessment year as a 4-digit year, such as 2026 for AY 2026-27.

Pattern: ^[0-9]{4}$
source
enum<string>
required

Where the OTPs are sent: itd to the mobile number and email registered on the e-Filing portal, or aadhaar to the mobile number linked with the taxpayer's Aadhaar.

Available options:
itd,
aadhaar

Response

The e-Filing portal processed the request. When data.successFlag is true, the OTPs are sent.

code
integer
required

HTTP status code.

Example:

200

timestamp
integer<int64>
required

Response timestamp in epoch milliseconds.

Example:

1793700000000

transaction_id
string
required

Unique identifier for this API request.

Example:

"8d3f6a2e-1b4c-4e7a-9f05-6c2b8e1d4a73"

data
object
required

Response from the e-Filing portal.