Cross-App API Integration Guide
Everything the Client/Facility Portal team needs to connect to this Agency Workforce app.
- 1
Generate an API key
Go to Manage API Keys page → Generate API Key → choose access level and resources → copy the key.
- 2
Store the key as a secret in the Client Portal app
Never hardcode it. Use AGENCY_API_KEY as the secret name.
- 3
Call the gateway from the Portal's backend functions
All calls are POST to /functions/facilityPortalApi
POST https://reliantworkforceapp.base44.app/functions/facilityPortalApi
Content-Type: application/json
{
"api_key": "rws_your_key_here",
"resource": "staffing_requests",
"action": "list",
"facility_id": "facility_123"
}All fields except api_key, resource, and action are optional and depend on the action being performed.
{
"success": true,
"data": [
{
"id": "req_001",
"facility_id": "facility_123",
"position_type": "RN",
"shift_type": "night",
"status": "pending",
"start_date": "2026-09-05",
...
}
]
}Errors return { "success": false, "error": "message" } with appropriate HTTP status codes (401, 403, 400, 500).
staffing_requestsCreate and track facility staffing requests
assignmentsView shift assignments at a facility
timesheetsView, approve, or dispute timesheets
messagesCross-app conversation threading
facilitiesView and update facility profile
workersSanitized view of staff assigned to a facility
invoicesView invoices for a facility (read-only)
compliance_statusSanitized compliance summary for assigned workers
worker_credentialsSanitized credential verification — status per credential type, no document details
timesheet_statusAggregate timesheet status counts for a facility dashboard
// In the Client Portal app — store the API key as a secret
// Then call the gateway from backend functions:
const response = await fetch(
"https://reliantworkforceapp.base44.app/functions/facilityPortalApi",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
api_key: process.env.AGENCY_API_KEY,
resource: "staffing_requests",
action: "list",
facility_id: facilityId
})
}
);
const result = await response.json();- • API keys are scoped per resource and access level — grant the minimum needed.
- • Worker profiles are automatically sanitized — no SSN, credential numbers, or compliance details are exposed.
- • Timesheet updates from the portal are field-restricted — facilities can approve/dispute but cannot alter hours.
- • Compliance status returns only aggregate counts (compliant, expiring, expired) — no document details.
- • Rotate keys regularly and revoke immediately if compromised.