Ozone Module
Convenience methods for Ozone moderation tooling (tools.ozone.* endpoints).
Wraps the generated XRPC types with a simplified, type-safe API.
Ozone endpoints require the agent to be proxied to the moderation service.
Pass the labeler/moderation service DID via the serviceDid parameter.
The proxy header (atproto-proxy: {did}#atproto_labeler) is applied
automatically -- callers do not need to configure proxy headers manually.
Functions and values
| Function or value |
Description
|
Full Usage:
addMember agent serviceDid memberDid role
Parameters:
AtpAgent
-
An authenticated AtpAgent.
serviceDid : Did
-
The DID of the Ozone moderation service.
memberDid : Did
-
The DID of the user to add as a team member.
role : TeamRole
-
The role to assign to the new member.
Returns: Task<Result<TeamMember, XrpcError>>
The newly created team member, or an XrpcError.
|
Add a new member to the Ozone moderation team.
|
Full Usage:
createTemplate agent serviceDid name contentMarkdown subject
Parameters:
AtpAgent
-
An authenticated AtpAgent.
serviceDid : Did
-
The DID of the Ozone moderation service.
name : string
-
The name of the template.
contentMarkdown : string
-
The template content in Markdown format.
subject : string
-
Optional subject line for the template.
Returns: Task<Result<CommunicationTemplate, XrpcError>>
The newly created template, or an XrpcError.
|
Create a new communication template.
|
|
|
Full Usage:
emitEvent agent serviceDid subject action
Parameters:
AtpAgent
-
An authenticated AtpAgent.
serviceDid : Did
-
The DID of the Ozone moderation service to proxy to.
subject : OzoneSubject
-
The subject of the moderation action (account or record).
action : ModerationAction
-
The moderation action to perform.
Returns: Task<Result<ModEventView, XrpcError>>
The emitted moderation event view, or an XrpcError.
|
Emit a moderation event on a subject. This is the primary way to take moderation actions in Ozone: takedowns, labels, flags, acknowledgments, escalations, and more.
|
Full Usage:
getEvent agent serviceDid eventId
Parameters:
AtpAgent
-
An authenticated AtpAgent.
serviceDid : Did
-
The DID of the Ozone moderation service.
eventId : int64
-
The numeric ID of the moderation event.
Returns: Task<Result<ModEventViewDetail, XrpcError>>
The detailed event view, or an XrpcError.
|
Get the details of a specific moderation event by its ID.
|
Full Usage:
getRecord agent serviceDid uri
Parameters:
AtpAgent
-
An authenticated AtpAgent.
serviceDid : Did
-
The DID of the Ozone moderation service.
uri : AtUri
-
The AT-URI of the record to look up.
Returns: Task<Result<RecordViewDetail, XrpcError>>
The detailed record view, or an XrpcError.
|
Get the detailed moderation view for a specific record by AT-URI.
|
|
Get the detailed moderation view for a specific repo (account) by DID.
|
Full Usage:
getSubjects agent serviceDid subjects
Parameters:
AtpAgent
-
An authenticated AtpAgent.
serviceDid : Did
-
The DID of the Ozone moderation service.
subjects : string list
-
A list of subject identifiers (DID strings or AT-URI strings).
Returns: Task<Result<SubjectView list, XrpcError>>
A list of subject views, or an XrpcError.
|
Get detailed subject information for one or more subjects (by DID or AT-URI string).
|
Full Usage:
listMembers agent serviceDid limit cursor
Parameters:
AtpAgent
-
An authenticated AtpAgent.
serviceDid : Did
-
The DID of the Ozone moderation service.
limit : int64 option
-
Maximum number of members to return.
cursor : string option
-
Pagination cursor from a previous response.
Returns: Task<Result<Page<TeamMember>, XrpcError>>
A page of team members, or an XrpcError.
|
|
|
|
Full Usage:
queryEvents agent serviceDid subject limit cursor
Parameters:
AtpAgent
-
An authenticated AtpAgent.
serviceDid : Did
-
The DID of the Ozone moderation service.
subject : Uri option
-
Optional subject URI to filter events for.
limit : int64 option
-
Maximum number of events to return.
cursor : string option
-
Pagination cursor from a previous response.
Returns: Task<Result<Page<ModEventView>, XrpcError>>
A page of moderation event views, or an XrpcError.
|
Query moderation events, optionally filtered by subject, type, or date range. |
Full Usage:
queryStatuses agent serviceDid reviewState limit cursor
Parameters:
AtpAgent
-
An authenticated AtpAgent.
serviceDid : Did
-
The DID of the Ozone moderation service.
reviewState : ParamsReviewState option
-
Optional review state filter (e.g. ReviewOpen, ReviewEscalated).
limit : int64 option
-
Maximum number of statuses to return.
cursor : string option
-
Pagination cursor from a previous response.
Returns: Task<Result<Page<SubjectStatusView>, XrpcError>>
A page of subject status views, or an XrpcError.
|
Query subject statuses in the moderation queue. This is the primary way to list items in the moderation review queue.
|
|
|
Full Usage:
searchRepos agent serviceDid query limit cursor
Parameters:
AtpAgent
-
An authenticated AtpAgent.
serviceDid : Did
-
The DID of the Ozone moderation service.
query : string
-
The search query string.
limit : int64 option
-
Maximum number of results to return.
cursor : string option
-
Pagination cursor from a previous response.
Returns: Task<Result<Page<RepoView>, XrpcError>>
A page of repo views, or an XrpcError.
|
Search repos (accounts) in the moderation system by query string. |
Full Usage:
updateMember agent serviceDid memberDid role disabled
Parameters:
AtpAgent
-
An authenticated AtpAgent.
serviceDid : Did
-
The DID of the Ozone moderation service.
memberDid : Did
-
The DID of the member to update.
role : TeamRole option
-
The new role for the member, or None to leave unchanged.
disabled : bool option
-
Whether the member should be disabled, or None to leave unchanged.
Returns: Task<Result<TeamMember, XrpcError>>
The updated team member, or an XrpcError.
|
Update an existing team member's role or disabled status.
|
Full Usage:
updateTemplate agent serviceDid id name contentMarkdown subject disabled
Parameters:
AtpAgent
-
An authenticated AtpAgent.
serviceDid : Did
-
The DID of the Ozone moderation service.
id : string
-
The ID of the template to update.
name : string option
-
New name, or None to leave unchanged.
contentMarkdown : string option
-
New content, or None to leave unchanged.
subject : string option
-
New subject, or None to leave unchanged.
disabled : bool option
-
Whether to disable the template, or None to leave unchanged.
Returns: Task<Result<CommunicationTemplate, XrpcError>>
The updated template, or an XrpcError.
|
Update an existing communication template.
|