DocShare module API (1.0.0)

Download OpenAPI specification:

Module-owned API fragment and source of truth for the DocShare module's HTTP boundary: per-file owner/editor/viewer sharing, enforced by authz object-mode checks on every read/write, never by the read-side index alone. All paths live under service.basePath (/api/docs), with the major version inside the module's own path space (/v1).

Liveness probe. Served on the service's own listener, not under `/api/<module>`.

Authorizations:
bearerAuth

Responses

Readiness probe (database ping). Served on the service's own listener, not under `/api/<module>`.

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Documents the caller may see (owned + shared-with-me, each verified via batch object-check)

Authorizations:
bearerAuth
path Parameters
companyId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Create a document (docs.create — membership-gated)

Authorizations:
bearerAuth
path Parameters
companyId
required
string <uuid>
header Parameters
Idempotency-Key
string <= 200 characters
Request Body schema: application/json
required
title
required
string [ 1 .. 200 ] characters
body
required
string

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "body": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Read a document (viewer relation, object-mode check)

Authorizations:
bearerAuth
path Parameters
companyId
required
string <uuid>
docId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update a document's title/body (editor relation, object-mode check)

Authorizations:
bearerAuth
path Parameters
companyId
required
string <uuid>
docId
required
string <uuid>
Request Body schema: application/json
required
title
required
string [ 1 .. 200 ] characters
body
required
string

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "body": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Delete a document (owner relation, object-mode check)

Authorizations:
bearerAuth
path Parameters
companyId
required
string <uuid>
docId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

List a document's current shares (viewer relation)

Authorizations:
bearerAuth
path Parameters
companyId
required
string <uuid>
docId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Grant a member viewer or editor access (owner relation); fires a notification event

Authorizations:
bearerAuth
path Parameters
companyId
required
string <uuid>
docId
required
string <uuid>
header Parameters
Idempotency-Key
string <= 200 characters
Request Body schema: application/json
required
memberId
required
string <uuid>
relation
required
string
Enum: "viewer" "editor"

Responses

Request samples

Content type
application/json
{
  • "memberId": "92983ab9-49c8-444b-85ae-6e40402cf72e",
  • "relation": "viewer"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Revoke a member's access (owner relation; owner cannot revoke self); fires a notification event

Authorizations:
bearerAuth
path Parameters
companyId
required
string <uuid>
docId
required
string <uuid>
memberId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

This document's audit trail (shares, revokes, edits) — viewer relation

Authorizations:
bearerAuth
path Parameters
companyId
required
string <uuid>
docId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Module-wide audit trail for the admin view (docs.manage) — never shows document content

Authorizations:
bearerAuth
path Parameters
companyId
required
string <uuid>
query Parameters
page
integer >= 1
Default: 1
pageSize
integer [ 1 .. 100 ]
Default: 25

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}