Status. Proposed design only. Nothing in this vault is DG client approval. No application, service or test has been executed; every scenario is Not executed. Fees and dates are open.

Request pipeline

Purpose

Per-route guard requirements. Contracts are illustrative, not frozen (API-and-Request-Pipeline).

Pipeline

Authenticate session, resolve membership, authorise record (role plus assignment), validate version or transition, commit mutation and event. See Authentication-and-Authorization.

Route guards (Proposed)

OperationIllustrative routeRequired guard
Company contextGET /v1/me/companyExactly one active membership
Draft and publishPOST /v1/opportunities, PATCH /v1/opportunities/{id}, POST /v1/opportunities/{id}/publishSchema validation, owning-company role or assignment, expected version, approval binding
DiscoveryGET /v1/opportunities, GET /v1/recommendationsAudience and active-status filtering before search, ranking, snippets, counts, pagination
Question or interestPOST /v1/opportunities/{id}/questions, /expressionsAuthorised opportunity, no self-interest, meaningful fields, approved contributor submission, version reference, idempotency key
Accept discussionPOST /v1/expressions/{id}/acceptOwner-side authority, current response state, one discussion, state and event committed together
Messages and actionsGET/POST /v1/conversations/{id}/messages, POST /{id}/actionsParticipant-company access plus role and assignment; eligible assignee; safe due-date transitions
Team and administrationinvitation, membership, recovery endpointsCompany admin versus DG authority; DG MFA; one-company restriction; audit
HealthGET /v1/healthNone; returns status only, no version, host or environment

Failure behaviour

Consistent denial that never reveals existence; actionable validation; safe stale-write conflict; rate-limited abuse; retryable requests. Every enabled route is listed in the route inventory used by the isolation harness (Company-Isolation).

Open decisions

Blocked by Q02 (role matrix), Q08 (denial shape), Q09 (session and rate policy).

Change history

DateChange
2026-10-20Created (bootstrap Phase 2)