> ## Documentation Index
> Fetch the complete documentation index at: https://developer.sandbox.co.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate EVC

> Send an Aadhaar OTP or an electronic verification code (EVC) to e-verify a filed income tax return.

Choose `verification_mode`:

| Value | What the taxpayer receives |
| :- | :- |
| `aadhaar` | An OTP on the mobile number linked with Aadhaar |
| `bank` | An EVC through their pre-validated, EVC-enabled bank account |
| `demat` | An EVC through their pre-validated, EVC-enabled demat account |

Then call [Validate EVC](https://developer.sandbox.co.in/api-reference/it/compliance/eri/itr/endpoints/validate-evc.md) with the OTP or EVC and the same `verification_mode`. For `aadhaar`, also send `data.transactionId`.


## OpenAPI

````yaml api-reference/it/compliance/openapi.json POST /it/compliance/eri/tax-payers/{tax_payer_id}/itrs/e-verify/otp
openapi: 3.1.0
info:
  title: in-co-sandbox-it-compliance
  version: '1.0'
servers:
  - url: https://test-api.sandbox.co.in
    description: test
  - url: https://api.sandbox.co.in
    description: prod
security:
  - {}
paths:
  /it/compliance/eri/tax-payers/{tax_payer_id}/itrs/e-verify/otp:
    post:
      tags:
        - in.gov.incometax.eri
        - tax-payer
        - itr
      summary: Generate EVC
      description: >-
        Start e-verifying a filed return. The e-Filing portal sends the taxpayer
        an Aadhaar OTP or an electronic verification code (EVC), depending on
        `verification_mode`.


        Pass the OTP or EVC to Validate EVC. For `aadhaar`, also pass
        `data.transactionId`.


        The API returns HTTP 200 even when the e-Filing portal rejects the
        request, so check `data.successFlag`. Example data is fictional.
      operationId: generateEvc
      parameters:
        - name: tax_payer_id
          in: path
          description: PAN of the taxpayer.
          required: true
          example: ABCPS1234K
          schema:
            type: string
            pattern: ^[A-Z]{5}[0-9]{4}[A-Z]$
        - name: assessment_year
          in: query
          description: Assessment year as a 4-digit year, such as `2026` for AY 2026-27.
          required: true
          example: '2026'
          schema:
            type: string
            pattern: ^[0-9]{4}$
        - name: form_code
          in: query
          description: Number of the ITR form, such as `1` for ITR-1 or `4` for ITR-4.
          required: true
          example: '1'
          schema:
            type: string
            pattern: ^[1-7]$
        - name: verification_mode
          in: query
          description: >-
            Verification method: `aadhaar` for an OTP to the mobile number
            linked with Aadhaar, or `bank` or `demat` for an EVC through the
            taxpayer's EVC-enabled bank or demat account.
          required: true
          example: aadhaar
          schema:
            type: string
            enum:
              - aadhaar
              - bank
              - demat
        - name: acknowledgement_number
          in: query
          description: >-
            Acknowledgement number of the submitted return. Submit ITR returns
            it as `data.arnNumber`.
          required: true
          example: '123456789150726'
          schema:
            type: string
            pattern: ^[0-9]{15}$
        - name: Authorization
          in: header
          description: >-
            Sandbox access token. Send the token without the `Bearer` prefix.
            For token-generation steps, see the [Quickstart
            guide](https://developer.sandbox.co.in/guides/get-started/quickstart).
          required: true
          example: '{{access_token}}'
          schema:
            type: string
        - name: x-api-key
          in: header
          description: Sandbox API key.
          required: true
          example: '{{api_key}}'
          schema:
            type: string
      responses:
        '200':
          description: >-
            The e-Filing portal processed the request. When `data.successFlag`
            is `true`, the OTP or EVC is sent.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: HTTP status code.
                    examples:
                      - 200
                  timestamp:
                    type: integer
                    format: int64
                    description: Response timestamp in epoch milliseconds.
                    examples:
                      - 1793700000000
                  transaction_id:
                    type: string
                    description: Unique identifier for this API request.
                    examples:
                      - 8d3f6a2e-1b4c-4e7a-9f05-6c2b8e1d4a73
                  data:
                    type: object
                    description: Response from the e-Filing portal.
                    properties:
                      httpStatus:
                        type: string
                        description: >-
                          Status from the e-Filing portal, such as `ACCEPTED`,
                          `SUBMITTED` or `REJECTED`.
                      successFlag:
                        type: boolean
                        description: '`true` when the e-Filing portal accepted the request.'
                      messages:
                        type: array
                        description: Messages from the e-Filing portal.
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                              description: e-Filing portal message code, such as `EF40010`.
                            type:
                              type: string
                              description: >-
                                Message type, such as `REMARK`, `INFO` or
                                `ERROR`.
                            desc:
                              type: string
                              description: Message text.
                            fieldName:
                              type:
                                - string
                                - 'null'
                              description: Field the message refers to, if any.
                      errors:
                        type: array
                        description: Errors and warnings from the e-Filing portal.
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                              description: e-Filing portal message code, such as `EF40010`.
                            type:
                              type: string
                              description: >-
                                Message type, such as `REMARK`, `INFO` or
                                `ERROR`.
                            desc:
                              type: string
                              description: Message text.
                            fieldName:
                              type:
                                - string
                                - 'null'
                              description: Field the message refers to, if any.
                      transactionId:
                        type: string
                        description: >-
                          Identifier of the Aadhaar OTP. Pass it to Validate EVC
                          as `transaction_id`.
                required:
                  - code
                  - timestamp
                  - transaction_id
                  - data
              examples:
                OTP sent:
                  summary: OTP sent
                  description: Fictional example data.
                  value:
                    code: 200
                    timestamp: 1793700000000
                    transaction_id: 05865cca-d6c4-53af-ab29-f380c7517ece
                    data:
                      messages: []
                      errors: []
                      transactionId: '1793700000000:482913'
                      successFlag: true
                EVC not enabled:
                  summary: EVC not enabled
                  description: Fictional example data.
                  value:
                    code: 200
                    timestamp: 1793700000000
                    transaction_id: fea9b76c-fd05-5aa0-b63f-2f9c872aed8d
                    data:
                      messages:
                        - code: EF00104
                          fieldName: null
                          type: ERROR
                          desc: >-
                            To generate EVC, you need to validate and enable EVC
                            on your demat account.
                      errors: []
                      successFlag: false
        '400':
          description: >-
            The e-Filing portal rejected the request as invalid, or a required
            parameter is missing.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: HTTP status code.
                  timestamp:
                    type: integer
                    format: int64
                    description: Response timestamp in epoch milliseconds.
                  transaction_id:
                    type: string
                    description: Unique identifier for this API request.
                  message:
                    type: string
                    description: Reason for the error.
                required:
                  - code
                  - timestamp
                  - transaction_id
                  - message
              examples:
                Portal rejected the request:
                  summary: Portal rejected the request
                  description: Fictional example data.
                  value:
                    code: 400
                    timestamp: 1793700000000
                    transaction_id: 0ecb26b4-41c4-5613-9d15-307a3770eab8
                    message: Failed to generate EVC
        '401':
          description: The `Authorization` header is missing.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: HTTP status code.
                  timestamp:
                    type: integer
                    format: int64
                    description: Response timestamp in epoch milliseconds.
                  transaction_id:
                    type: string
                    description: Unique identifier for this API request.
                  message:
                    type: string
                    description: Reason for the error.
                required:
                  - code
                  - timestamp
                  - transaction_id
                  - message
              examples:
                Missing Sandbox access token:
                  summary: Missing Sandbox access token
                  description: Fictional example data.
                  value:
                    code: 401
                    timestamp: 1793700000000
                    transaction_id: fa8f2857-1652-5482-a005-9942608749c1
                    message: Unauthorized
        '403':
          description: The Sandbox access token or API key is invalid or expired.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: HTTP status code.
                  timestamp:
                    type: integer
                    format: int64
                    description: Response timestamp in epoch milliseconds.
                  transaction_id:
                    type: string
                    description: Unique identifier for this API request.
                  message:
                    type: string
                    description: Reason for the error.
                required:
                  - code
                  - timestamp
                  - transaction_id
                  - message
              examples:
                Forbidden:
                  summary: Forbidden
                  description: Fictional example data.
                  value:
                    code: 403
                    timestamp: 1793700000000
                    transaction_id: ec05c6e4-d22b-57e9-bbe9-4554a93482f9
                    message: Forbidden
        '429':
          description: The rate limit is exceeded. Retry after some time.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: HTTP status code.
                  timestamp:
                    type: integer
                    format: int64
                    description: Response timestamp in epoch milliseconds.
                  transaction_id:
                    type: string
                    description: Unique identifier for this API request.
                  message:
                    type: string
                    description: Reason for the error.
                required:
                  - code
                  - timestamp
                  - transaction_id
                  - message
        '500':
          description: >-
            Sandbox could not complete the request, or could not open a session
            with the e-Filing portal. Retry after some time.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: HTTP status code.
                  timestamp:
                    type: integer
                    format: int64
                    description: Response timestamp in epoch milliseconds.
                  transaction_id:
                    type: string
                    description: Unique identifier for this API request.
                  message:
                    type: string
                    description: Reason for the error.
                required:
                  - code
                  - timestamp
                  - transaction_id
                  - message
              examples:
                Session unavailable:
                  summary: Session unavailable
                  description: Fictional example data.
                  value:
                    code: 500
                    timestamp: 1793700000000
                    transaction_id: a164be96-2955-5481-a1e6-68a53070c4c9
                    message: >-
                      Unable to connect to the tax department. Please try again
                      shortly.
                Internal server error:
                  summary: Internal server error
                  description: Fictional example data.
                  value:
                    code: 500
                    timestamp: 1793700000000
                    transaction_id: cb1f8426-79b3-52aa-8e10-094cc1b0f854
                    message: Internal Server Error
        '503':
          description: The e-Filing portal is unavailable. Retry after some time.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: HTTP status code.
                  timestamp:
                    type: integer
                    format: int64
                    description: Response timestamp in epoch milliseconds.
                  transaction_id:
                    type: string
                    description: Unique identifier for this API request.
                  message:
                    type: string
                    description: Reason for the error.
                required:
                  - code
                  - timestamp
                  - transaction_id
                  - message
              examples:
                Portal unavailable:
                  summary: Portal unavailable
                  description: Fictional example data.
                  value:
                    code: 503
                    timestamp: 1793700000000
                    transaction_id: 92bfb935-9023-5f32-9f3f-3627c8a1dd60
                    message: Failed to generate EVC
      deprecated: false

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.