Documentation

Everything developers need to integrate with the MediBridgeX platform.

Authentication

Learn how to securely authenticate with the MediBridgeX platform using API Keys and organization-based access.

8 min read Beginner Updated Today

Overview

Every request to the MediBridgeX platform requires authentication. Authentication is organization-aware. Projects inherit permissions from organizations, and API Keys are scoped strictly to projects.

Organization
Projects
API Keys
API Requests
Platform

Authentication Flow

1
Create Organization
2
Create Project
3
Generate API Key
4
Store Secret Securely
5
Send Authorization Header
6
Receive Authenticated Response

Working With API Keys

Generate

Create scoped API keys per project.

Best Practice: Use specific keys for specific environments.

Rotate

Regularly replace old keys with new ones.

Best Practice: Rotate keys every 90 days.

Revoke

Instantly disable compromised keys.

Best Practice: Revoke keys of departed team members.

Scope

Limit key access to specific resources.

Best Practice: Always enforce the principle of least privilege.

Organizations

Organizations are the highest-level security boundary in MediBridgeX. They own Projects, Members, API Keys, and all Resources associated with them.

Organization
Projects
Resources

Projects

Projects isolate integrations. Each project maintains independent credentials, webhooks, and configuration to safely separate development stages.

Healthcare Integration

Live clinical data workflows.

Sandbox

Safe testing environment.

Production

Mission-critical live systems.

Best Practices

Never expose API Keys
Rotate credentials regularly
Use HTTPS
Store secrets securely
Use least privilege
Audit access frequently

Authentication Errors

401 Unauthorized

The API key is missing or invalid.

Action: Provide a valid Bearer token in the header.

403 Forbidden

The API key lacks permissions.

Action: Check your project and key scopes.

Expired Key

The API key has passed its expiration date.

Action: Generate a new API key in the dashboard.

Invalid Key

The API key format is incorrect or revoked.

Action: Ensure you copied the entire key string.

Missing Header

The Authorization header was not sent.

Action: Add the Authorization header to your request.

Rate Limited

Too many requests were sent using this key.

Action: Implement exponential backoff or upgrade plan.

Example Request

GET/fhir/Patient/12345
// Headers
Authorization: Bearer YOUR_API_KEY
Accept: application/fhir+json
Content-Type: application/fhir+json

// Response (200 OK)
{
"resourceType": "Patient",
"id": "12345",
"active": true
}