> ## 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.

# Add client

> Send an OTP to add a taxpayer who has an e-Filing account as your client.

Use Add client for a taxpayer who has an e-Filing account. For a taxpayer without one, use [Register client](https://developer.sandbox.co.in/api-reference/it/compliance/eri/client/endpoints/register-client.md).

1. Call Add client with the PAN, the taxpayer's date of birth and `source`.
2. Ask the taxpayer for the OTP the e-Filing portal sends them.
3. Call [Verify add client OTP](https://developer.sandbox.co.in/api-reference/it/compliance/eri/client/endpoints/verify-add-client-otp.md) with the OTP, `data.transactionId` and the same `source`.

The API returns HTTP 200 even when the e-Filing portal rejects the request. See [Read the response](https://developer.sandbox.co.in/api-reference/it/compliance/overview.md#read-the-response).


## OpenAPI

````yaml api-reference/it/compliance/openapi.json POST /it/compliance/eri/tax-payers/{tax_payer_id}/client/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}/client/otp:
    post:
      tags:
        - in.gov.incometax.eri
        - client
      summary: Add client
      description: >-
        Start adding a taxpayer who has an e-Filing account as your client. The
        e-Filing portal sends an OTP to the taxpayer.


        Pass `data.transactionId` and the OTP to Verify add client OTP to finish
        adding the client. For a taxpayer without an e-Filing account, use
        Register client instead.


        The API returns HTTP 200 even when the e-Filing portal rejects the
        request, so check `data.successFlag`. Example data is fictional.
      operationId: addClient
      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: dob
          in: query
          description: >-
            Taxpayer's date of birth in `DD/MM/YYYY` format, as recorded by the
            Income Tax Department.
          required: true
          example: 15/08/1990
          schema:
            type: string
            pattern: ^[0-9]{2}/[0-9]{2}/[0-9]{4}$
        - name: source
          in: query
          description: >-
            Where the OTP is 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.
          required: true
          example: itd
          schema:
            type: string
            enum:
              - itd
              - aadhaar
        - 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 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 OTP request. Pass it to Verify add
                          client OTP 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: d82cdbfc-7594-5ed9-8b23-79a7beb3d073
                    data:
                      httpStatus: SUBMITTED
                      messages:
                        - code: EF40010
                          fieldName: pan
                          type: REMARK
                          desc: OTP has been sent successfully.
                      errors: []
                      transactionId: FOS000012345678
                      successFlag: true
        '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: a1e42b38-1678-5bb0-98d1-da36d2c07596
                    message: Failed to generate otp
        '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: 76218abf-df1e-552f-b627-ecb0d89c86db
                    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: aba216af-9557-570e-bb8f-7817339b8ec7
                    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: 30a8f1ed-e7f9-53ed-bd95-035da931729a
                    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: af705cbc-c770-573f-a2ba-4369312c8a0a
                    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: 63e4ad6a-b866-57ff-8e1a-95d774f73c01
                    message: Failed to generate otp
      deprecated: false

````

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