HENSTRUCT · Start

Authentication

Step-by-step hstk_ API key setup and header formats for HENSTRUCT.

Automation uses a key that starts with hstk_. The server stores a hash. The full value is shown once when you generate it from HENDOI Settings or the HENSTRUCT Developers page. Prefer Authorization: Bearer hstk_… or X-Henstruct-Key. Confirm the key with GET /api/v1/usage.

Work this page from top to bottom. Read Before you call this API, then Request syntax, then the walkthrough. Sample numbers show field names only.

How to use this documentation page

  1. Skim the intro so you know what meter this call spends.
  2. Complete the walkthrough once with the dummy key, then again with your live key.
  3. Copy a language sample and keep JSON key names identical.
  4. On every response, read HTTP status first.
  5. When automation returns 202, open Jobs and usage and poll until the job finishes.

Before you call this API

  • You have an active HENDOI account and a live HENSTRUCT API key (hstk_…).
  • You create the key from HENDOI Settings → Generate API key for HENSTRUCT, or from the HENSTRUCT Developers page.
  • You will treat every numeric sample on this page as a shape guide, not measured engineering data.

Request syntax

  1. Method. GET.
  2. URL. https://henstruct.hendoi.com/api/v1/usage.
  3. Header. Authorization: Bearer hstk_demo_4c91e2ab8d07. Or send the raw key in X-Henstruct-Key.
  4. Body. None.

Step by step

  1. Sign in at https://hendoi.com/login, open Settings, then Generate API key for HENSTRUCT. Copy the full hstk_… key once.
  2. Send GET to https://henstruct.hendoi.com/api/v1/usage with the production host.
  3. Prefer Authorization: Bearer hstk_…. Or use X-Henstruct-Key with no Bearer prefix.
  4. Send the request with one of the language samples. Expect HTTP 200 when finished, or HTTP 202 with jobId when queued.
  5. On 401, regenerate the key from Settings. On 403 with QUOTA_EXCEEDED, open Limits and errors.

Quick checklist

  • □ Method and URL path are exact.
  • □ Live HENSTRUCT API key is in the Authorization (or X-Henstruct-Key) header.
  • □ Client branches on HTTP status before reading result fields.

Example request

The key hstk_demo_4c91e2ab8d07 is a dummy. Replace it before you send.

GET https://henstruct.hendoi.com/api/v1/usage
Authorization: Bearer hstk_demo_4c91e2ab8d07

If the request is accepted

{
  "ok": true,
  "usage": {
    "apiRequests": {
      "remaining": 496
    }
  }
}

If the request is not accepted

HTTP 401, missing or deactivated key:

{
  "error": "This API key is deactivated or was not recognized. Only an active key can call the API."
}

HTTP 403, a meter is used up:

{
  "error": "API usage limit reached.",
  "meter": "apiRequests",
  "code": "QUOTA_EXCEEDED"
}

Language samples

Replace the dummy key before you send. Keep JSON key names identical.

cURL

curl -s \
  "https://henstruct.hendoi.com/api/v1/usage" \
  -H "Authorization: Bearer hstk_demo_4c91e2ab8d07" \
  -w "\n%{http_code}\n"

Node.js

const res = await fetch("https://henstruct.hendoi.com/api/v1/usage", {
  headers: { Authorization: "Bearer hstk_demo_4c91e2ab8d07" }
});
const data = await res.json();
console.log(res.status, data);

Python

import requests
r = requests.get("https://henstruct.hendoi.com/api/v1/usage", headers={"Authorization": "Bearer hstk_demo_4c91e2ab8d07"})
print(r.status_code, r.json())

Contact us if you are stuck

Call or WhatsApp +91-9677261485. The message already names this page. Or email support@hendoi.com. Paste the HTTP status and the error text from the response.

Call usChat with us