Benirai Ministries
Developer Reference

Reference Implementation

Everything you need to integrate with the Benirai Empowerment Credential Framework. Covers the assessment API, MCP tool interface, x402 payment gating, W3C VC verification, and Biscuit delegation chains.

Quick Start

Issue your first credential in under a minute.

POST /api/assess — Issue a participation credential
curl -X POST https://benirai.org/api/assess \
  -H "Content-Type: application/json" \
  -d '{
    "path": "participation",
    "subject": {
      "id": "did:example:abc123",
      "name": "Jane Smith",
      "email": "[email protected]"
    },
    "data": {
      "session_id": "july-2026-intensive",
      "checked_in": true
    }
  }'
Response
{
  "issued": true,
  "credentialId": "cred_a1b2c3d4e5f6...",
  "verifyUrl": "https://benirai.org/verify/cred_a1b2c3d4e5f6...",
  "assessment": {
    "pass": true,
    "score": 100,
    "maxScore": 100,
    "summary": "Participation confirmed."
  },
  "credential": { ... }
}

Assessment Paths

Five credential paths, each with its own rubric and passing threshold.

PathCredential TypeThresholdKey Fields
community_impactCommunityImpactCredential65%mission_statement, years_active, staff_count, has_audit, annual_budget, has_project_plan, target_funding_amount, completed_intensive
completionCompletionCredential75%attended_all_sessions, submitted_final_work
endorsementEndorsementCredential60%endorser_verified, endorsement_text
participationParticipationCredential50%session_id, checked_in
grant_readinessGrantReadinessCredential60%has_theory_of_change, has_detailed_budget, has_measurable_outcomes, has_org_docs

Credential Verification

Content-negotiated endpoint. Browsers get the human-readable page; agents get JSON-LD.

GET /api/verify/:id — Machine-readable verification
curl https://benirai.org/api/verify/cred_a1b2c3d4e5f6 \
  -H "Accept: application/ld+json"
Response (application/ld+json)
{
  "@context": ["https://www.w3.org/ns/credentials/v2"],
  "type": "VerificationResult",
  "verified": true,
  "verificationTime": "2026-07-07T12:00:00.000Z",
  "checks": {
    "proof": true,
    "status": true,
    "expiry": true,
    "revocation": true,
    "suspension": true
  },
  "credential": { ... },
  "logAnchor": {
    "logIndex": 42,
    "entryHash": "a1b2c3...",
    "merkleRoot": "d4e5f6..."
  }
}

MCP Tool Interface

Use the MCP manifest to integrate with Claude, GPT, and other MCP-compatible agents.

MCP tool call — assess
{
  "tool": "assess",
  "arguments": {
    "path": "grant_readiness",
    "subject": { "id": "did:example:org123", "name": "Hope Community Center" },
    "data": {
      "has_theory_of_change": true,
      "has_detailed_budget": true,
      "has_measurable_outcomes": true,
      "has_org_docs": true
    }
  }
}

MCP manifest: /.well-known/mcp.json

x402 Payment Gating

Some credential types require a contribution. The x402 protocol returns a 402 with payment options.

Step 1 — Request payment instructions (no proof)
curl -X POST https://benirai.org/x402/contribute \
  -H "Content-Type: application/json" \
  -d '{"credentialType": "community_impact", "subjectId": "did:example:abc"}'
Step 2 — Submit with GoDaddy payment proof
curl -X POST https://benirai.org/x402/contribute \
  -H "Content-Type: application/json" \
  -d '{
    "credentialType": "community_impact",
    "subjectId": "did:example:abc",
    "paymentProof": {
      "method": "godaddy",
      "txRef": "GD-TXN-12345"
    }
  }'
Step 3 — Use accessToken with /api/assess
curl -X POST https://benirai.org/api/assess \
  -H "Content-Type: application/json" \
  -d '{
    "path": "community_impact",
    "subject": { "id": "did:example:abc" },
    "data": { ... },
    "x402AccessToken": "<token from step 2>"
  }'

Delegation Chain Verification

Verify Biscuit tokens or RFC 8693 JWT chains for sub-agent authorization.

POST /api/delegation/verify
curl -X POST https://benirai.org/api/delegation/verify \
  -H "Content-Type: application/json" \
  -d '{
    "token": "En0KEwoEMTIzNBgDIgkKBwgKEgMYgAgSJAgAEiAs...",
    "format": "biscuit",
    "rootAuthority": "did:web:benirai.org"
  }'

W3C Bitstring Status List

Check revocation status for any issued credential.

GET /status/list.json
curl https://benirai.org/status/list.json \
  -H "Accept: application/ld+json"

Each credential's credentialStatus.statusListIndex maps to a bit position in the encoded list. A set bit (1) means revoked.

Discovery Endpoints

EndpointPurpose
/.well-known/did.jsonDID document (did:web:benirai.org)
/.well-known/mcp.jsonMCP server manifest
/.well-known/agent.jsonAgent capability declaration
/.well-known/agent-manifest.jsonExtended agent manifest
/.well-known/oauth-authorization-serverOAuth 2.0 server metadata
/.well-known/openid-configurationOIDC discovery
/.well-known/jwks.jsonJSON Web Key Set
/.well-known/webfingerWebFinger resource discovery
/.well-known/nodeinfoNodeInfo discovery
/.well-known/host-metaHost metadata (XRD)
/.well-known/tdmrep.jsonTDM reservation (AI training opt-out)
/.well-known/gpc.jsonGlobal Privacy Control
/.well-known/security.txtSecurity contact
/.well-known/agents.jsonAgent registry
/llms.txtLLM access guide
/llms-full.txtFull LLM context
/ai.txtAI policy
/sitemap-agent.xmlAgent-optimized sitemap
/methodology.jsonAssessment methodology (JSON)
/schemas/JSON-LD schema catalog
Assessment MethodologyTransparency LogPeer Issuer RegistryAttestations ArchiveSchema Catalog