---
title: Submit OTP
slug: api-marketplace/submit-otp
description: Learn how to authenticate and access GSTR data with this comprehensive document. Get step-by-step instructions for using the API to submit OTP, along with cURL examples and all necessary request headers and body information. Discover various response data
createdAt: 2023-09-21T11:50:33.951Z
---

### Introduction

This API is responsible for submitting an OTP on behalf of the client for establishing a authenticated session for fetching raw GSTR data and analytics report.
You will require an authorization token to use this API. This authorization token will be generated by Signzy for you and will be used in each API call. Please contact help\@signzy.com for this.

### cURL

:::CodeblockTabs
Production

```curl
curl --location --globoff 'https://api.signzy.app/api/v3/gstr-analytics/submit-otp' \
--header 'Authorization: <Access Token>' \
--header 'Content-Type: application/json' \
--data '{
    "requestId": "d54becdf-05d9-49b9-9af8-7c93ae2772a4",
    "otp":"123456"
}'
```

Pre-Production

```curl
curl --location --globoff 'https://api-preproduction.signzy.app/api/v3/gstr-analytics/submit-otp' \
--header 'Authorization: <Access-Token>' \
--header 'Content-Type: application/json' \
--data '{
    "requestId": "d54becdf-05d9-49b9-9af8-7c93ae2772a4",
    "otp":"123456"
}'
```
:::

### Request Headers

| Key           | Value            |
| ------------- | ---------------- |
| Authorization | Shared by Signzy |
| Content-type  | application/json |

### Request Body

```json
{
    "requestId": "d54becdf-05d9-49b9-9af8-7c93ae2772a4",
    "otp":"123456"
}
```

| PARAMETERS | DESCRIPTION                                                                | TYPE   | VALUE (COMPULSORY OR OPTIONAL) |
| ---------- | -------------------------------------------------------------------------- | ------ | ------------------------------ |
| requestId  | The requestId that was created during Generate OTP API call                | String | COMPULSORY                     |
| otp        | The OTP that was sent to registered device by making Generate OTP API call | String | COMPULSORY                     |

### Response Data

```json
{
    "result": {
        "status": "SUCCESS",
        "message": "GSTIN Authentication Successful."
    }
}
```

| PARAMETERS | DESCRIPTION                                                                                      | TYPE   | VALUE (COMPULSORY OR OPTIONAL) |
| ---------- | ------------------------------------------------------------------------------------------------ | ------ | ------------------------------ |
| result     | This parameter contains the actual output.                                                       | Object | COMPULSORY                     |
| status     | This serves as an enum to indicate the status of the API call. Possible values - SUCCESS, FAILED | String | COMPULSORY                     |
| message    | It indicates whether the OTP was successfully authenticated or not                               | String | COMPULSORY                     |

### Status Codes & Messages

:::CodeblockTabs
200 OK

```json
{
    "result": {
        "status": "SUCCESS",
        "message": "GSTIN Authentication Successful."
    }
}

1. GSTIN Authentication Successful.
2. GST OTP generation successful.
3. Request is already submitted and is in progress.
4. GSTIN Authentication Unsuccessful.
```

404 Not Found

```json
{
    "error": {
        "name": "error",
        "message": "requestId not found",
        "status": 404,
        "reason": "NOT_FOUND",
        "type": "Not Found",
        "statusCode": 200
    }
}

1. requestId not found
```

409 Error

```json
{
    "error": {
        "name": "error",
        "message": "Error in getting data from Upstream",
        "status": 409,
        "reason": "Error",
        "type": "Conflict",
        "statusCode": 409
    }
}

1. Error in getting data
2. Error in getting data from Upstream
```

400

```json
{
    "error": {
        "name": "error",
        "message": "\"requestId\" must be a valid GUID",
        "status": 400,
        "reason": "VALIDATION_ERROR",
        "type": "Bad Request",
        "statusCode": 200
    }
}

1. Datatype validation issues errors, eg: \"requestId\" must be a string
2. Missing required parameters, eg: \"requestId\" is required
3. OTP must be a string of 6 digits
4. \"requestId\" must be a valid GUID
```
:::

:::hint{type="info"}
### Getting help

Please feel free to contact us if you have any questions, require clarification, or have ideas for how to make the documents or any of our services better.


You can reach out to us at [help@signzy.com](#).
:::

