API REFERENCE

API Reference

Complete REST API documentation for every Rymeda infrastructure layer.

https://api.rymeda.com/v1v1.0

Authentication

All API requests require authentication via OAuth2 bearer tokens or API keys. Tokens are scoped to specific permissions and expire after a configurable TTL.

OAuth2 Client Credentials Flow

Exchange your client ID and secret for a bearer token.

POST https://auth.rymeda.com/oauth2/token
Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials
&client_id=YOUR_CLIENT_ID
&client_secret=YOUR_CLIENT_SECRET
&scope=care:read care:write revenue:read

Token Response

{
  "access_token": "eyJhbGciOiJSUzI1NiIs...",
  "token_type": "Bearer",
  "expires_in": 3600,
  "scope": "care:read care:write revenue:read"
}

Available Scopes

ScopeDescription
care:readRead care sessions, client profiles, progress notes
care:writeCreate and update sessions, notes, care plans
revenue:readRead claims, ERA/EOBs, payment data
revenue:writeSubmit claims, manage billing workflows
compliance:readRead audit trails, compliance artifacts
compliance:writeUpload artifacts, configure compliance rules
intelligence:readQuery ORIS, view predictions and insights
intelligence:writeTrigger workflows, run analysis
network:readRead providers, organizations, credentials
network:writeManage providers, create organizations
commerce:readRead products, orders, inventory
commerce:writeCreate orders, manage marketplace
platform:adminManage webhooks, API keys, org settings

Security note: Never expose your client secret or API keys in client-side code. Use server-side authentication and proxy requests through your backend.

Error Codes

All errors return a consistent JSON structure with machine-readable codes and human-readable messages.

Error Response Shape

{
  "error": {
    "status": 422,
    "code": "VALIDATION_FAILED",
    "message": "Validation failed for 2 fields",
    "details": [
      { "field": "clientId", "message": "Client not found" },
      { "field": "cptCodes", "message": "At least one CPT code is required" }
    ],
    "requestId": "req_abc123xyz"
  }
}

HTTP Status Codes

StatusTitle
400Bad Request
401Unauthorized
403Forbidden
404Not Found
409Conflict
422Unprocessable Entity
429Too Many Requests
500Internal Server Error

Rate Limits

Rate limits are enforced per API key. Exceeding limits returns a 429 status with a Retry-After header.

Rate Limit Headers

HeaderDescription
X-RateLimit-LimitMaximum requests per window
X-RateLimit-RemainingRemaining requests in current window
X-RateLimit-ResetUnix timestamp when the window resets
Retry-AfterSeconds to wait before retrying (on 429 only)

Tier Limits

TierRequestsBurst
Free100 / min20 / sec
Growth1,000 / min100 / sec
Enterprise10,000 / min500 / sec
CustomUnlimitedCustom

Care

Care delivery engine — sessions, clients, documentation, and progress notes.

POST/v1/care/sessions

Create a new care session for a client. Automatically validates service authorization and provider credentials.

Bearer token required
curl -X POST https://api.rymeda.com/v1/care/sessions \
  -H "Authorization: Bearer rym_test_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "clientId": "client_123",
    "serviceType": "behavioral_health",
    "providerId": "prov_456",
    "startTime": "2025-01-15T09:00:00Z"
  }'
GET/v1/care/clients/{clientId}

Retrieve a client profile including demographics, active care plans, and service history.

Bearer token required
curl https://api.rymeda.com/v1/care/clients/client_123 \
  -H "Authorization: Bearer rym_test_your_api_key_here"
POST/v1/care/progress-notes

Create a progress note for a completed session. Supports structured fields and free-text narratives.

Bearer token required
{
  "sessionId": "session_789",
  "type": "soap",
  "subjective": "Client reports improved sleep patterns...",
  "objective": "Alert, oriented, cooperative...",
  "assessment": "Progress toward treatment goals...",
  "plan": "Continue current treatment plan..."
}

Revenue

Claims lifecycle, ERA/EOB processing, payer management, and revenue analytics.

POST/v1/revenue/claims

Submit a new insurance claim. Validates CPT/ICD codes, service authorizations, and payer requirements before submission.

Bearer token required
curl -X POST https://api.rymeda.com/v1/revenue/claims \
  -H "Authorization: Bearer rym_test_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "clientId": "client_123",
    "sessionId": "session_789",
    "payerId": "payer_medicaid",
    "cptCodes": ["90837"],
    "amount": 245.00
  }'
GET/v1/revenue/claims

List all claims with filtering by status, payer, date range, and service type. Supports cursor-based pagination.

Bearer token required
curl "https://api.rymeda.com/v1/revenue/claims?status=submitted&limit=25" \
  -H "Authorization: Bearer rym_test_your_api_key_here"
GET/v1/revenue/era/{eraId}

Retrieve an Electronic Remittance Advice (ERA) by ID, including payment details and adjustment codes.

Bearer token required

Compliance

Audit trails, regulatory tracking, documentation enforcement, and compliance scoring.

GET/v1/compliance/audits

List audit trail entries with filtering by resource type, action, user, and date range.

