Set channel send restriction
Operation boundary
- Caller: Trusted backend only
- Scope: Restriction for the actual source Channel; person IDs must be canonical and CMD-derived keys are invalid; login, receiving and protocol ACKs remain allowed.
- Atomicity: The policy and its independent uint64 version change atomically in one Slot apply; an identical value does not increment the version.
- Success: 200 returns the applied policy with a decimal-string version; terminal disband is irreversible.
- Recovery: A timeout or 503 may follow a commit; GET the current policy first. After 409, reload and make a new mutation decision instead of blindly retrying the old expected_version.
/channel/send_banAtomically set one send policy with optional decimal-string CAS; unchanged values retain the version.
Request Body
application/json
Strict bounded policy mutation.
TypeScript Definitions
Use the request body type in TypeScript.
One strict JSON object, at most 4096 bytes. Unknown fields and trailing JSON are rejected; numeric fields use Go integer syntax.
Response Body
application/json
application/json
application/json
application/json
application/json
{ "status": 200, "data": { "channel_id": "string", "channel_type": 1, "send_ban": 0, "send_ban_version": "string" }}