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

# Refresh a TRACES deductor session

> Refresh a TRACES deductor session to continue TDS challan and bulk PAN verification requests without entering the TRACES password.

Send the `deductor_refresh_token` returned by [Authenticate a TRACES deductor](https://developer.sandbox.co.in/api-reference/tds/compliance/traces/endpoints/authenticate.md) in the `Authorization` header. Include your Sandbox API key in `x-api-key`. This request has no body.

Replace both saved deductor tokens with the returned `data.access_token` and `data.refresh_token`.

If the refresh token has expired or is rejected, [authenticate the deductor again](https://developer.sandbox.co.in/api-reference/tds/compliance/traces/endpoints/authenticate.md). See [Check TDS challans](https://developer.sandbox.co.in/recipes/tds/challans/check-tds-challans.md) or [Verify PANs with a deductor token](https://developer.sandbox.co.in/recipes/tds/pan-verification/verify-pans-with-deductor-token.md) for the complete flow.


## OpenAPI

````yaml api-reference/tds/compliance/openapi.json POST /tds/traces/deductors/refresh
openapi: 3.1.0
info:
  title: compliance
  description: >-
    Tax Deducted at Source (TDS) is an indirect method of collecting Income Tax.
    TDS is based on the principle of “Pay as you earn” which is beneficial for
    both the Government and the taxpayer. It is where a person making a payment
    of specified nature is liable to deduct tax at a prescribed rate. This
    ensures continuous revenue for the Government by way of Tax Deducted at the
    Source.


    The Payer making a payment is also responsible to deposit TDS with the
    Income Tax Department within a specified date and file a TDS Return. Once
    filed, the deposited amount will be shown in the Payee's Form 26AS which
    they can then use to claim tax credits when filing ITR.


    However, staying TDS compliant can be a hassle for businesses, as they are
    required to :


    1. Deduct TDS from payments that are liable for TDS Deduction at an
    appropriate rate.
        
    2. Deposit TDS to Government before the due date.
        
    3. File TDS Returns on a Quarterly basis.
        
    4. Issue a TDS Certificate by the deductor to the deductee.
        

    Organizations deducting TDS have to remain compliant with each of the steps.
    Failure to do so results in TDS Penalties by Authorities. Sandbox provides
    TDS Compliance APIs to help you automate end-to-end TDS compliance.
  version: 1.0.0
servers:
  - url: https://test-api.sandbox.co.in
    description: test
  - url: https://api.sandbox.co.in
    description: prod
security: []
tags:
  - name: TDS Compliance Check
  - name: Download CSI
  - name: FVU Generation
  - name: E-File TDS Return
  - name: TRACES
  - name: TRACES/TDS Certificate
  - name: TRACES/Credentials
  - name: TRACES/Challans
  - name: TDS
  - name: TDS Certificate
  - name: TRACES Credentials
  - name: Challans
paths:
  /tds/traces/deductors/refresh:
    post:
      tags:
        - TRACES/Authentication
      summary: Refresh TRACES session
      description: >-
        Refresh a TRACES deductor session using the deductor refresh token
        returned by [Authenticate a TRACES
        deductor](https://developer.sandbox.co.in/api-reference/tds/compliance/traces/endpoints/authenticate).
        Send the token in the Authorization header with your Sandbox API key.
        This request has no body. Replace both saved deductor tokens with the
        returned values. If the refresh token has expired or is rejected,
        authenticate again.
      operationId: refreshTracesSession
      parameters:
        - name: Authorization
          in: header
          description: >-
            Deductor refresh token returned by [Authenticate a TRACES
            deductor](https://developer.sandbox.co.in/api-reference/tds/compliance/traces/endpoints/authenticate)
            or this endpoint. Send the token without a Bearer prefix.
          required: true
          schema:
            type: string
          examples:
            Session refreshed:
              summary: Session refreshed
              value: '{{deductor_refresh_token}}'
            Missing refresh token:
              summary: Missing refresh token
              description: Omit the Authorization header.
              value: ''
            Invalid refresh token:
              summary: Invalid refresh token
              value: invalid-deductor-refresh-token
            Access token used for refresh:
              summary: Access token used for refresh
              description: An access token cannot refresh a session.
              value: '{{deductor_access_token}}'
        - name: x-api-key
          in: header
          description: Sandbox API key.
          required: true
          schema:
            type: string
          examples:
            Session refreshed:
              summary: Session refreshed
              value: '{{api_key}}'
            Missing refresh token:
              summary: Missing refresh token
              value: '{{api_key}}'
            Invalid refresh token:
              summary: Invalid refresh token
              value: '{{api_key}}'
            Access token used for refresh:
              summary: Access token used for refresh
              value: '{{api_key}}'
      responses:
        '200':
          description: >-
            Returns replacement access and refresh tokens for the TRACES
            session.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    enum:
                      - 200
                  timestamp:
                    type: integer
                    format: int64
                    description: Unix timestamp in milliseconds.
                  transaction_id:
                    type: string
                  data:
                    type: object
                    properties:
                      '@entity':
                        type: string
                        enum:
                          - >-
                            in.co.sandbox.tds.compliance.traces.authentication.response
                      access_token:
                        type: string
                        description: >-
                          Deductor access token for TDS challan and bulk PAN
                          verification requests. Obtain a token with
                          [Authenticate a TRACES
                          deductor](https://developer.sandbox.co.in/api-reference/tds/compliance/traces/endpoints/authenticate).
                      refresh_token:
                        type: string
                        description: >-
                          Deductor refresh token used by [Refresh a TRACES
                          deductor
                          session](https://developer.sandbox.co.in/api-reference/tds/compliance/traces/endpoints/refresh)
                          to renew the TRACES session.
                      access_token_expiry:
                        type: integer
                        format: int64
                        description: Access token expiry as Unix time in milliseconds.
                      refresh_token_expiry:
                        type: integer
                        format: int64
                        description: Refresh token expiry as Unix time in milliseconds.
                    required:
                      - '@entity'
                      - access_token
                      - refresh_token
                      - access_token_expiry
                      - refresh_token_expiry
                required:
                  - code
                  - timestamp
                  - transaction_id
                  - data
              examples:
                Session refreshed:
                  summary: Session refreshed
                  description: Returns replacement deductor tokens.
                  value:
                    code: 200
                    timestamp: 1792176147631
                    transaction_id: 068a8718-9122-47b4-8e2f-56635d6299ed
                    data:
                      '@entity': >-
                        in.co.sandbox.tds.compliance.traces.authentication.response
                      access_token: >-
                        eyJhbGciOiJSU0FTU0FfUFNTX1NIQV81MTIiLCJ0eXAiOiJKV1QiLCJraWQiOiJleGFtcGxlLXNpZ25pbmcta2V5In0.eyJpc3MiOiJhcGkuc2FuZGJveC5jby5pbiIsImF1ZCI6IkFQSSIsImludGVudCI6IkFDQ0VTU19UT0tFTiIsImlhdCI6MTc5MjE3NjE0NywiZXhwIjoxNzkyMTc3MDQ3fQ.invalid-example-signature
                      refresh_token: >-
                        eyJhbGciOiJSU0FTU0FfUFNTX1NIQV81MTIiLCJ0eXAiOiJKV1QiLCJraWQiOiJleGFtcGxlLXNpZ25pbmcta2V5In0.eyJpc3MiOiJhcGkuc2FuZGJveC5jby5pbiIsImF1ZCI6IkFQSSIsImludGVudCI6IlJFRlJFU0hfVE9LRU4iLCJpYXQiOjE3OTIxNzYxNDcsImV4cCI6MTc5MjE4MzM0N30.invalid-example-signature
                      access_token_expiry: 1792177047000
                      refresh_token_expiry: 1792183347000
        '401':
          description: >-
            The Authorization header is missing, or TRACES rejected the session
            refresh token. Authenticate again if the refresh token is rejected.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  timestamp:
                    type: integer
                    format: int64
                    description: Unix timestamp in milliseconds.
                  transaction_id:
                    type: string
                  message:
                    type: string
                required:
                  - code
                  - timestamp
                  - transaction_id
                  - message
              examples:
                Missing refresh token:
                  summary: Missing refresh token
                  description: The Authorization header is missing.
                  value:
                    code: 401
                    timestamp: 1792176148027
                    transaction_id: 8a0adb97-61cb-4004-99ac-069d98c91ecf
                    message: Unauthorized
        '403':
          description: The deductor token or API key is not authorized for this request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  timestamp:
                    type: integer
                    format: int64
                    description: Unix timestamp in milliseconds.
                  transaction_id:
                    type: string
                  message:
                    type: string
                required:
                  - code
                  - timestamp
                  - transaction_id
                  - message
              examples:
                Invalid refresh token:
                  summary: Invalid refresh token
                  description: The Authorization header contains an invalid token.
                  value:
                    code: 403
                    timestamp: 1792176151795
                    transaction_id: 557c2e5a-357c-4fe3-ad65-139206bfef85
                    message: Insufficient privilege
                Access token used for refresh:
                  summary: Access token used for refresh
                  description: An access token cannot refresh a session.
                  value:
                    code: 403
                    timestamp: 1792176151991
                    transaction_id: 1cfa715f-1a5a-452e-8843-b8e860e17fc1
                    message: Insufficient privilege
        '500':
          description: The TRACES session could not be refreshed. Retry the request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  timestamp:
                    type: integer
                    format: int64
                    description: Unix timestamp in milliseconds.
                  transaction_id:
                    type: string
                  message:
                    type: string
                required:
                  - code
                  - timestamp
                  - transaction_id
                  - message
              examples: {}
      deprecated: false
      security: []

````

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