# /api/omerta (dashboard)

Source-derived dashboard endpoint contract, authentication, request validation, responses, and errors.

Source: https://docs.minds.sh/docs/api/platform/reference/dashboard--api-omerta



This is the **dashboard** service route. Its origin and authentication are described in [Platform API overview](/docs/api/platform) and [Authentication](/docs/api/platform/authentication). A path shared by another service is a different endpoint.

| Property                       | Contract                                 |
| ------------------------------ | ---------------------------------------- |
| Methods                        | GET, POST, PUT, PATCH, DELETE, HEAD      |
| Path                           | `/api/omerta`                            |
| Path parameters                | None                                     |
| Query parameters read in route | `omertaPath`                             |
| Headers read in route          | `content-type`, `accept`, `x-request-id` |

## Authentication and access [#authentication-and-access]

Dashboard session cookie through @repo/auth/server. Some auth-summary routes can redirect to sign-in; inspect the status branches below.

## Method behavior [#method-behavior]

The handler excerpt preserves field validation, response envelopes, cookie changes, and exception branches. Values returned by service helpers retain their named response type above; for passthrough routes, the upstream response is authoritative.

### GET [#get]

```typescript
export async function GET(request: NextRequest) {
  return handleOmertaRequest(request);
}
```

Source: `minds-ui/apps/app/app/api/omerta/route.ts:13`.

### POST [#post]

```typescript
export async function POST(request: NextRequest) {
  return handleOmertaRequest(request);
}
```

Source: `minds-ui/apps/app/app/api/omerta/route.ts:17`.

### PUT [#put]

```typescript
export async function PUT(request: NextRequest) {
  return handleOmertaRequest(request);
}
```

Source: `minds-ui/apps/app/app/api/omerta/route.ts:21`.

### PATCH [#patch]

```typescript
export async function PATCH(request: NextRequest) {
  return handleOmertaRequest(request);
}
```

Source: `minds-ui/apps/app/app/api/omerta/route.ts:25`.

### DELETE [#delete]

```typescript
export async function DELETE(request: NextRequest) {
  return handleOmertaRequest(request);
}
```

Source: `minds-ui/apps/app/app/api/omerta/route.ts:29`.

### HEAD [#head]

```typescript
export async function HEAD(request: NextRequest) {
  return handleOmertaRequest(request);
}
```

Source: `minds-ui/apps/app/app/api/omerta/route.ts:33`.

## Response and error branches [#response-and-error-branches]

Literal HTTP statuses in the route: 200, 400, 401, 502. Shared management error classes are defined in [Errors and responses](/docs/api/platform/errors).

```typescript
NextResponse.json(
      { error: { code: 'UNAUTHENTICATED', message: 'Sign in at auth.l1fe.ai before using Minds.' } },
      { status: 401 }
    )
```

Source: `minds-ui/apps/app/app/api/omerta/route.ts:40`.

```typescript
NextResponse.json(
      { error: { code: 'INVALID_OMERTA_PATH', message: 'Omerta path is required.' } },
      { status: 400 }
    )
```

Source: `minds-ui/apps/app/app/api/omerta/route.ts:48`.

```typescript
NextResponse.json(
      { error: { code: 'OMERTA_UPSTREAM_UNAVAILABLE', message } },
      { status: 502, headers: noStoreHeaders() }
    )
```

Source: `minds-ui/apps/app/app/api/omerta/route.ts:75`.

```typescript
NextResponse.json(fallback, { status: 200, headers: noStoreHeaders() })
```

Source: `minds-ui/apps/app/app/api/omerta/route.ts:143`.

## Evidence [#evidence]

Generated from the local source snapshot on 2026-09-12. This page documents implemented code and does not certify a deployed service, permissions configuration, or successful provider operation.

Source file: `minds-ui/apps/app/app/api/omerta/route.ts`. SHA-256: `f2c78d9ab09bcb07b79675e805b8f6b0512471e1aa5472150b6148274d40404a`.
