Aller au contenu
GitHub

Moderation

REST APIGeneratedfrom OpenAPI 3.2.0openapi.json

Ce contenu n’est pas encore disponible dans votre langue.

What every endpoint shares is on Conventions.

Serve the caller’s own moderation record.

Authentication: required — bearer.

Parameters

  • X-Capsule-Crypto-Suite header integer

    The crypto suite id from the primitives inventory. Sent on writes; a suite this server does not implement is refused with 400.

  • X-Capsule-Protocol header string required

    The YYYY-MM-DD protocol version this request is written against. Outside the server’s [X-Capsule-Protocol-Min, X-Capsule-Protocol-Max] window the request is refused with 426.

  • X-Capsule-Sidecar-Schema header integer

    The sidecar schema version declared at sidecar_schema field 0. Sent on metadata updates; a schema newer than this server indexes is refused with 400.

Responses

  • 200 ModerationRecordResponse application/json

    OK. Headers: X-Capsule-Min-Client-Build, X-Capsule-Protocol-Max, X-Capsule-Protocol-Min, X-Request-Id.

  • 400 CodedProblem application/problem+json

    Bad Request; Malformed handshake. Headers: X-Capsule-Min-Client-Build, X-Capsule-Protocol-Max, X-Capsule-Protocol-Min, X-Request-Id.

  • 401 CodedProblem application/problem+json

    Unauthorized. Headers: WWW-Authenticate, X-Capsule-Min-Client-Build, X-Capsule-Protocol-Max, X-Capsule-Protocol-Min, X-Request-Id.

  • 403 CodedProblem application/problem+json

    Forbidden. Headers: X-Capsule-Min-Client-Build, X-Capsule-Protocol-Max, X-Capsule-Protocol-Min, X-Request-Id.

  • 413 CodedProblem application/problem+json

    the request body exceeds the configured limit. Headers: X-Capsule-Min-Client-Build, X-Capsule-Protocol-Max, X-Capsule-Protocol-Min, X-Request-Id.

  • 500 CodedProblem application/problem+json

    Internal server error. Headers: X-Capsule-Min-Client-Build, X-Capsule-Protocol-Max, X-Capsule-Protocol-Min, X-Request-Id.

Request
curl -X GET 'https://capsule.example/v1/moderation/record' \
-H "Authorization: Bearer $TOKEN" \
-H 'X-Capsule-Protocol: 2026-01-01'
200 · application/json
{
"standing": "string",
"suspended_since": "string",
"events": [
{
"action": "string",
"asset_id": "string",
"at": "string",
"reason": "string"
}
]
}

The models these endpoints carry, to 4 references deep.

An RFC 9457 problem detail.

Field Type Description
type string Required.
title string —
status integer Required.
detail string —
instance string —
code string Required. The stable error.* catalog code. The client localizes this; detail stays English. Present on every problem this server renders.
request_id string The UUIDv7 this server minted for the request, as the X-Request-Id header carries it. Quote it when reporting the failure: it names the request’s log lines.

One thing that was done to the account.

Field Type Description
action string Required. What was done: suspended, reinstated, taken_down, legal_hold, hold_lifted.
asset_id string | null The asset, when the action was about one rather than about the account.
at string Required. When it happened, RFC 3339.
reason string | null Why, where policy permits. Absent is a real answer — a legal hold may come with an obligation not to disclose it — and reads as “we are not able to say”, which is honest where a fabricated reason would not be.

The caller’s moderation record.

Field Type Description
standing string Required. active or suspended.
suspended_since string | null When a suspension began, RFC 3339. Absent while the account is active.
events ModerationEventResponse[] Required. Everything done to this account, oldest first. A reinstatement does not erase the suspension it lifted: the record is what a user reads to understand their own account, and one that deleted its own history would leave them unable to see that anything ever happened.