seahaven-ap/packages/api/openapi/paths/me.yaml
Adam Moussa cc637e3732
feat(api): serve portal-shaped health and error envelope
Move liveness to GET /api/health { stage, sha } with a Node 24 image on 8080 so ALB probes and deploy verify do not need auth or a database ping.
2026-09-22 12:33:19 -04:00

53 lines
1.7 KiB
YAML

get:
tags:
- Session
summary: Return the authenticated caller profile
description: Upserts the caller into users on first request and returns the stored profile used by the SPA session smoke path.
operationId: get-api-me
security:
- bearerAuth: []
responses:
"200":
description: Authenticated user profile.
content:
application/json:
schema:
$ref: ../components/schemas.yaml#/MeResponse
example:
id: 11111111-1111-4111-8111-111111111111
email: admin@seahavenind.com
name: Dev Admin
role: admin
"401":
description: Missing or invalid bearer token.
content:
application/json:
schema:
$ref: ../components/schemas.yaml#/Error
example:
error:
code: UNAUTHENTICATED
message: Missing or invalid Authorization header.
correlationId: 11111111-1111-4111-8111-111111111111
"409":
description: Email is already linked to a different Cognito subject.
content:
application/json:
schema:
$ref: ../components/schemas.yaml#/Error
example:
error:
code: CONFLICT
message: Email admin@seahavenind.com is already linked to a different identity.
correlationId: 11111111-1111-4111-8111-111111111111
"404":
description: Not found.
content:
application/json:
schema:
$ref: ../components/schemas.yaml#/Error
example:
error:
code: NOT_FOUND
message: Not found.
correlationId: 11111111-1111-4111-8111-111111111111