Header menu logo FSharp.ATProto

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

addMember agent serviceDid memberDid role

Full Usage: addMember agent serviceDid memberDid role

Parameters:
    agent : 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.

agent : 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.

createTemplate agent serviceDid name contentMarkdown subject

Full Usage: createTemplate agent serviceDid name contentMarkdown subject

Parameters:
    agent : 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.

agent : 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.

deleteTemplate agent serviceDid id

Full Usage: deleteTemplate agent serviceDid id

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    serviceDid : Did - The DID of the Ozone moderation service.
    id : string - The ID of the template to delete.

Returns: Task<Result<unit, XrpcError>> Ok () on success, or an XrpcError.

Delete a communication template by ID.

agent : AtpAgent

An authenticated AtpAgent.

serviceDid : Did

The DID of the Ozone moderation service.

id : string

The ID of the template to delete.

Returns: Task<Result<unit, XrpcError>>

Ok () on success, or an XrpcError.

emitEvent agent serviceDid subject action

Full Usage: emitEvent agent serviceDid subject action

Parameters:
    agent : 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.

agent : 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.

getEvent agent serviceDid eventId

Full Usage: getEvent agent serviceDid eventId

Parameters:
    agent : 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.

agent : 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.

getRecord agent serviceDid uri

Full Usage: getRecord agent serviceDid uri

Parameters:
    agent : 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.

agent : 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.

getRepo agent serviceDid did

Full Usage: getRepo agent serviceDid did

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    serviceDid : Did - The DID of the Ozone moderation service.
    did : Did - The DID of the account to look up.

Returns: Task<Result<RepoViewDetail, XrpcError>> The detailed repo view, or an XrpcError.

Get the detailed moderation view for a specific repo (account) by DID.

agent : AtpAgent

An authenticated AtpAgent.

serviceDid : Did

The DID of the Ozone moderation service.

did : Did

The DID of the account to look up.

Returns: Task<Result<RepoViewDetail, XrpcError>>

The detailed repo view, or an XrpcError.

getSubjects agent serviceDid subjects

Full Usage: getSubjects agent serviceDid subjects

Parameters:
    agent : 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).

agent : 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.

listMembers agent serviceDid limit cursor

Full Usage: listMembers agent serviceDid limit cursor

Parameters:
    agent : 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.

List the members of the Ozone moderation team.

agent : 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.

listTemplates agent serviceDid

Full Usage: listTemplates agent serviceDid

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    serviceDid : Did - The DID of the Ozone moderation service.

Returns: Task<Result<CommunicationTemplate list, XrpcError>> A list of communication templates, or an XrpcError.

List all communication templates in the Ozone moderation service.

agent : AtpAgent

An authenticated AtpAgent.

serviceDid : Did

The DID of the Ozone moderation service.

Returns: Task<Result<CommunicationTemplate list, XrpcError>>

A list of communication templates, or an XrpcError.

queryEvents agent serviceDid subject limit cursor

Full Usage: queryEvents agent serviceDid subject limit cursor

Parameters:
    agent : 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.

agent : 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.

queryStatuses agent serviceDid reviewState limit cursor

Full Usage: queryStatuses agent serviceDid reviewState limit cursor

Parameters:
    agent : 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.

agent : 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.

removeMember agent serviceDid memberDid

Full Usage: removeMember agent serviceDid memberDid

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    serviceDid : Did - The DID of the Ozone moderation service.
    memberDid : Did - The DID of the member to remove.

Returns: Task<Result<unit, XrpcError>> Ok () on success, or an XrpcError.

Remove a member from the Ozone moderation team.

agent : AtpAgent

An authenticated AtpAgent.

serviceDid : Did

The DID of the Ozone moderation service.

memberDid : Did

The DID of the member to remove.

Returns: Task<Result<unit, XrpcError>>

Ok () on success, or an XrpcError.

searchRepos agent serviceDid query limit cursor

Full Usage: searchRepos agent serviceDid query limit cursor

Parameters:
    agent : 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.

agent : 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.

updateMember agent serviceDid memberDid role disabled

Full Usage: updateMember agent serviceDid memberDid role disabled

Parameters:
    agent : 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.

agent : 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.

updateTemplate agent serviceDid id name contentMarkdown subject disabled

Full Usage: updateTemplate agent serviceDid id name contentMarkdown subject disabled

Parameters:
    agent : 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.

agent : 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.

Type something to start searching.