Bearer token required
curl "https://api.rymeda.com/v1/compliance/audits?resourceType=care_session&limit=50" \
  -H "Authorization: Bearer rym_test_your_api_key_here"
POST/v1/compliance/artifacts

Upload a compliance artifact (policy document, training certificate, attestation) with metadata.

Bearer token required
{
  "type": "training_certificate",
  "title": "HIPAA Annual Training 2025",
  "userId": "user_100",
  "expiresAt": "2026-01-15T00:00:00Z",
  "fileUrl": "https://storage.rymeda.com/artifacts/cert_001.pdf"
}

Network

Multi-tenant provider management, credentialing, workforce, and scheduling.

GET/v1/network/providers

List providers with filtering by specialty, credential status, organization, and availability.

Bearer token required
curl "https://api.rymeda.com/v1/network/providers?specialty=behavioral_health" \
  -H "Authorization: Bearer rym_test_your_api_key_here"
POST/v1/network/organizations

Create a new organization in the network. Provisions isolated tenant with RBAC, data partitioning, and compliance defaults.

Bearer token required
{
  "name": "Crestview Health Services",
  "type": "behavioral_health_provider",
  "ein": "12-3456789",
  "primaryContact": {
    "email": "admin@crestview.com",
    "phone": "+1-555-0100"
  }
}

Commerce

Healthcare marketplace, supply chain, vendor management, and order processing.

GET/v1/commerce/products

List marketplace products with filtering by category, vendor, and availability.

Bearer token required
POST/v1/commerce/orders

Create a new order for healthcare products or supplies. Validates inventory, calculates shipping, and initiates fulfillment.

Bearer token required
{
  "organizationId": "org_100",
  "items": [
    {
      "productId": "prod_001",
      "quantity": 10
    }
  ],
  "shippingAddress": {
    "line1": "123 Health Ave",
    "city": "Austin",
    "state": "TX",
    "zip": "78701"
  }
}

Intelligence

ORIS-powered clinical reasoning, natural language queries, predictive analytics, and insights.

POST/v1/intelligence/query

Query the ORIS intelligence engine with natural language. Returns structured insights from clinical and operational data.

Bearer token required
curl -X POST https://api.rymeda.com/v1/intelligence/query \
  -H "Authorization: Bearer rym_test_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "Show clients with overdue progress notes this week",
    "context": { "organizationId": "org_100" }
  }'
POST/v1/intelligence/predict

Generate predictive analytics for operational metrics — no-shows, revenue forecasts, compliance risk.

Bearer token required
{
  "model": "no_show_risk",
  "input": {
    "clientId": "client_123",
    "sessionDate": "2025-01-20",
    "serviceType": "behavioral_health"
  }
}
POST/v1/intelligence/analyze

Run deep analysis on clinical or operational data. Supports trend analysis, anomaly detection, and pattern recognition.

Bearer token required
{
  "analysisType": "trend",
  "metric": "claim_denial_rate",
  "timeRange": {
    "start": "2024-07-01",
    "end": "2025-01-15"
  },
  "groupBy": "payer"
}

Platform

Webhook management, API key lifecycle, and platform configuration.

GET/v1/platform/webhooks

List configured webhook endpoints with delivery status and event subscriptions.

Bearer token required
POST/v1/platform/api-keys

Create a new API key with scoped permissions and optional expiration.

Bearer token required
{
  "name": "Production Integration",
  "scopes": ["care:read", "care:write", "revenue:read"],
  "expiresAt": "2026-01-15T00:00:00Z"
}

Webhooks

Receive real-time notifications when events occur in Rymeda. Webhooks are signed, retried, and delivered in order.

Event Types

EventDescription
session.createdA new care session has been scheduled.
session.completedA care session has been marked as completed.
claim.submittedA new insurance claim has been submitted to the payer.
claim.paidAn insurance claim has been paid by the payer.
claim.deniedAn insurance claim has been denied by the payer.
compliance.artifact_expiringA compliance artifact is expiring within the configured notice period.
provider.credential_updatedA provider credential has been updated or re-verified.
intelligence.workflow_completedAn ORIS automation workflow has completed execution.

Signature Verification

Every webhook payload is signed with your webhook secret using HMAC-SHA256. Verify the signature before processing.

// Verify webhook signature (Node.js)
import crypto from 'crypto'

function verifySignature(payload, signature, secret) {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(payload)
    .digest('hex')
  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(expected)
  )
}

// Headers sent with each webhook:
// X-Rymeda-Signature: <HMAC-SHA256 hex digest>
// X-Rymeda-Timestamp: <Unix timestamp>
// X-Rymeda-Event: <event type>

Retry Policy

Attempts

Up to 5 retries with exponential backoff

Backoff

1s, 5s, 30s, 2m, 10m between retries

Timeout

30 second response timeout per attempt

Example Payload

{
  "event": "session.created",
  "data": {
    "sessionId": "session_789",
    "clientId": "client_123",
    "providerId": "prov_456",
    "startTime": "2025-01-15T09:00:00Z"
  },
  "timestamp": "2025-01-14T16:30:00Z"
}

Need help integrating?

Check out our integration guides or talk to our engineering team for hands-on support.