The NetaGraph API.
JSON over HTTPS. Authenticated via X-API-KEY headers. Stable v1 surface, semver-versioned, with deprecation notices six months in advance. Served from India-region edge with TLS 1.3 and per-key audit logs.
Four primitives, one API.
Authentication, surface, push, and quotas — each documented and instrumented.
Scoped keys, instant rotation.
Per-environment keys with IP allowlists, scope masks, and one-click rotation. Every call is audit-logged with a stable key hash.
Get a keycurl https://api.netagraph.in/v1/ping \ -H "X-API-KEY: $NETAGRAPH_KEY"
Everything you need to integrate.
Quickstart
From zero to your first signed response in under 60 seconds.
API Reference
Every endpoint, every field, every status code.
Changelog
Versioned, semver-bumped, six-month deprecation windows.
Status
Live latency, error rates, and incident history.
From zero to first response in 60 seconds.
# 1. Create a key in the workspace
# https://netagraph.in/workspace/keys
#
# 2. Export it
export NETAGRAPH_KEY="ng_live_••••••••••••"
# 3. Make your first call
curl https://api.netagraph.in/v1/analytics/constituencies/blr-south \
-H "X-API-KEY: $NETAGRAPH_KEY"Authentication
Every request must carry an X-API-KEY header with a key generated from your workspace. Keys are scoped to an environment (production or staging) and can be rotated or revoked instantly.
Versioning & stability
The current major is v1. Breaking changes ship behind a new path prefix. Field deprecations are flagged in response headers (X-NG-Deprecated) at least six months before removal.
Pagination & filtering
List endpoints accept limit, cursor, and resource-specific filters (e.g. state, ulb). Default page size is 50; maximum is 500.
Webhooks
Subscribe to report.*, contractor.* and sentiment.* events. Payloads are signed with HMAC-SHA256 over the request body; verify using the X-NG-Signature header.
Core analytics surfaces.
| Description | |||||
|---|---|---|---|---|---|
| GET | /v0/analytics/legacy | Analytics | Legacy v0 analytics — sunset 2026-12 | 210ms | deprecated |
| GET | /v1/analytics/constituencies/:id | Analytics | Sentiment, top issues, infra indicators | 38ms | stable |
| GET | /v1/analytics/contractors | Analytics | Contractor SLAs and site status by ULB | 71ms | stable |
| GET | /v1/analytics/sentiment/booths | Analytics | Booth-level sentiment heatmap | 96ms | beta |
| GET | /v1/analytics/trends | Analytics | Time-series by state, district or AC | 54ms | stable |
| POST | /v1/auth/keys/rotate | Auth | Rotate the current API key | 47ms | stable |
| GET | /v1/geo/constituencies/:state | Geo | Assembly + Lok Sabha boundaries | 110ms | stable |
| GET | /v1/geo/wards/:state | Geo | Municipal ward GeoJSON polygons | 124ms | stable |
| POST | /v1/reports | Reports | Submit a geo-tagged citizen report | 88ms | stable |
| GET | /v1/reports/:id | Reports | Fetch report with evidence trail | 42ms | stable |
| POST | /v1/reports/:id/verify | Reports | Volunteer verification action | 61ms | beta |
| POST | /v1/webhooks | Webhooks | Subscribe to event topics | 33ms | stable |
| DELETE | /v1/webhooks/:id | Webhooks | Revoke an existing subscription | 29ms | stable |
Standard codes, predictable bodies.
| Meaning | Action | |||
|---|---|---|---|---|
| 400 | bad_request | Client | Malformed request body | Validate payload against schema |
| 401 | invalid_key | Auth | Missing or invalid X-API-KEY | Check X-API-KEY header |
| 401 | key_revoked | Auth | Key was rotated or revoked | Re-issue from /workspace/keys |
| 403 | scope_denied | Auth | Key not entitled to scope | Upgrade tier or request scope |
| 404 | not_found | Client | Resource does not exist | Verify identifier |
| 409 | conflict | Client | Idempotency key reuse | Generate a new key |
| 429 | rate_limited | Limit | Per-minute quota exceeded | Honour Retry-After header |
| 429 | burst_limited | Limit | Per-second burst exceeded | Add exponential backoff |
| 502 | upstream_failure | Server | Upstream data source down | Backoff x5 then alert |
| 504 | timeout | Server | Edge timeout (>5s) | Retry with smaller window |
By tier.
| GovTech | Negotiated | — | Streaming + hooks | Yes | Negotiated |
| Journalist | 10,000 | 20 / s | — | — | Free |
| Newsroom | 100,000 | 50 / s | 5 topics | — | ₹35k / mo |
| Campaign | 1,000,000 | 200 / s | Unlimited | Yes | ₹2.4L / mo |
| Consultancy | 5,000,000 | 500 / s | Unlimited | Yes | ₹6.0L / mo |

