canonical: https://jentic.com/apis/ndhm.gov.in/ndhm-health-data-consent-manager

# Ndhm Health Data Consent Manager

Jentic publishes the only available OpenAPI specification for Health Data Consent Manager, keeping it validated and agent-ready. The Health Data Consent Manager (CM) is the patient-facing component of India's NDHM that aggregates health information across Health Information Providers and shares it with Health Information Users based on the patient's explicit consent. The 22-endpoint surface covers care-context discovery responses, consent request initiation and fetching, health-information request handling, link confirmation, and heartbeat monitoring.

## For AI agents

Build a patient-facing Consent Manager that aggregates Indian health data across HIPs and shares it with HIUs based on explicit consent.

## Scope

Does not store HIP-side patient records, issue ABHA Health IDs, or perform clinical workflows - use for the patient-facing consent and care-context aggregation role only.

## Capabilities

- Receive care-context discovery responses from registered HIPs and present them to the patient
- Initiate consent requests on behalf of an HIU and capture the patient's grant or denial
- Fetch consent artefacts and forward them to the requesting HIU
- Notify HIPs and HIUs of consent grants, revocations, and expiry events
- Coordinate health-information requests so that the HIP delivers the encrypted bundle to the HIU
- Confirm patient-initiated linking of HIP care contexts to the patient's ABHA account

## Use cases

### Patient Consent Manager App Backend

A health-tech company builds a patient-facing CM app where users can see which hospitals hold their records, grant consent to share with insurers or telehealth apps, and revoke access at any time. The CM endpoints handle the discovery responses, consent request lifecycle, and health-information requests that the patient authorises through the app.

Example prompt: Receive POST /v0.5/care-contexts/on-discover events, persist them, and present the linkable care contexts to the patient

### HIU-Triggered Consent Requests

When an HIU (e.g., insurer or telehealth platform) needs patient records, it asks the patient's CM to issue a consent request. POST /v0.5/consent-requests/init records the request, the patient approves through the CM UI, and POST /v0.5/consents/fetch delivers the signed artefact back to the requesting HIU.

Example prompt: Call POST /v0.5/consent-requests/init with the HIU id, purpose, and HIP scope; on patient approval, call POST /v0.5/consents/fetch and forward the artefact

### Health-Information Data Request Coordination

After consent is granted, the CM mediates the actual data transfer by forwarding HIU requests to the HIP, receiving acknowledgements, and emitting status notifications. Endpoints like POST /v0.5/health-information/request, /on-request, and /notify capture each step of the encrypted data exchange.

Example prompt: Call POST /v0.5/health-information/request with the consent artefact reference and listen for the corresponding /notify event when delivery completes

### Agent-Driven CM Operations

An AI agent operating inside a CM platform handles routine tasks like fetching consent artefacts, posting acknowledgements, and reconciling expiry events. Jentic resolves natural-language requests to the correct CM endpoint and signs the JWT-based payloads from the encrypted vault.

Example prompt: Search Jentic for 'fetch ndhm consent artefact', execute POST /v0.5/consents/fetch with the consent ID and forward the result

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /v0.5/consent-requests/init | Create a consent request |
| POST | /v0.5/consents/fetch | Fetch a consent artefact |
| POST | /v0.5/health-information/request | Request health information from an HIP |
| POST | /v0.5/health-information/notify | Notify on data flow events |
| POST | /v0.5/links/link/add-contexts | Confirm HIP-initiated care-context linking |
| GET | /v0.5/heartbeat | Get service heartbeat |

## Key resources

- **Discovery** — Receive care-context discovery responses from HIPs
- **Consent** — Initiate, fetch, and notify on consent artefacts
- **Health Information** — Request, acknowledge, and notify on health-data transfers
- **Link** — Confirm patient-initiated and HIP-initiated care-context links
- **Heartbeat** — Monitor CM service availability

## Why Jentic

- **Setup:** Wiring the NDHM Consent Manager by hand means signing JWTs, managing CM client credentials on the dev.ndhm.gov.in host, and handling the asynchronous consent and health-information callbacks yourself. Through Jentic you install once, import the Health Data Consent Manager from the API Directory, store the client credentials once, and your agent calls it.
- **Permission scoping:** The Consent Manager carries consent ids and care-context links in the request body rather than in the URL path, so scope the agent to the operations it needs, such as fetching a consent artefact. You choose the operations it may call, so health-information requests or link-context writes are not included unless you add them.
- **Credential handling:** Your NDHM JWT signing keys and CM client credentials are stored once, encrypted, by your own Jentic One instance and injected at execution time. Private keys and raw tokens never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'fetch an NDHM consent artefact', and Jentic returns POST /v0.5/consents/fetch with its input schema so the agent supplies the consentId without browsing the reference docs.

## Related APIs

- **NDHM Gateway** — The Gateway routes messages between the CM, HIPs, and HIUs that the Consent Manager interacts with.
- **NDHM Health ID Service** — Issues the ABHA Health ID that uniquely identifies the patient inside the Consent Manager.
- **NDHM HIU Specifications** — Defines the HIU side that requests data from the CM.

## FAQ

### Why is there no official OpenAPI spec for Health Data Consent Manager?

NDHM does not publish a maintained OpenAPI specification for the CM role - only Markdown reference docs and a deprecated apis.guru import. Jentic generates and maintains this spec so that AI agents and developers can call Health Data Consent Manager via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the NDHM Health Data Consent Manager use?

The CM endpoints rely on signed JWTs issued through the NDHM Gateway and validated against certificates fetched from the Gateway's /v0.5/certs endpoint. The OpenAPI spec leaves `securitySchemes` empty because authorisation is enforced at the JWT layer rather than via a standard HTTP scheme.

### Can I fetch a consent artefact through this API?

Yes. POST /v0.5/consents/fetch retrieves a signed consent artefact by its consentId. The CM forwards the artefact to the requesting HIU after the patient grants approval through the CM application.

### What are the rate limits for the Health Data Consent Manager?

Rate limits are not declared in the OpenAPI spec. The sandbox at dev.ndhm.gov.in/cm applies fair-use throttling for development; production limits depend on the CM operator's onboarding tier with the National Health Authority.

### How do I initiate a consent request through Jentic?

Search Jentic for 'initiate NDHM consent request', load the schema for POST /v0.5/consent-requests/init, and execute with the HIU id, purpose, and date-range. The CM then prompts the patient and your callback handler receives the consent artefact.

### How does this differ from the NDHM Gateway?

The Gateway is the central router across all roles. The Consent Manager is the patient-facing aggregator that holds consent records and presents the patient UI for grant or revocation. Most CM endpoints have a Gateway counterpart that forwards messages between roles.

### Can I limit what my agent is allowed to do with the NDHM Health Data Consent Manager API?

Yes. Because you run Jentic One yourself, you decide which Consent Manager operations the agent may call and which credentials it may use. You can scope it to a single read operation such as fetching a consent artefact with POST /v0.5/consents/fetch, so heavier operations like POST /v0.5/health-information/request or the link-context writes at POST /v0.5/links/link/add-contexts are not available unless you add them. Since consent ids and care-context links travel in the request body rather than the URL, that operation-level allowlist is what controls the agent's reach.
