Website
Env:
Home/API Docs/Authentication

Authentication

How to authenticate requests with your API keys

API Key & Secret Headers

All B2B tenant endpoints require two HTTP headers with every request. You can generate and rotate your keys from the EZNotary Business Dashboard.

HeaderTypeDescription
x-api-keystringPublic identifier for your tenant account
x-api-secretstringPrivate secret key. Keep secure on your backend server.
Security Best Practice: Never expose your x-api-secret in client-side code (browser, mobile apps, or public Git repos). Always route API calls through your secure backend server.
TLS 1.3 encrypted HTTPS required
Get API Keys
Test Connection (Production)Active Target: https://eznotary.in/api/v1
cURL — Verify Credentials
curl -X GET "https://eznotary.in/api/v1/profile" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "x-api-secret: YOUR_API_SECRET"
Node.js Example
const response = await fetch("https://eznotary.in/api/v1/profile", {
  method: "GET",
  headers: {
    "x-api-key": process.env.EZNOTARY_API_KEY,
    "x-api-secret": process.env.EZNOTARY_API_SECRET,
  },
});

const data = await response.json();
console.log("Tenant Profile:", data);

Handling Authentication Errors

If your request lacks authentication headers or has invalid credentials, the EZNotary API responds with an HTTP 401 Unauthorized status:

{
  "statusCode": 401,
  "message": "Missing or invalid x-api-key or x-api-secret headers",
  "error": "Unauthorized"
}