Documentation
docs.ayra.health
Reference examples for the shared authorization and evidence core. Confirm the candidate, contract and approved environment before integration.
$ curl -X POST https://api.ayra.health/v1/gate/check \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"workflow": "intake_auth", "intent": "READ"}'Set up the SDK, authenticate, and make your first verification request.
npm install @ayra-health/sdk2 · Configure credentials Initialize the client with your credentials. Keep the API key in a server-side environment variable.
1 · Install the SDK Choose the JavaScript / TypeScript or Python wrapper for your server environment.
2 · Configure credentials Initialize the client with your credentials. Keep the API key in a server-side environment variable.
3 · Make your first request Send the workflow identifier, requested intent, and context to the gate check endpoint.
{ "workflow": "intake_auth", "intent": "READ", "context": { "jurisdiction": "TX" } }Examples are reference payloads, not evidence of a production connection. Do not submit real patient data to a pilot fixture.
Ayra Health uses API keys to authenticate requests. View and manage API keys in the dashboard.
Authorization: Bearer YOUR_API_KEYNote: All requests require a valid API key from your dashboard. Keep it secret.
$ curl -X POST https://api.ayra.health/v1/gate/check \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"workflow": "intake_auth", "intent": "READ"}'Note: Rotate your API keys regularly and keep them secret. Never hardcode keys in client-side code.
All requests require a valid API key. Rotate keys regularly. Never hardcode keys in client-side code.
Core verification engine endpoints.
/v1/gate/checkEvaluate authority for a requested intent.{ workflow: "auth", intent: "WRITE" }/v1/gate/verifyCryptographically verify a prior decision.{ proof_bundle: "sha256:099..." }/v1/gate/receiptRetrieve the audit receipt for a decision ID.?gate_id=67b-99f...| Parameter | Type | Required | Description |
|---|---|---|---|
| workflow | string | Required | Identifier for the verification flow. |
| context | object | Required | Jurisdictional and consent metadata. |
| intent | string | Required | The operation being performed. |
| jurisdiction | string | Optional | US State code (e.g. 'TX'). |
{
"decision": "ALLOW",
"proof_bundle": "sha256:099x88231afb332",
"latency": "42ms",
"gate_id": "gate_77x_01992"
}ALLOW is a configured gate decision. It does not imply payer approval, successful receipt anchoring, or clinical validation. 42ms is an example value, not a performance guarantee.
Configure endpoints to receive verification-outcome events.
Endpoint configuration Provide an HTTPS endpoint that accepts POST requests. Use a secure webhook secret for signature verification.
| Event type | Trigger | Description |
|---|---|---|
| gate.passed | Decision | Verification succeeded and a decision was issued. |
| gate.failed | Decision | Verification failed or the request was rejected. |
| receipt.issued | Audit | An audit receipt is available for the decision ID. |
{
"event": "gate.passed",
"gate_id": "gate_77x_01992",
"decision": "ALLOW",
"proof_bundle": "sha256:099x88231afb332",
"latency": "42ms"
}Note: We use an exponential backoff retry policy (3 attempts) with a 30-second timeout. If delivery fails, events are queued for 24 hours.
Process the decision and receipt event independently. Do not equate a gate result with anchor success.
Native language wrappers for your integration.
npm install @ayra-health/sdkconst ayra = new AyraClient({ apiKey: process.env.AYRA_KEY });pip install ayraclient = ayra.Client( api_key="sk_live_..." )The source key string is an example, not a working credential. Load real credentials securely on your server.
Recent updates to the Gate API and SDKs.
Jan 12, 2026
Added receipt.issued webhook event and improved proof bundle validation.
Dec 03, 2025
Introduced jurisdiction overrides and improved SDK error handling.
Nov 18, 2025
Released Python SDK and updated documentation examples.
Need help? Start with the docs, then reach out to the team.
docs.ayra.health
support@ayrahealth.com
Join the developer community for implementation help and best practices.