Create a block (ban) on behalf of a streamer. Requires 'ban' permission. Creates an app.bsky.graph.block record in the streamer's repository.
POST
/xrpc/place.stream.moderation.createBlock
const url = 'https://example.com/xrpc/place.stream.moderation.createBlock';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"streamer":"example","subject":"example","reason":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/xrpc/place.stream.moderation.createBlock \ --header 'Content-Type: application/json' \ --data '{ "streamer": "example", "subject": "example", "reason": "example" }'Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
streamer
required
The DID of the streamer whose chat this block applies to.
string format: did
subject
required
The DID of the user being blocked from chat.
string format: did
reason
Optional reason for the block.
string
Example generated
{ "streamer": "example", "subject": "example", "reason": "example"}Responses
Section titled “Responses”Success
Media typeapplication/json
object
uri
required
The AT-URI of the created block record.
string format: uri
cid
required
The CID of the created block record.
string format: cid
Example generated
{ "uri": "https://example.com", "cid": "example"}Bad Request
