REST /api/v1/auth/org-context 6 endpoints
GET /api/v1/auth/org-context/api/v1/auth/org-context

List recent route guard evaluation records for the current session

Public

Response Example

{
  "data": [
    {
      "guard_id": "grd_01J4K8M2N3P5Q7G1",
      "route": "/dashboard",
      "is_authenticated": true,
      "is_org_context_valid": true,
      "redirect_path": null,
      "evaluated_at": "2026-03-26T12:00:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 1
  }
}
GET /api/v1/auth/org-context/api/v1/auth/org-context/:id

Get a specific route guard evaluation record

Public

Response Example

{
  "guard_id": "grd_01J4K8M2N3P5Q7G1",
  "route": "/dashboard",
  "is_authenticated": true,
  "is_org_context_valid": true,
  "redirect_path": null,
  "evaluated_at": "2026-03-26T12:00:00Z"
}
POST /api/v1/auth/org-context/api/v1/auth/org-context

Evaluate route guard — determine if user can access a route and get redirect if blocked

Public

Request Example

{
  "route": "/cohorts/manage",
  "org_id": "org_01J4K8M2N3P5Q7R9"
}

Response Example

{
  "guard_id": "grd_01J9X3P7K2M4N6L0",
  "route": "/cohorts/manage",
  "is_authenticated": true,
  "is_org_context_valid": true,
  "redirect_path": null,
  "evaluated_at": "2026-03-26T12:00:00Z",
  "created_at": "2026-03-26T12:00:00Z"
}
PUT /api/v1/auth/org-context/api/v1/auth/org-context/:id

Re-evaluate a route guard check with updated context

Public

Request Example

{
  "org_id": "org_01J4K8M2N3P5Q7R9",
  "route": "/cohorts/manage"
}

Response Example

{
  "guard_id": "grd_01J9X3P7K2M4N6L0",
  "route": "/cohorts/manage",
  "is_authenticated": true,
  "is_org_context_valid": true,
  "redirect_path": null,
  "updated_at": "2026-03-26T13:00:00Z"
}
DELETE /api/v1/auth/org-context/api/v1/auth/org-context/:id

Invalidate a cached route guard evaluation

Public

Response Example

{
  "success": true,
  "invalidated_at": "2026-03-26T16:00:00Z"
}
GET /api/v1/auth/org-context/api/v1/auth/org-context/validate

Quick-check: is the current session authenticated with a valid org context?

Public

Response Example

{
  "is_authenticated": true,
  "is_org_context_valid": true,
  "org_id": "org_01J4K8M2N3P5Q7R9",
  "redirect_path": null,
  "checked_at": "2026-03-26T12:00:00Z"
}

Additional Metadata

{
  "contract_summary": {
    "total_contracts": 410,
    "total_endpoints": 2416,
    "api_styles_used": [
      "rest"
    ]
  },
  "generated_at": "2026-03-26T06:55:53.316Z"
}