Developer Documentation

SahiAPI documentation

Make your first GST verification request. Start with 50 Free test credits, then recharge for live verification.

Quick start

  1. Create a SahiAPI account and complete verification.
  2. Open API Tokens in the client panel. Copy your active API key.
  3. Send the test request below from your server. Test mode returns sample data, not a live GST record.
  4. Buy credits and change mode to live when ready.

Base URL: https://sahiapi.com/api/v1. Use HTTPS in production.

Authentication

Send your client API key in the X-API-Key request header. A dashboard session or an API key in the JSON body does not authenticate this endpoint. Keep keys on your server, outside public source code and browser JavaScript.

Request headers
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: application/json

Only the active key for your account works. Regenerating, disabling or expiring a key prevents further access. Update your integration after regeneration. Never paste a real key into a support message.

Verify a GST number

POST /api/v1/client/gst

JSON fieldRequiredAccepted value
gstNoYes15 uppercase letters/digits, beginning with a two-digit state code.
modeYestest or live.
testModeWhen mode is testactive or inactive. Currently required by validation; it does not change the mock response.

Test request

Import the JSON collection in Postman, or extract the ZIP and open the SahiAPI folder in Bruno. Both include test and live requests. Set base_url for your deployment and supply your local api_key; no key is included. In Bruno, select the SahiAPI environment and set the API-key secret. Start with the test request. Live requests use paid credits. Never commit or share your key.

Set the SAHIAPI_KEY environment variable on your server to your active key, then choose your language below. No SahiAPI SDK is required. Each example prints the HTTP status and response body; check both before treating a verification as successful. The cURL command uses POSIX shell syntax; on Windows, run it in WSL or Git Bash.

# POSIX shell. Set SAHIAPI_KEY to your active API key first.
curl --request POST 'https://sahiapi.com/api/v1/client/gst' \
  --max-time 30 --include \
  --header "X-API-Key: ${SAHIAPI_KEY:?Set SAHIAPI_KEY first}" \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --data '{
    "gstNo": "29CGTPB7711E1Z9",
    "mode": "test",
    "testMode": "active"
  }'

HTTP client references: cURL, PHP, Python, Ruby, .NET, Java, Node.js, C++ / libcurl, Rust / reqwest, Go.

Live request body

JSON · Live request
{
    "gstNo": "29CGTPB7711E1Z9",
    "mode": "live"
}

Live mode uses your paid credit balance and contacts a configured verification provider. Test credits cannot pay for live requests.

Read the response

The following is an excerpt from the current test response. Mock values are illustrative. Live response fields depend on the active provider; do not assume the mock structure is guaranteed for every provider.

JSON · Test response excerpt
{
    "data": {
        "gstin": "29CGTPB7711E1Z9",
        "lgnm": "Mock Business Name 29CGT",
        "tradeNam": "Mock Trade Name",
        "sts": "Active",
        "dty": "Regular",
        "einvoiceStatus": "No",
        "panNo": "CGTPB7711E"
    },
    "status_cd": "1",
    "status_desc": "Public API Search Taxpayer Success"
}

Check both HTTP status and the response body. Some business failures currently return HTTP 200 with status: false, for example insufficient credits. Provider responses may contain their own status fields. Treat a failed response as a failed verification, even when the HTTP request succeeds.

JSON · Insufficient credits
{
    "status": false,
    "message": "Insufficient live credits. Please purchase credits.",
    "data": []
}

Errors and rate limits

HTTP statusMeaningWhat to do
200 with failure bodyInsufficient credits, unavailable wallet, or verification/provider failure.Inspect the message and account balance. Avoid blind retries.
401Missing, invalid, expired or disabled API key.Check your active X-API-Key.
403Account is not active.Contact support.
422Request validation failed.Read errors and correct the fields.
429Request rate limit reached.Wait before retrying; respect any Retry-After header.
500Unexpected application failure.Retry cautiously and contact support if it continues.

GST verification currently allows 10 requests per minute per API token. Other client API routes have a separate limit of 60 requests per minute. These are request limits, not guaranteed processing-time or uptime commitments.

Credits and billing

New registrations receive 50 Free test credits. Each processed test verification uses one test credit. Live verification uses one paid credit. Provider calls that return a response can be chargeable even when the result is not a successful GST validation. A provider exception before a response does not deduct a credit.

Complete your profile with Name, Email, Mobile, GST Number and PAN before buying credits.

Recharge by amount or credit quantity in the client panel. The applicable whole-purchase pricing slab, minimum recharge, GST and total appear before payment. Amount entry charges the full entered amount and rounds down to whole credits. Credit entry prices your exact quantity. Rates for an existing order remain fixed at order creation.

Non-refundable and non-cancellable service. Credit purchases are non-refundable and non-cancellable, and unused credits cannot be exchanged for cash, except where applicable law requires otherwise. Read the Refund & Cancellation Policy and Terms & Conditions before purchasing.

Invoices are generated automatically after payment confirmation and for paid manual top-ups. Download available invoices from your orders page.

Usage and support

Use API Usage to review request time, mode, GST number, response details and credits deducted. View balances in your wallet and configure low-credit alerts. For account or integration issues, open a support ticket or email contact@sahiapi.com.

Related policies: Privacy Policy and Terms & Conditions.