Header menu logo FSharp.ATProto

Bluesky Module

High-level convenience methods for common Bluesky operations: posting, replying, liking, reposting, following, blocking, uploading blobs, and deleting records. All methods require an authenticated AtpAgent.

Functions and values

Function or value Description

addBookmark agent target

Full Usage: addBookmark agent target

Parameters:
Returns: Task<Result<unit, XrpcError>> unit on success, or an XrpcError.
Modifiers: inline
Type parameters: ^a

Add a post to your bookmarks.

agent : AtpAgent

An authenticated AtpAgent.

target : ^a

A PostRef or TimelinePost identifying the post to bookmark.

Returns: Task<Result<unit, XrpcError>>

unit on success, or an XrpcError.

addBookmarkImpl agent postRef

Full Usage: addBookmarkImpl agent postRef

Parameters:
Returns: Task<Result<unit, XrpcError>>
agent : AtpAgent
postRef : PostRef
Returns: Task<Result<unit, XrpcError>>

addHiddenPost agent postUri

Full Usage: addHiddenPost agent postUri

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

Add a post URI to the hidden posts list.

agent : AtpAgent

An authenticated AtpAgent.

postUri : AtUri

The AT-URI of the post to hide.

Returns: Task<Result<unit, XrpcError>>

Ok () on success, or an XrpcError.

addListItem agent listUri subject

Full Usage: addListItem agent listUri subject

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    listUri : AtUri - The AT-URI of the list.
    subject : Did - The DID of the account to add.

Returns: Task<Result<ListItemRef, XrpcError>> A ListItemRef on success, or an XrpcError.

Add an account to a list.

agent : AtpAgent

An authenticated AtpAgent.

listUri : AtUri

The AT-URI of the list.

subject : Did

The DID of the account to add.

Returns: Task<Result<ListItemRef, XrpcError>>

A ListItemRef on success, or an XrpcError.

addMutedWord agent word

Full Usage: addMutedWord agent word

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

Add a muted word to the user's preferences.

agent : AtpAgent

An authenticated AtpAgent.

word : MutedWord

The MutedWord to add.

Returns: Task<Result<unit, XrpcError>>

Ok () on success, or an XrpcError.

addSavedFeed agent feed

Full Usage: addSavedFeed agent feed

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

Add a saved feed to the user's preferences.

agent : AtpAgent

An authenticated AtpAgent.

feed : SavedFeed

The SavedFeed to add.

Returns: Task<Result<unit, XrpcError>>

Ok () on success, or an XrpcError.

awaitVideoProcessing agent jobId maxAttempts

Full Usage: awaitVideoProcessing agent jobId maxAttempts

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    jobId : string - The job ID returned by uploadVideo.
    maxAttempts : int option - Maximum number of poll attempts (default 60, ~90 seconds).

Returns: Task<Result<BlobRef, XrpcError>> A BlobRef on success, or an XrpcError.

Poll a video processing job until it completes, then return the blob reference. Polls every 1.5 seconds, up to a maximum number of attempts.

agent : AtpAgent

An authenticated AtpAgent.

jobId : string

The job ID returned by uploadVideo.

maxAttempts : int option

Maximum number of poll attempts (default 60, ~90 seconds).

Returns: Task<Result<BlobRef, XrpcError>>

A BlobRef on success, or an XrpcError.

block agent target

Full Usage: block agent target

Parameters:
Returns: Task<Result<BlockRef, XrpcError>> A BlockRef on success, or an XrpcError. Pass the BlockRef to unblock to undo.
Modifiers: inline
Type parameters: ^a

Block a user. Accepts a Did, ProfileSummary, or Profile directly.

agent : AtpAgent

An authenticated AtpAgent.

target : ^a

The user to block — a Did, ProfileSummary, or Profile.

Returns: Task<Result<BlockRef, XrpcError>>

A BlockRef on success, or an XrpcError. Pass the BlockRef to unblock to undo.

blockByHandle agent identifier

Full Usage: blockByHandle agent identifier

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    identifier : string - A handle (e.g., my-handle.bsky.social) or DID string (e.g., did:plc:abc123).

Returns: Task<Result<BlockRef, XrpcError>> A BlockRef on success, or an XrpcError. Pass the BlockRef to unblock to undo.

Block a user by handle string. The handle is resolved to a DID, then the block is created. Also accepts a DID string directly (if it starts with did:, it is parsed as a DID).

For type-safe usage when you already have a Did, use block instead.

agent : AtpAgent

An authenticated AtpAgent.

identifier : string

A handle (e.g., my-handle.bsky.social) or DID string (e.g., did:plc:abc123).

Returns: Task<Result<BlockRef, XrpcError>>

A BlockRef on success, or an XrpcError. Pass the BlockRef to unblock to undo.

blockImpl agent did

Full Usage: blockImpl agent did

Parameters:
Returns: Task<Result<BlockRef, XrpcError>>
agent : AtpAgent
did : Did
Returns: Task<Result<BlockRef, XrpcError>>

blockModList agent listUri

Full Usage: blockModList agent listUri

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    listUri : AtUri - The AT-URI of the moderation list to block.

Returns: Task<Result<ListBlockRef, XrpcError>> A ListBlockRef on success, or an XrpcError. Pass the ListBlockRef to unblockModList to undo.

Block an entire moderation list. Creates a app.bsky.graph.listblock record.

agent : AtpAgent

An authenticated AtpAgent.

listUri : AtUri

The AT-URI of the moderation list to block.

Returns: Task<Result<ListBlockRef, XrpcError>>

A ListBlockRef on success, or an XrpcError. Pass the ListBlockRef to unblockModList to undo.

createAccount baseUrl handle email password inviteCode

Full Usage: createAccount baseUrl handle email password inviteCode

Parameters:
    baseUrl : string - The PDS base URL (e.g. "https://bsky.social").
    handle : Handle - The requested handle for the new account.
    email : string option - Optional email address for the account.
    password : string option - Optional password. May need to meet instance-specific strength requirements.
    inviteCode : string option - Optional invite code, if the PDS requires one.

Returns: Task<Result<AtpAgent, XrpcError>> An authenticated AtpAgent on success, or an XrpcError.

Create a new account on the given PDS and return an authenticated agent. Only the handle is required; email, password, and invite code are optional.

baseUrl : string

The PDS base URL (e.g. "https://bsky.social").

handle : Handle

The requested handle for the new account.

email : string option

Optional email address for the account.

password : string option

Optional password. May need to meet instance-specific strength requirements.

inviteCode : string option

Optional invite code, if the PDS requires one.

Returns: Task<Result<AtpAgent, XrpcError>>

An authenticated AtpAgent on success, or an XrpcError.

createList agent name purpose description

Full Usage: createList agent name purpose description

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    name : string - The name of the list.
    purpose : ListPurpose - The list purpose (curate list, mod list, or reference list).
    description : string option - Optional description for the list.

Returns: Task<Result<ListRef, XrpcError>> A ListRef on success, or an XrpcError.

Create a new list.

agent : AtpAgent

An authenticated AtpAgent.

name : string

The name of the list.

purpose : ListPurpose

The list purpose (curate list, mod list, or reference list).

description : string option

Optional description for the list.

Returns: Task<Result<ListRef, XrpcError>>

A ListRef on success, or an XrpcError.

createStarterPack agent name listUri description feedUris

Full Usage: createStarterPack agent name listUri description feedUris

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    name : string - The name of the starter pack.
    listUri : AtUri - The AT-URI of the list containing the starter pack members.
    description : string option - Optional description for the starter pack.
    feedUris : AtUri list option - Optional list of feed generator URIs to include.

Returns: Task<Result<StarterPackRef, XrpcError>> A StarterPackRef on success, or an XrpcError.

Create a starter pack.

agent : AtpAgent

An authenticated AtpAgent.

name : string

The name of the starter pack.

listUri : AtUri

The AT-URI of the list containing the starter pack members.

description : string option

Optional description for the starter pack.

feedUris : AtUri list option

Optional list of feed generator URIs to include.

Returns: Task<Result<StarterPackRef, XrpcError>>

A StarterPackRef on success, or an XrpcError.

deleteAccount agent password token

Full Usage: deleteAccount agent password token

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    password : string - The account password.
    token : string - The deletion token received via email after calling requestAccountDelete.

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

Delete the authenticated user's account. Requires a token from requestAccountDelete (sent via email) and the account password. After successful deletion, the agent's session is cleared.

agent : AtpAgent

An authenticated AtpAgent.

password : string

The account password.

token : string

The deletion token received via email after calling requestAccountDelete.

Returns: Task<Result<unit, XrpcError>>

Ok () on success, or an XrpcError.

deleteList agent listUri

Full Usage: deleteList agent listUri

Parameters:
Returns: Task<Result<unit, XrpcError>> unit on success, or an XrpcError.

Delete a list.

agent : AtpAgent

An authenticated AtpAgent.

listUri : AtUri

The AT-URI of the list to delete.

Returns: Task<Result<unit, XrpcError>>

unit on success, or an XrpcError.

deleteRecord agent target

Full Usage: deleteRecord agent target

Parameters:
Returns: Task<Result<unit, XrpcError>> Ok () on success, or an XrpcError.
Modifiers: inline
Type parameters: ^a

Delete a record by its AT-URI. Accepts an AtUri, PostRef, or TimelinePost. Can be used to unlike, un-repost, unfollow, unblock, or delete a post.

The AT-URI is parsed to extract the repo DID, collection, and record key. This is a general-purpose delete; pass the AT-URI returned when the record was created.

agent : AtpAgent

An authenticated AtpAgent.

target : ^a

The AT-URI of the record to delete (an AtUri, PostRef, or TimelinePost).

Returns: Task<Result<unit, XrpcError>>

Ok () on success, or an XrpcError.

deleteRecordImpl agent atUri

Full Usage: deleteRecordImpl agent atUri

Parameters:
Returns: Task<Result<unit, XrpcError>>
agent : AtpAgent
atUri : AtUri
Returns: Task<Result<unit, XrpcError>>

deleteStarterPack agent starterPackUri

Full Usage: deleteStarterPack agent starterPackUri

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    starterPackUri : AtUri - The AT-URI of the starter pack to delete.

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

Delete a starter pack.

agent : AtpAgent

An authenticated AtpAgent.

starterPackUri : AtUri

The AT-URI of the starter pack to delete.

Returns: Task<Result<unit, XrpcError>>

unit on success, or an XrpcError.

follow agent target

Full Usage: follow agent target

Parameters:
Returns: Task<Result<FollowRef, XrpcError>> A FollowRef on success, or an XrpcError. Pass the FollowRef to unfollow to undo.
Modifiers: inline
Type parameters: ^a

Follow a user. Accepts a Did, ProfileSummary, or Profile directly.

agent : AtpAgent

An authenticated AtpAgent.

target : ^a

The user to follow — a Did, ProfileSummary, or Profile.

Returns: Task<Result<FollowRef, XrpcError>>

A FollowRef on success, or an XrpcError. Pass the FollowRef to unfollow to undo.

followByHandle agent identifier

Full Usage: followByHandle agent identifier

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    identifier : string - A handle (e.g., my-handle.bsky.social) or DID string (e.g., did:plc:abc123).

Returns: Task<Result<FollowRef, XrpcError>> A FollowRef on success, or an XrpcError. Pass the FollowRef to unfollow to undo.

Follow a user by handle string. The handle is resolved to a DID, then the follow is created. Also accepts a DID string directly (if it starts with did:, it is parsed as a DID).

For type-safe usage when you already have a Did, use follow instead.

agent : AtpAgent

An authenticated AtpAgent.

identifier : string

A handle (e.g., my-handle.bsky.social) or DID string (e.g., did:plc:abc123).

Returns: Task<Result<FollowRef, XrpcError>>

A FollowRef on success, or an XrpcError. Pass the FollowRef to unfollow to undo.

followImpl agent did

Full Usage: followImpl agent did

Parameters:
Returns: Task<Result<FollowRef, XrpcError>>
agent : AtpAgent
did : Did
Returns: Task<Result<FollowRef, XrpcError>>

followVia agent target via

Full Usage: followVia agent target via

Parameters:
Returns: Task<Result<FollowRef, XrpcError>> A FollowRef on success, or an XrpcError.
Modifiers: inline
Type parameters: ^a, ^b

Follow a user with via attribution. The via parameter records where the user discovered the account (e.g. a post that introduced the account).

agent : AtpAgent

An authenticated AtpAgent.

target : ^a

The user to follow -- a Did, ProfileSummary, or Profile.

via : ^b

A PostRef or TimelinePost identifying how the account was discovered.

Returns: Task<Result<FollowRef, XrpcError>>

A FollowRef on success, or an XrpcError.

followViaImpl agent did viaRef

Full Usage: followViaImpl agent did viaRef

Parameters:
Returns: Task<Result<FollowRef, XrpcError>>
agent : AtpAgent
did : Did
viaRef : PostRef
Returns: Task<Result<FollowRef, XrpcError>>

getActorFeeds agent actor limit cursor

Full Usage: getActorFeeds agent actor limit cursor

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    actor : ^a - A Handle, Did, ProfileSummary, or Profile.
    limit : int64 option - Maximum number of feed generators to return (optional).
    cursor : string option - Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<FeedGenerator>, XrpcError>> A page of FeedGenerator with an optional cursor, or an XrpcError.
Modifiers: inline
Type parameters: ^a

Get feed generators created by an actor. Accepts a Handle, Did, ProfileSummary, or Profile.

agent : AtpAgent

An authenticated AtpAgent.

actor : ^a

A Handle, Did, ProfileSummary, or Profile.

limit : int64 option

Maximum number of feed generators to return (optional).

cursor : string option

Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<FeedGenerator>, XrpcError>>

A page of FeedGenerator with an optional cursor, or an XrpcError.

getActorFeedsImpl agent actorStr limit cursor

Full Usage: getActorFeedsImpl agent actorStr limit cursor

Parameters:
    agent : AtpAgent
    actorStr : string
    limit : int64 option
    cursor : string option

Returns: Task<Result<Page<FeedGenerator>, XrpcError>>
agent : AtpAgent
actorStr : string
limit : int64 option
cursor : string option
Returns: Task<Result<Page<FeedGenerator>, XrpcError>>

getActorLikes agent actor limit cursor

Full Usage: getActorLikes agent actor limit cursor

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    actor : ^a - A Handle, Did, ProfileSummary, or Profile.
    limit : int64 option - Maximum number of posts to return (optional).
    cursor : string option - Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<FeedItem>, XrpcError>> A page of FeedItem with an optional cursor, or an XrpcError.
Modifiers: inline
Type parameters: ^a

Get the posts that a specific actor has liked. Accepts a Handle, Did, ProfileSummary, or Profile.

agent : AtpAgent

An authenticated AtpAgent.

actor : ^a

A Handle, Did, ProfileSummary, or Profile.

limit : int64 option

Maximum number of posts to return (optional).

cursor : string option

Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<FeedItem>, XrpcError>>

A page of FeedItem with an optional cursor, or an XrpcError.

getActorLikesImpl agent actorStr limit cursor

Full Usage: getActorLikesImpl agent actorStr limit cursor

Parameters:
    agent : AtpAgent
    actorStr : string
    limit : int64 option
    cursor : string option

Returns: Task<Result<Page<FeedItem>, XrpcError>>
agent : AtpAgent
actorStr : string
limit : int64 option
cursor : string option
Returns: Task<Result<Page<FeedItem>, XrpcError>>

getAuthorFeed agent actor limit cursor

Full Usage: getAuthorFeed agent actor limit cursor

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    actor : ^a - A Handle, Did, ProfileSummary, or Profile.
    limit : int64 option - Maximum number of posts to return (optional).
    cursor : string option - Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<FeedItem>, XrpcError>> A page of FeedItem with an optional cursor, or an XrpcError.
Modifiers: inline
Type parameters: ^a

Get a specific user's feed (posts by that actor). Accepts a Handle, Did, ProfileSummary, or Profile.

agent : AtpAgent

An authenticated AtpAgent.

actor : ^a

A Handle, Did, ProfileSummary, or Profile.

limit : int64 option

Maximum number of posts to return (optional).

cursor : string option

Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<FeedItem>, XrpcError>>

A page of FeedItem with an optional cursor, or an XrpcError.

getAuthorFeedImpl agent actorStr limit cursor

Full Usage: getAuthorFeedImpl agent actorStr limit cursor

Parameters:
    agent : AtpAgent
    actorStr : string
    limit : int64 option
    cursor : string option

Returns: Task<Result<Page<FeedItem>, XrpcError>>
agent : AtpAgent
actorStr : string
limit : int64 option
cursor : string option
Returns: Task<Result<Page<FeedItem>, XrpcError>>

getBlob agent did cid

Full Usage: getBlob agent did cid

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    did : Did - The DID of the repository that owns the blob.
    cid : Cid - The CID of the blob to fetch.

Returns: Task<Result<byte[], XrpcError>> The raw blob bytes, or an XrpcError.

Fetch a blob by DID and CID from the repository sync endpoint. Returns the raw blob bytes.

agent : AtpAgent

An authenticated AtpAgent.

did : Did

The DID of the repository that owns the blob.

cid : Cid

The CID of the blob to fetch.

Returns: Task<Result<byte[], XrpcError>>

The raw blob bytes, or an XrpcError.

getBlocks agent limit cursor

Full Usage: getBlocks agent limit cursor

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    limit : int64 option - Maximum number of blocked accounts to return (optional).
    cursor : string option - Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<ProfileSummary>, XrpcError>> A page of ProfileSummary with an optional cursor, or an XrpcError.

Get the authenticated user's block list.

agent : AtpAgent

An authenticated AtpAgent.

limit : int64 option

Maximum number of blocked accounts to return (optional).

cursor : string option

Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<ProfileSummary>, XrpcError>>

A page of ProfileSummary with an optional cursor, or an XrpcError.

getBookmarks agent limit cursor

Full Usage: getBookmarks agent limit cursor

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    limit : int64 option - Maximum number of bookmarks to return (optional).
    cursor : string option - Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<TimelinePost>, XrpcError>> A page of TimelinePost with an optional cursor, or an XrpcError.

Get the authenticated user's bookmarked posts.

agent : AtpAgent

An authenticated AtpAgent.

limit : int64 option

Maximum number of bookmarks to return (optional).

cursor : string option

Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<TimelinePost>, XrpcError>>

A page of TimelinePost with an optional cursor, or an XrpcError.

getFeed agent feedUri limit cursor

Full Usage: getFeed agent feedUri limit cursor

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    feedUri : AtUri - The AT-URI of the feed generator.
    limit : int64 option - Maximum number of posts to return (optional).
    cursor : string option - Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<FeedItem>, XrpcError>> A page of FeedItem with an optional cursor, or an XrpcError.

Get posts from a custom feed generator.

agent : AtpAgent

An authenticated AtpAgent.

feedUri : AtUri

The AT-URI of the feed generator.

limit : int64 option

Maximum number of posts to return (optional).

cursor : string option

Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<FeedItem>, XrpcError>>

A page of FeedItem with an optional cursor, or an XrpcError.

getFeedGenerator agent feedUri

Full Usage: getFeedGenerator agent feedUri

Parameters:
Returns: Task<Result<FeedGenerator, XrpcError>> A FeedGenerator on success, or an XrpcError.

Get details about a specific feed generator.

agent : AtpAgent

An authenticated AtpAgent.

feedUri : AtUri

The AT-URI of the feed generator.

Returns: Task<Result<FeedGenerator, XrpcError>>

A FeedGenerator on success, or an XrpcError.

getFollowers agent actor limit cursor

Full Usage: getFollowers agent actor limit cursor

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    actor : ^a - A Handle, Did, ProfileSummary, or Profile.
    limit : int64 option - Maximum number of followers to return (optional).
    cursor : string option - Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<ProfileSummary>, XrpcError>> A page of ProfileSummary with an optional cursor, or an XrpcError.
Modifiers: inline
Type parameters: ^a

Get the followers of an actor. Accepts a Handle, Did, ProfileSummary, or Profile.

agent : AtpAgent

An authenticated AtpAgent.

actor : ^a

A Handle, Did, ProfileSummary, or Profile.

limit : int64 option

Maximum number of followers to return (optional).

cursor : string option

Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<ProfileSummary>, XrpcError>>

A page of ProfileSummary with an optional cursor, or an XrpcError.

getFollowersImpl agent actorStr limit cursor

Full Usage: getFollowersImpl agent actorStr limit cursor

Parameters:
    agent : AtpAgent
    actorStr : string
    limit : int64 option
    cursor : string option

Returns: Task<Result<Page<ProfileSummary>, XrpcError>>
agent : AtpAgent
actorStr : string
limit : int64 option
cursor : string option
Returns: Task<Result<Page<ProfileSummary>, XrpcError>>

getFollows agent actor limit cursor

Full Usage: getFollows agent actor limit cursor

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    actor : ^a - A Handle, Did, ProfileSummary, or Profile.
    limit : int64 option - Maximum number of follows to return (optional).
    cursor : string option - Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<ProfileSummary>, XrpcError>> A page of ProfileSummary with an optional cursor, or an XrpcError.
Modifiers: inline
Type parameters: ^a

Get the accounts that an actor follows. Accepts a Handle, Did, ProfileSummary, or Profile.

agent : AtpAgent

An authenticated AtpAgent.

actor : ^a

A Handle, Did, ProfileSummary, or Profile.

limit : int64 option

Maximum number of follows to return (optional).

cursor : string option

Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<ProfileSummary>, XrpcError>>

A page of ProfileSummary with an optional cursor, or an XrpcError.

getFollowsImpl agent actorStr limit cursor

Full Usage: getFollowsImpl agent actorStr limit cursor

Parameters:
    agent : AtpAgent
    actorStr : string
    limit : int64 option
    cursor : string option

Returns: Task<Result<Page<ProfileSummary>, XrpcError>>
agent : AtpAgent
actorStr : string
limit : int64 option
cursor : string option
Returns: Task<Result<Page<ProfileSummary>, XrpcError>>

getKnownFollowers agent actor limit cursor

Full Usage: getKnownFollowers agent actor limit cursor

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    actor : ^a - A Handle, Did, ProfileSummary, or Profile.
    limit : int64 option - Maximum number of known followers to return (optional).
    cursor : string option - Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<ProfileSummary>, XrpcError>> A page of ProfileSummary with an optional cursor, or an XrpcError.
Modifiers: inline
Type parameters: ^a

Get followers of an actor that the authenticated user also follows. Accepts a Handle, Did, ProfileSummary, or Profile.

agent : AtpAgent

An authenticated AtpAgent.

actor : ^a

A Handle, Did, ProfileSummary, or Profile.

limit : int64 option

Maximum number of known followers to return (optional).

cursor : string option

Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<ProfileSummary>, XrpcError>>

A page of ProfileSummary with an optional cursor, or an XrpcError.

getKnownFollowersImpl agent actorStr limit cursor

Full Usage: getKnownFollowersImpl agent actorStr limit cursor

Parameters:
    agent : AtpAgent
    actorStr : string
    limit : int64 option
    cursor : string option

Returns: Task<Result<Page<ProfileSummary>, XrpcError>>
agent : AtpAgent
actorStr : string
limit : int64 option
cursor : string option
Returns: Task<Result<Page<ProfileSummary>, XrpcError>>

getLabelDefinitions agent labelerDid

Full Usage: getLabelDefinitions agent labelerDid

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    labelerDid : Did - The DID of the labeler to query.

Returns: Task<Result<LabelValueDefinition list, XrpcError>> A list of LabelValueDefinition on success, or an XrpcError.

Get custom label definitions published by a labeler. Returns a list of LabelValueDefinition from the labeler's policies.

agent : AtpAgent

An authenticated AtpAgent.

labelerDid : Did

The DID of the labeler to query.

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

A list of LabelValueDefinition on success, or an XrpcError.

getLabelers agent dids

Full Usage: getLabelers agent dids

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    dids : Did list - List of labeler DIDs to look up.

Returns: Task<Result<LabelerViewDetailed list, XrpcError>> A list of LabelerViewDetailed on success, or an XrpcError.

Get labeler service views for the given DIDs. Returns the detailed view for each labeler, which includes label value definitions.

agent : AtpAgent

An authenticated AtpAgent.

dids : Did list

List of labeler DIDs to look up.

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

A list of LabelerViewDetailed on success, or an XrpcError.

getLikes agent target limit cursor

Full Usage: getLikes agent target limit cursor

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    target : ^a - The post (an AtUri, PostRef, or TimelinePost).
    limit : int64 option - Maximum number of likes to return (optional).
    cursor : string option - Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<ProfileSummary>, XrpcError>> A page of ProfileSummary with an optional cursor, or an XrpcError.
Modifiers: inline
Type parameters: ^a

Get the accounts that have liked a specific post. Accepts an AtUri, PostRef, or TimelinePost.

agent : AtpAgent

An authenticated AtpAgent.

target : ^a

The post (an AtUri, PostRef, or TimelinePost).

limit : int64 option

Maximum number of likes to return (optional).

cursor : string option

Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<ProfileSummary>, XrpcError>>

A page of ProfileSummary with an optional cursor, or an XrpcError.

getLikesImpl agent uri limit cursor

Full Usage: getLikesImpl agent uri limit cursor

Parameters:
    agent : AtpAgent
    uri : AtUri
    limit : int64 option
    cursor : string option

Returns: Task<Result<Page<ProfileSummary>, XrpcError>>
agent : AtpAgent
uri : AtUri
limit : int64 option
cursor : string option
Returns: Task<Result<Page<ProfileSummary>, XrpcError>>

getList agent listUri limit cursor

Full Usage: getList agent listUri limit cursor

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    listUri : AtUri - The AT-URI of the list.
    limit : int64 option - Maximum number of list items to return (optional).
    cursor : string option - Pagination cursor from a previous response (optional).

Returns: Task<Result<ListDetail, XrpcError>> A ListDetail containing list metadata and member profiles, or an XrpcError.

Get a list's details and members.

agent : AtpAgent

An authenticated AtpAgent.

listUri : AtUri

The AT-URI of the list.

limit : int64 option

Maximum number of list items to return (optional).

cursor : string option

Pagination cursor from a previous response (optional).

Returns: Task<Result<ListDetail, XrpcError>>

A ListDetail containing list metadata and member profiles, or an XrpcError.

getListFeed agent listUri limit cursor

Full Usage: getListFeed agent listUri limit cursor

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    listUri : AtUri - The AT-URI of the list.
    limit : int64 option - Maximum number of posts to return (optional).
    cursor : string option - Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<FeedItem>, XrpcError>> A page of FeedItem with an optional cursor, or an XrpcError.

Get posts from a list feed.

agent : AtpAgent

An authenticated AtpAgent.

listUri : AtUri

The AT-URI of the list.

limit : int64 option

Maximum number of posts to return (optional).

cursor : string option

Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<FeedItem>, XrpcError>>

A page of FeedItem with an optional cursor, or an XrpcError.

getLists agent actor limit cursor

Full Usage: getLists agent actor limit cursor

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    actor : ^a - A Handle, Did, ProfileSummary, or Profile.
    limit : int64 option - Maximum number of lists to return (optional).
    cursor : string option - Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<ListView>, XrpcError>> A page of ListView with an optional cursor, or an XrpcError.
Modifiers: inline
Type parameters: ^a

Get lists created by an actor. Accepts a Handle, Did, ProfileSummary, or Profile.

agent : AtpAgent

An authenticated AtpAgent.

actor : ^a

A Handle, Did, ProfileSummary, or Profile.

limit : int64 option

Maximum number of lists to return (optional).

cursor : string option

Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<ListView>, XrpcError>>

A page of ListView with an optional cursor, or an XrpcError.

getListsImpl agent actorStr limit cursor

Full Usage: getListsImpl agent actorStr limit cursor

Parameters:
    agent : AtpAgent
    actorStr : string
    limit : int64 option
    cursor : string option

Returns: Task<Result<Page<ListView>, XrpcError>>
agent : AtpAgent
actorStr : string
limit : int64 option
cursor : string option
Returns: Task<Result<Page<ListView>, XrpcError>>

getMutes agent limit cursor

Full Usage: getMutes agent limit cursor

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    limit : int64 option - Maximum number of muted accounts to return (optional).
    cursor : string option - Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<ProfileSummary>, XrpcError>> A page of ProfileSummary with an optional cursor, or an XrpcError.

Get the authenticated user's mute list.

agent : AtpAgent

An authenticated AtpAgent.

limit : int64 option

Maximum number of muted accounts to return (optional).

cursor : string option

Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<ProfileSummary>, XrpcError>>

A page of ProfileSummary with an optional cursor, or an XrpcError.

getNotifications agent limit cursor

Full Usage: getNotifications agent limit cursor

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    limit : int64 option - Maximum number of notifications to return (optional, pass None for server default).
    cursor : string option - Pagination cursor from a previous response (optional, pass None to start from the beginning).

Returns: Task<Result<Page<Notification>, XrpcError>> A page of Notification with an optional cursor, or an XrpcError.

List notifications for the authenticated user.

agent : AtpAgent

An authenticated AtpAgent.

limit : int64 option

Maximum number of notifications to return (optional, pass None for server default).

cursor : string option

Pagination cursor from a previous response (optional, pass None to start from the beginning).

Returns: Task<Result<Page<Notification>, XrpcError>>

A page of Notification with an optional cursor, or an XrpcError.

getPostThread agent target depth parentHeight

Full Usage: getPostThread agent target depth parentHeight

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    target : ^a - The post (an AtUri, PostRef, or TimelinePost).
    depth : int64 option - How many levels of replies to include (optional, pass None for server default).
    parentHeight : int64 option - How many levels of parent context to include (optional, pass None for server default).

Returns: Task<Result<ThreadNode, XrpcError>> A ThreadNode tree on success, or an XrpcError.
Modifiers: inline
Type parameters: ^a

Get a post thread, returning a ThreadNode tree. Accepts an AtUri, PostRef, or TimelinePost.

agent : AtpAgent

An authenticated AtpAgent.

target : ^a

The post (an AtUri, PostRef, or TimelinePost).

depth : int64 option

How many levels of replies to include (optional, pass None for server default).

parentHeight : int64 option

How many levels of parent context to include (optional, pass None for server default).

Returns: Task<Result<ThreadNode, XrpcError>>

A ThreadNode tree on success, or an XrpcError.

getPostThreadImpl agent uri depth parentHeight

Full Usage: getPostThreadImpl agent uri depth parentHeight

Parameters:
    agent : AtpAgent
    uri : AtUri
    depth : int64 option
    parentHeight : int64 option

Returns: Task<Result<ThreadNode, XrpcError>>
agent : AtpAgent
uri : AtUri
depth : int64 option
parentHeight : int64 option
Returns: Task<Result<ThreadNode, XrpcError>>

getPostThreadView agent target depth parentHeight

Full Usage: getPostThreadView agent target depth parentHeight

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    target : ^a - The post (an AtUri, PostRef, or TimelinePost).
    depth : int64 option - How many levels of replies to include (optional).
    parentHeight : int64 option - How many levels of parent context to include (optional).

Returns: Task<Result<ThreadPost option, XrpcError>> Some ThreadPost if the post is accessible, None if not found or blocked, or an XrpcError.
Modifiers: inline
Type parameters: ^a

Get a post thread, returning just the ThreadPost if available. Returns Some threadPost for normal threads, None for not-found or blocked posts. Accepts an AtUri, PostRef, or TimelinePost.

agent : AtpAgent

An authenticated AtpAgent.

target : ^a

The post (an AtUri, PostRef, or TimelinePost).

depth : int64 option

How many levels of replies to include (optional).

parentHeight : int64 option

How many levels of parent context to include (optional).

Returns: Task<Result<ThreadPost option, XrpcError>>

Some ThreadPost if the post is accessible, None if not found or blocked, or an XrpcError.

getPostThreadViewImpl agent uri depth parentHeight

Full Usage: getPostThreadViewImpl agent uri depth parentHeight

Parameters:
    agent : AtpAgent
    uri : AtUri
    depth : int64 option
    parentHeight : int64 option

Returns: Task<Result<ThreadPost option, XrpcError>>
agent : AtpAgent
uri : AtUri
depth : int64 option
parentHeight : int64 option
Returns: Task<Result<ThreadPost option, XrpcError>>

getPosts agent uris

Full Usage: getPosts agent uris

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    uris : AtUri list - A list of AT-URIs identifying the posts to retrieve.

Returns: Task<Result<TimelinePost list, XrpcError>> A list of TimelinePost on success, or an XrpcError.

Get multiple posts by their AT-URIs in a single request.

agent : AtpAgent

An authenticated AtpAgent.

uris : AtUri list

A list of AT-URIs identifying the posts to retrieve.

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

A list of TimelinePost on success, or an XrpcError.

getPreferences agent

Full Usage: getPreferences agent

Parameters:
Returns: Task<Result<Preferences, XrpcError>> The user's preferences on success, or an XrpcError.

Get the authenticated user's preferences (saved feeds, content filters, etc.).

agent : AtpAgent

An authenticated AtpAgent.

Returns: Task<Result<Preferences, XrpcError>>

The user's preferences on success, or an XrpcError.

getProfile agent actor

Full Usage: getProfile agent actor

Parameters:
Returns: Task<Result<Profile, XrpcError>> A Profile on success, or an XrpcError.
Modifiers: inline
Type parameters: ^a

Get a user's profile. Accepts a Handle, Did, ProfileSummary, or Profile.

agent : AtpAgent

An authenticated AtpAgent.

actor : ^a

A Handle, Did, ProfileSummary, or Profile.

Returns: Task<Result<Profile, XrpcError>>

A Profile on success, or an XrpcError.

getProfileImpl agent actorStr

Full Usage: getProfileImpl agent actorStr

Parameters:
Returns: Task<Result<Profile, XrpcError>>
agent : AtpAgent
actorStr : string
Returns: Task<Result<Profile, XrpcError>>

getProfiles agent actors

Full Usage: getProfiles agent actors

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    actors : Did list - A list of Did values identifying the actors.

Returns: Task<Result<Profile list, XrpcError>> A list of Profile on success, or an XrpcError.

Get multiple profiles by their DIDs in a single request.

agent : AtpAgent

An authenticated AtpAgent.

actors : Did list

A list of Did values identifying the actors.

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

A list of Profile on success, or an XrpcError.

getQuotes agent target limit cursor

Full Usage: getQuotes agent target limit cursor

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    target : ^a - The post (an AtUri, PostRef, or TimelinePost).
    limit : int64 option - Maximum number of quotes to return (optional).
    cursor : string option - Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<TimelinePost>, XrpcError>> A page of TimelinePost with an optional cursor, or an XrpcError.
Modifiers: inline
Type parameters: ^a

Get posts that quote a specific post. Accepts an AtUri, PostRef, or TimelinePost.

agent : AtpAgent

An authenticated AtpAgent.

target : ^a

The post (an AtUri, PostRef, or TimelinePost).

limit : int64 option

Maximum number of quotes to return (optional).

cursor : string option

Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<TimelinePost>, XrpcError>>

A page of TimelinePost with an optional cursor, or an XrpcError.

getQuotesImpl agent uri limit cursor

Full Usage: getQuotesImpl agent uri limit cursor

Parameters:
    agent : AtpAgent
    uri : AtUri
    limit : int64 option
    cursor : string option

Returns: Task<Result<Page<TimelinePost>, XrpcError>>
agent : AtpAgent
uri : AtUri
limit : int64 option
cursor : string option
Returns: Task<Result<Page<TimelinePost>, XrpcError>>

getRecord agent did collection rkey

Full Usage: getRecord agent did collection rkey

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    did : Did - The DID of the repository that owns the record.
    collection : Nsid - The NSID of the record collection (e.g. "app.bsky.feed.post").
    rkey : RecordKey - The record key within the collection.

Returns: Task<Result<CarFile, XrpcError>> A parsed CarFile, or an XrpcError.

Fetch a single record as a CAR (Content Addressable aRchive) file from the repository sync endpoint.

agent : AtpAgent

An authenticated AtpAgent.

did : Did

The DID of the repository that owns the record.

collection : Nsid

The NSID of the record collection (e.g. "app.bsky.feed.post").

rkey : RecordKey

The record key within the collection.

Returns: Task<Result<CarFile, XrpcError>>

A parsed CarFile, or an XrpcError.

getRelationships agent actor others

Full Usage: getRelationships agent actor others

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    actor : Did - The primary actor DID to check relationships for.
    others : Did list option - Optional list of other DIDs to check relationships with.

Returns: Task<Result<Relationship list, XrpcError>> A list of Relationship on success, or an XrpcError.

Get the relationships between the authenticated user and one or more other actors.

agent : AtpAgent

An authenticated AtpAgent.

actor : Did

The primary actor DID to check relationships for.

others : Did list option

Optional list of other DIDs to check relationships with.

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

A list of Relationship on success, or an XrpcError.

getRepo agent did

Full Usage: getRepo agent did

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    did : Did - The DID of the repository to fetch.

Returns: Task<Result<CarFile, XrpcError>> A parsed CarFile, or an XrpcError.

Fetch a full repository as a CAR (Content Addressable aRchive) file.

agent : AtpAgent

An authenticated AtpAgent.

did : Did

The DID of the repository to fetch.

Returns: Task<Result<CarFile, XrpcError>>

A parsed CarFile, or an XrpcError.

getRepostedBy agent target limit cursor

Full Usage: getRepostedBy agent target limit cursor

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    target : ^a - The post (an AtUri, PostRef, or TimelinePost).
    limit : int64 option - Maximum number of reposts to return (optional).
    cursor : string option - Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<ProfileSummary>, XrpcError>> A page of ProfileSummary with an optional cursor, or an XrpcError.
Modifiers: inline
Type parameters: ^a

Get the accounts that have reposted a specific post. Accepts an AtUri, PostRef, or TimelinePost.

agent : AtpAgent

An authenticated AtpAgent.

target : ^a

The post (an AtUri, PostRef, or TimelinePost).

limit : int64 option

Maximum number of reposts to return (optional).

cursor : string option

Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<ProfileSummary>, XrpcError>>

A page of ProfileSummary with an optional cursor, or an XrpcError.

getRepostedByImpl agent uri limit cursor

Full Usage: getRepostedByImpl agent uri limit cursor

Parameters:
    agent : AtpAgent
    uri : AtUri
    limit : int64 option
    cursor : string option

Returns: Task<Result<Page<ProfileSummary>, XrpcError>>
agent : AtpAgent
uri : AtUri
limit : int64 option
cursor : string option
Returns: Task<Result<Page<ProfileSummary>, XrpcError>>

getSuggestedFollows agent actor

Full Usage: getSuggestedFollows agent actor

Parameters:
Returns: Task<Result<ProfileSummary list, XrpcError>> A list of ProfileSummary on success, or an XrpcError.
Modifiers: inline
Type parameters: ^a

Get suggested accounts to follow based on a given actor. Accepts a Handle, Did, ProfileSummary, or Profile.

agent : AtpAgent

An authenticated AtpAgent.

actor : ^a

A Handle, Did, ProfileSummary, or Profile.

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

A list of ProfileSummary on success, or an XrpcError.

getSuggestedFollowsImpl agent actorStr

Full Usage: getSuggestedFollowsImpl agent actorStr

Parameters:
Returns: Task<Result<ProfileSummary list, XrpcError>>
agent : AtpAgent
actorStr : string
Returns: Task<Result<ProfileSummary list, XrpcError>>

getSuggestions agent limit cursor

Full Usage: getSuggestions agent limit cursor

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    limit : int64 option - Maximum number of suggestions to return (optional).
    cursor : string option - Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<ProfileSummary>, XrpcError>> A page of ProfileSummary with an optional cursor, or an XrpcError.

Get general account suggestions for the authenticated user.

agent : AtpAgent

An authenticated AtpAgent.

limit : int64 option

Maximum number of suggestions to return (optional).

cursor : string option

Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<ProfileSummary>, XrpcError>>

A page of ProfileSummary with an optional cursor, or an XrpcError.

getTimeline agent limit cursor

Full Usage: getTimeline agent limit cursor

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    limit : int64 option - Maximum number of posts to return (optional, pass None for server default).
    cursor : string option - Pagination cursor from a previous response (optional, pass None to start from the beginning).

Returns: Task<Result<Page<FeedItem>, XrpcError>> A page of FeedItem with an optional cursor, or an XrpcError.

Get the authenticated user's home timeline.

agent : AtpAgent

An authenticated AtpAgent.

limit : int64 option

Maximum number of posts to return (optional, pass None for server default).

cursor : string option

Pagination cursor from a previous response (optional, pass None to start from the beginning).

Returns: Task<Result<Page<FeedItem>, XrpcError>>

A page of FeedItem with an optional cursor, or an XrpcError.

getUnreadNotificationCount agent

Full Usage: getUnreadNotificationCount agent

Parameters:
Returns: Task<Result<int64, XrpcError>> The unread notification count on success, or an XrpcError.

Get the count of unread notifications for the authenticated user.

agent : AtpAgent

An authenticated AtpAgent.

Returns: Task<Result<int64, XrpcError>>

The unread notification count on success, or an XrpcError.

getVideoJobStatus agent jobId

Full Usage: getVideoJobStatus agent jobId

Parameters:
Returns: Task<Result<JobStatus, XrpcError>> A JobStatus on success, or an XrpcError.

Get the status of a video processing job.

agent : AtpAgent

An authenticated AtpAgent.

jobId : string

The job ID returned by uploadVideo.

Returns: Task<Result<JobStatus, XrpcError>>

A JobStatus on success, or an XrpcError.

like agent target

Full Usage: like agent target

Parameters:
Returns: Task<Result<LikeRef, XrpcError>> A LikeRef on success, or an XrpcError. Pass the LikeRef to unlike to undo.
Modifiers: inline
Type parameters: ^a

Like a post or other record.

agent : AtpAgent

An authenticated AtpAgent.

target : ^a

A PostRef or TimelinePost identifying the record to like.

Returns: Task<Result<LikeRef, XrpcError>>

A LikeRef on success, or an XrpcError. Pass the LikeRef to unlike to undo.

likeImpl agent postRef

Full Usage: likeImpl agent postRef

Parameters:
Returns: Task<Result<LikeRef, XrpcError>>
agent : AtpAgent
postRef : PostRef
Returns: Task<Result<LikeRef, XrpcError>>

likeVia agent target via

Full Usage: likeVia agent target via

Parameters:
Returns: Task<Result<LikeRef, XrpcError>> A LikeRef on success, or an XrpcError.
Modifiers: inline
Type parameters: ^a, ^b

Like a post with via attribution. The via parameter records where the user discovered the content (e.g. a feed generator post or a quote post).

agent : AtpAgent

An authenticated AtpAgent.

target : ^a

A PostRef or TimelinePost identifying the record to like.

via : ^b

A PostRef or TimelinePost identifying how the content was discovered.

Returns: Task<Result<LikeRef, XrpcError>>

A LikeRef on success, or an XrpcError.

likeViaImpl agent postRef viaRef

Full Usage: likeViaImpl agent postRef viaRef

Parameters:
Returns: Task<Result<LikeRef, XrpcError>>
agent : AtpAgent
postRef : PostRef
viaRef : PostRef
Returns: Task<Result<LikeRef, XrpcError>>

login baseUrl identifier password

Full Usage: login baseUrl identifier password

Parameters:
    baseUrl : string
    identifier : string
    password : string

Returns: Task<Result<AtpAgent, XrpcError>>
baseUrl : string
identifier : string
password : string
Returns: Task<Result<AtpAgent, XrpcError>>

loginWithClient client baseUrl identifier password

Full Usage: loginWithClient client baseUrl identifier password

Parameters:
    client : HttpClient - The HTTP client to use for all requests.
    baseUrl : string - The PDS base URL (e.g. "https://bsky.social").
    identifier : string - A handle (e.g. "my-handle.bsky.social") or DID.
    password : string - An app password (not the account password).

Returns: Task<Result<AtpAgent, XrpcError>> An authenticated AtpAgent on success, or an XrpcError.

Create an agent with a custom HttpClient and authenticate. Useful for testing with mock HTTP handlers or custom client configuration.

client : HttpClient

The HTTP client to use for all requests.

baseUrl : string

The PDS base URL (e.g. "https://bsky.social").

identifier : string

A handle (e.g. "my-handle.bsky.social") or DID.

password : string

An app password (not the account password).

Returns: Task<Result<AtpAgent, XrpcError>>

An authenticated AtpAgent on success, or an XrpcError.

logout agent

Full Usage: logout agent

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

Terminate the current session by deleting it on the server, then clear it locally. Uses the refresh JWT for authorization (per the AT Protocol spec).

agent : AtpAgent

An authenticated AtpAgent.

Returns: Task<Result<unit, XrpcError>>

Ok () on success, or an XrpcError.

markNotificationsSeen agent

Full Usage: markNotificationsSeen agent

Parameters:
Returns: Task<Result<unit, XrpcError>> unit on success, or an XrpcError.

Mark all notifications as seen up to the current time.

agent : AtpAgent

An authenticated AtpAgent.

Returns: Task<Result<unit, XrpcError>>

unit on success, or an XrpcError.

muteModList agent listUri

Full Usage: muteModList agent listUri

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    listUri : AtUri - The AT-URI of the moderation list to mute.

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

Mute an entire moderation list. All accounts on the list are muted.

agent : AtpAgent

An authenticated AtpAgent.

listUri : AtUri

The AT-URI of the moderation list to mute.

Returns: Task<Result<unit, XrpcError>>

unit on success, or an XrpcError.

muteThread agent root

Full Usage: muteThread agent root

Parameters:
Returns: Task<Result<unit, XrpcError>> unit on success, or an XrpcError.
Modifiers: inline
Type parameters: ^a

Mute a thread. Posts in the muted thread are hidden from your notifications. Accepts an AtUri, PostRef, or TimelinePost.

agent : AtpAgent

An authenticated AtpAgent.

root : ^a

The thread root post (an AtUri, PostRef, or TimelinePost).

Returns: Task<Result<unit, XrpcError>>

unit on success, or an XrpcError.

muteThreadImpl agent root

Full Usage: muteThreadImpl agent root

Parameters:
Returns: Task<Result<unit, XrpcError>>
agent : AtpAgent
root : AtUri
Returns: Task<Result<unit, XrpcError>>

muteUser agent target

Full Usage: muteUser agent target

Parameters:
Returns: Task<Result<unit, XrpcError>> unit on success, or an XrpcError.
Modifiers: inline
Type parameters: ^a

Mute an account. Accepts a Did, ProfileSummary, or Profile directly. Muted accounts are hidden from your feeds but not blocked.

agent : AtpAgent

An authenticated AtpAgent.

target : ^a

The user to mute — a Did, ProfileSummary, or Profile.

Returns: Task<Result<unit, XrpcError>>

unit on success, or an XrpcError.

muteUserByHandle agent identifier

Full Usage: muteUserByHandle agent identifier

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    identifier : string - A handle (e.g., my-handle.bsky.social) or DID string (e.g., did:plc:abc123).

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

Mute an account by handle string. The handle is resolved to a DID, then the mute is created. Also accepts a DID string directly (if it starts with did:, it is parsed as a DID).

For type-safe usage when you already have a Did, use muteUser instead.

agent : AtpAgent

An authenticated AtpAgent.

identifier : string

A handle (e.g., my-handle.bsky.social) or DID string (e.g., did:plc:abc123).

Returns: Task<Result<unit, XrpcError>>

unit on success, or an XrpcError.

muteUserImpl agent did

Full Usage: muteUserImpl agent did

Parameters:
Returns: Task<Result<unit, XrpcError>>
agent : AtpAgent
did : Did
Returns: Task<Result<unit, XrpcError>>

paginateBlocks agent pageSize

Full Usage: paginateBlocks agent pageSize

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    pageSize : int64 option - Maximum number of blocked accounts per page (optional).

Returns: IAsyncEnumerable<Result<Page<ProfileSummary>, XrpcError>> An IAsyncEnumerable{T} of paginated results.

Paginate the authenticated user's block list. Returns an async enumerable of pages.

agent : AtpAgent

An authenticated AtpAgent.

pageSize : int64 option

Maximum number of blocked accounts per page (optional).

Returns: IAsyncEnumerable<Result<Page<ProfileSummary>, XrpcError>>

An IAsyncEnumerable{T} of paginated results.

paginateFeed agent feedUri pageSize

Full Usage: paginateFeed agent feedUri pageSize

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    feedUri : AtUri - The AT-URI of the feed generator.
    pageSize : int64 option - Maximum number of posts per page (optional).

Returns: IAsyncEnumerable<Result<Page<FeedItem>, XrpcError>> An IAsyncEnumerable{T} of paginated results.

Paginate a custom feed. Returns an async enumerable of pages.

agent : AtpAgent

An authenticated AtpAgent.

feedUri : AtUri

The AT-URI of the feed generator.

pageSize : int64 option

Maximum number of posts per page (optional).

Returns: IAsyncEnumerable<Result<Page<FeedItem>, XrpcError>>

An IAsyncEnumerable{T} of paginated results.

paginateFollowers agent actor pageSize

Full Usage: paginateFollowers agent actor pageSize

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    actor : ^a - A Handle, Did, ProfileSummary, or Profile whose followers to list.
    pageSize : int64 option - Maximum number of followers per page (optional, pass None for server default).

Returns: IAsyncEnumerable<Result<Page<ProfileSummary>, XrpcError>> An IAsyncEnumerable{T} of paginated results.
Modifiers: inline
Type parameters: ^a

Paginate followers for an actor. Returns an async enumerable of pages. Each element is a Result containing one page of follower profiles. Pagination stops automatically when the server returns no cursor. Accepts a Handle, Did, ProfileSummary, or Profile.

agent : AtpAgent

An authenticated AtpAgent.

actor : ^a

A Handle, Did, ProfileSummary, or Profile whose followers to list.

pageSize : int64 option

Maximum number of followers per page (optional, pass None for server default).

Returns: IAsyncEnumerable<Result<Page<ProfileSummary>, XrpcError>>

An IAsyncEnumerable{T} of paginated results.

paginateFollowersImpl agent actorStr pageSize

Full Usage: paginateFollowersImpl agent actorStr pageSize

Parameters:
    agent : AtpAgent
    actorStr : string
    pageSize : int64 option

Returns: IAsyncEnumerable<Result<Page<ProfileSummary>, XrpcError>>
agent : AtpAgent
actorStr : string
pageSize : int64 option
Returns: IAsyncEnumerable<Result<Page<ProfileSummary>, XrpcError>>

paginateListFeed agent listUri pageSize

Full Usage: paginateListFeed agent listUri pageSize

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    listUri : AtUri - The AT-URI of the list.
    pageSize : int64 option - Maximum number of posts per page (optional).

Returns: IAsyncEnumerable<Result<Page<FeedItem>, XrpcError>> An IAsyncEnumerable{T} of paginated results.

Paginate a list feed. Returns an async enumerable of pages.

agent : AtpAgent

An authenticated AtpAgent.

listUri : AtUri

The AT-URI of the list.

pageSize : int64 option

Maximum number of posts per page (optional).

Returns: IAsyncEnumerable<Result<Page<FeedItem>, XrpcError>>

An IAsyncEnumerable{T} of paginated results.

paginateMutes agent pageSize

Full Usage: paginateMutes agent pageSize

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    pageSize : int64 option - Maximum number of muted accounts per page (optional).

Returns: IAsyncEnumerable<Result<Page<ProfileSummary>, XrpcError>> An IAsyncEnumerable{T} of paginated results.

Paginate the authenticated user's mute list. Returns an async enumerable of pages.

agent : AtpAgent

An authenticated AtpAgent.

pageSize : int64 option

Maximum number of muted accounts per page (optional).

Returns: IAsyncEnumerable<Result<Page<ProfileSummary>, XrpcError>>

An IAsyncEnumerable{T} of paginated results.

paginateNotifications agent pageSize

Full Usage: paginateNotifications agent pageSize

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    pageSize : int64 option - Maximum number of notifications per page (optional, pass None for server default).

Returns: IAsyncEnumerable<Result<Page<Notification>, XrpcError>> An IAsyncEnumerable{T} of paginated results.

Paginate notifications for the authenticated user. Returns an async enumerable of pages. Each element is a Result containing one page of notifications. Pagination stops automatically when the server returns no cursor.

agent : AtpAgent

An authenticated AtpAgent.

pageSize : int64 option

Maximum number of notifications per page (optional, pass None for server default).

Returns: IAsyncEnumerable<Result<Page<Notification>, XrpcError>>

An IAsyncEnumerable{T} of paginated results.

paginateTimeline agent pageSize

Full Usage: paginateTimeline agent pageSize

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    pageSize : int64 option - Maximum number of posts per page (optional, pass None for server default).

Returns: IAsyncEnumerable<Result<Page<FeedItem>, XrpcError>> An IAsyncEnumerable{T} of paginated results.

Paginate the home timeline. Returns an async enumerable of pages. Each element is a Result containing one page of feed items. Pagination stops automatically when the server returns no cursor.

agent : AtpAgent

An authenticated AtpAgent.

pageSize : int64 option

Maximum number of posts per page (optional, pass None for server default).

Returns: IAsyncEnumerable<Result<Page<FeedItem>, XrpcError>>

An IAsyncEnumerable{T} of paginated results.

post agent text

Full Usage: post agent text

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    text : string - The post text. Mentions (@handle), links (https://...), and hashtags (#tag) are auto-detected.

Returns: Task<Result<PostRef, XrpcError>> A PostRef with the AT-URI and CID on success, or an XrpcError.

Create a post with automatic rich text detection. Mentions, links, and hashtags are automatically detected and resolved to facets.

Internally calls parse to detect and resolve facets before creating the post. Unresolvable mentions are silently omitted from facets. For pre-resolved facets, use postWithFacets instead.

agent : AtpAgent

An authenticated AtpAgent.

text : string

The post text. Mentions (@handle), links (https://...), and hashtags (#tag) are auto-detected.

Returns: Task<Result<PostRef, XrpcError>>

A PostRef with the AT-URI and CID on success, or an XrpcError.

Example

 let! result = Bluesky.post agent "Hello @my-handle.bsky.social! Check out https://example.com #atproto"

postWithFacets agent text facets

Full Usage: postWithFacets agent text facets

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    text : string - The post text content.
    facets : Facet list - Pre-resolved facets (mentions, links, hashtags). Pass an empty list for plain text.

Returns: Task<Result<PostRef, XrpcError>> A PostRef with the AT-URI and CID on success, or an XrpcError.

Create a post with pre-resolved facets. Use this when you have already detected and resolved rich text facets, or when you want full control over facet content.

agent : AtpAgent

An authenticated AtpAgent.

text : string

The post text content.

facets : Facet list

Pre-resolved facets (mentions, links, hashtags). Pass an empty list for plain text.

Returns: Task<Result<PostRef, XrpcError>>

A PostRef with the AT-URI and CID on success, or an XrpcError.

postWithImages agent text images

Full Usage: postWithImages agent text images

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    text : string - The post text. Mentions, links, and hashtags are auto-detected.
    images : ImageUpload list - A list of ImageUpload records describing the images to attach. Alt text is required for accessibility. Bluesky supports up to 4 images per post.

Returns: Task<Result<PostRef, XrpcError>> A PostRef with the AT-URI and CID on success, or an XrpcError.

Create a post with attached images and automatic rich text detection. Uploads each image as a blob, then creates the post with an app.bsky.embed.images embed.

Images are uploaded sequentially. If any image upload fails, the entire operation returns the error without creating the post.

agent : AtpAgent

An authenticated AtpAgent.

text : string

The post text. Mentions, links, and hashtags are auto-detected.

images : ImageUpload list

A list of ImageUpload records describing the images to attach. Alt text is required for accessibility. Bluesky supports up to 4 images per post.

Returns: Task<Result<PostRef, XrpcError>>

A PostRef with the AT-URI and CID on success, or an XrpcError.

Example

 let imageBytes = System.IO.File.ReadAllBytes("photo.jpg")
 let! result = Bluesky.postWithImages agent "Check this out!"
     [ { Data = imageBytes; MimeType = Jpeg; AltText = "A photo" } ]
val imageBytes: byte array
namespace System
namespace System.IO
type File = static member AppendAllBytes: path: string * bytes: byte array -> unit + 1 overload static member AppendAllBytesAsync: path: string * bytes: byte array * ?cancellationToken: CancellationToken -> Task + 1 overload static member AppendAllLines: path: string * contents: IEnumerable<string> -> unit + 1 overload static member AppendAllLinesAsync: path: string * contents: IEnumerable<string> * encoding: Encoding * ?cancellationToken: CancellationToken -> Task + 1 overload static member AppendAllText: path: string * contents: ReadOnlySpan<char> -> unit + 3 overloads static member AppendAllTextAsync: path: string * contents: ReadOnlyMemory<char> * encoding: Encoding * ?cancellationToken: CancellationToken -> Task + 3 overloads static member AppendText: path: string -> StreamWriter static member Copy: sourceFileName: string * destFileName: string -> unit + 1 overload static member Create: path: string -> FileStream + 2 overloads static member CreateSymbolicLink: path: string * pathToTarget: string -> FileSystemInfo ...
<summary>Provides static methods for the creation, copying, deletion, moving, and opening of a single file, and aids in the creation of <see cref="T:System.IO.FileStream" /> objects.</summary>
System.IO.File.ReadAllBytes(path: string) : byte array
namespace Microsoft.FSharp.Data

postWithVideo agent text videoData mimeType altText

Full Usage: postWithVideo agent text videoData mimeType altText

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    text : string - The post text.
    videoData : byte[] - The raw video bytes.
    mimeType : VideoMime - The video MIME type.
    altText : string option - Optional alt text for the video.

Returns: Task<Result<PostRef, XrpcError>> A PostRef on success, or an XrpcError.

Upload a video, wait for processing, and create a post with the video embedded.

agent : AtpAgent

An authenticated AtpAgent.

text : string

The post text.

videoData : byte[]

The raw video bytes.

mimeType : VideoMime

The video MIME type.

altText : string option

Optional alt text for the video.

Returns: Task<Result<PostRef, XrpcError>>

A PostRef on success, or an XrpcError.

quotePost agent text quoted

Full Usage: quotePost agent text quoted

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    text : string - The post text. Mentions, links, and hashtags are auto-detected.
    quoted : ^a - A PostRef or TimelinePost identifying the post to quote.

Returns: Task<Result<PostRef, XrpcError>> A PostRef with the AT-URI and CID on success, or an XrpcError.
Modifiers: inline
Type parameters: ^a

Create a quote post. The quoted post appears as an embedded record below your text.

agent : AtpAgent

An authenticated AtpAgent.

text : string

The post text. Mentions, links, and hashtags are auto-detected.

quoted : ^a

A PostRef or TimelinePost identifying the post to quote.

Returns: Task<Result<PostRef, XrpcError>>

A PostRef with the AT-URI and CID on success, or an XrpcError.

quotePostImpl agent text quotedPost

Full Usage: quotePostImpl agent text quotedPost

Parameters:
Returns: Task<Result<PostRef, XrpcError>>
agent : AtpAgent
text : string
quotedPost : PostRef
Returns: Task<Result<PostRef, XrpcError>>

removeBookmark agent target

Full Usage: removeBookmark agent target

Parameters:
Returns: Task<Result<unit, XrpcError>> unit on success, or an XrpcError.
Modifiers: inline
Type parameters: ^a

Remove a post from your bookmarks. Accepts an AtUri, PostRef, or TimelinePost.

agent : AtpAgent

An authenticated AtpAgent.

target : ^a

The bookmarked post to remove (an AtUri, PostRef, or TimelinePost).

Returns: Task<Result<unit, XrpcError>>

unit on success, or an XrpcError.

removeBookmarkImpl agent uri

Full Usage: removeBookmarkImpl agent uri

Parameters:
Returns: Task<Result<unit, XrpcError>>
agent : AtpAgent
uri : AtUri
Returns: Task<Result<unit, XrpcError>>

removeHiddenPost agent postUri

Full Usage: removeHiddenPost agent postUri

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

Remove a post URI from the hidden posts list.

agent : AtpAgent

An authenticated AtpAgent.

postUri : AtUri

The AT-URI of the post to unhide.

Returns: Task<Result<unit, XrpcError>>

Ok () on success, or an XrpcError.

removeListItem agent listItemUri

Full Usage: removeListItem agent listItemUri

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    listItemUri : AtUri - The AT-URI of the list item record to remove.

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

Remove an account from a list by deleting the list item record.

agent : AtpAgent

An authenticated AtpAgent.

listItemUri : AtUri

The AT-URI of the list item record to remove.

Returns: Task<Result<unit, XrpcError>>

unit on success, or an XrpcError.

removeMutedWord agent wordValue

Full Usage: removeMutedWord agent wordValue

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    wordValue : string - The muted word string to remove.

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

Remove a muted word from the user's preferences by value.

agent : AtpAgent

An authenticated AtpAgent.

wordValue : string

The muted word string to remove.

Returns: Task<Result<unit, XrpcError>>

Ok () on success, or an XrpcError.

removeSavedFeed agent feedId

Full Usage: removeSavedFeed agent feedId

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    feedId : string - The ID of the saved feed to remove.

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

Remove a saved feed from the user's preferences by its ID.

agent : AtpAgent

An authenticated AtpAgent.

feedId : string

The ID of the saved feed to remove.

Returns: Task<Result<unit, XrpcError>>

Ok () on success, or an XrpcError.

replyTo agent text parent

Full Usage: replyTo agent text parent

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    text : string - The reply text. Mentions, links, and hashtags are auto-detected.
    parent : ^a - A PostRef or TimelinePost for the post being replied to.

Returns: Task<Result<PostRef, XrpcError>> A PostRef with the AT-URI and CID on success, or an XrpcError.
Modifiers: inline
Type parameters: ^a

Reply to a post. Fetches the parent to auto-resolve the thread root. This is the recommended way to reply: you only need the parent post's PostRef.

Fetches the parent post via app.bsky.feed.getPosts to determine the thread root. If the parent has a reply field, its root is used. Otherwise, the parent itself is the root. For full control over both parent and root, use replyWithKnownRoot instead.

agent : AtpAgent

An authenticated AtpAgent.

text : string

The reply text. Mentions, links, and hashtags are auto-detected.

parent : ^a

A PostRef or TimelinePost for the post being replied to.

Returns: Task<Result<PostRef, XrpcError>>

A PostRef with the AT-URI and CID on success, or an XrpcError.

replyToImpl agent text parentRef

Full Usage: replyToImpl agent text parentRef

Parameters:
Returns: Task<Result<PostRef, XrpcError>>
agent : AtpAgent
text : string
parentRef : PostRef
Returns: Task<Result<PostRef, XrpcError>>

replyWithKnownRoot agent text parent root

Full Usage: replyWithKnownRoot agent text parent root

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    text : string - The reply text. Mentions, links, and hashtags are auto-detected.
    parent : PostRef - A PostRef for the post being directly replied to.
    root : PostRef - A PostRef for the thread root post. Same as parent for top-level replies.

Returns: Task<Result<PostRef, XrpcError>> A PostRef with the AT-URI and CID on success, or an XrpcError.

Create a reply with explicit parent and root references. Use this when you already know both the parent and root PostRefs. For most cases, prefer replyTo which resolves the root automatically.

The AT Protocol threading model requires both parent and root references. For a reply to a top-level post, the parent and root are the same. For a reply deeper in a thread, the root points to the original post while the parent points to the immediate post being replied to.

agent : AtpAgent

An authenticated AtpAgent.

text : string

The reply text. Mentions, links, and hashtags are auto-detected.

parent : PostRef

A PostRef for the post being directly replied to.

root : PostRef

A PostRef for the thread root post. Same as parent for top-level replies.

Returns: Task<Result<PostRef, XrpcError>>

A PostRef with the AT-URI and CID on success, or an XrpcError.

reportContent agent subject reason description

Full Usage: reportContent agent subject reason description

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    subject : ReportSubject - The subject of the report (account or post).
    reason : ReasonType - The reason type from ReasonType.
    description : string option - An optional free-text description of the report.

Returns: Task<Result<int64, XrpcError>> The report ID on success, or an XrpcError.

Report content to moderation. Use Account to report an account or Record to report a specific post.

agent : AtpAgent

An authenticated AtpAgent.

subject : ReportSubject

The subject of the report (account or post).

reason : ReasonType

The reason type from ReasonType.

description : string option

An optional free-text description of the report.

Returns: Task<Result<int64, XrpcError>>

The report ID on success, or an XrpcError.

repost agent target

Full Usage: repost agent target

Parameters:
Returns: Task<Result<RepostRef, XrpcError>> A RepostRef on success, or an XrpcError. Pass the RepostRef to unrepost to undo.
Modifiers: inline
Type parameters: ^a

Repost (retweet) a post or other record.

agent : AtpAgent

An authenticated AtpAgent.

target : ^a

A PostRef or TimelinePost identifying the record to repost.

Returns: Task<Result<RepostRef, XrpcError>>

A RepostRef on success, or an XrpcError. Pass the RepostRef to unrepost to undo.

repostImpl agent postRef

Full Usage: repostImpl agent postRef

Parameters:
Returns: Task<Result<RepostRef, XrpcError>>
agent : AtpAgent
postRef : PostRef
Returns: Task<Result<RepostRef, XrpcError>>

repostVia agent target via

Full Usage: repostVia agent target via

Parameters:
Returns: Task<Result<RepostRef, XrpcError>> A RepostRef on success, or an XrpcError.
Modifiers: inline
Type parameters: ^a, ^b

Repost with via attribution. The via parameter records where the user discovered the content.

agent : AtpAgent

An authenticated AtpAgent.

target : ^a

A PostRef or TimelinePost identifying the record to repost.

via : ^b

A PostRef or TimelinePost identifying how the content was discovered.

Returns: Task<Result<RepostRef, XrpcError>>

A RepostRef on success, or an XrpcError.

repostViaImpl agent postRef viaRef

Full Usage: repostViaImpl agent postRef viaRef

Parameters:
Returns: Task<Result<RepostRef, XrpcError>>
agent : AtpAgent
postRef : PostRef
viaRef : PostRef
Returns: Task<Result<RepostRef, XrpcError>>

requestAccountDelete agent

Full Usage: requestAccountDelete agent

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

Request account deletion. Sends a confirmation email to the account's email address. After receiving the email, call deleteAccount with the token from the email. Requires an authenticated session.

agent : AtpAgent

An authenticated AtpAgent.

Returns: Task<Result<unit, XrpcError>>

Ok () on success, or an XrpcError.

resumeSession baseUrl session

Full Usage: resumeSession baseUrl session

Parameters:
    baseUrl : string - The PDS base URL (e.g. "https://bsky.social").
    session : AtpSession - A previously obtained AtpSession.

Returns: AtpAgent An authenticated AtpAgent with the given session.

Construct an agent from saved session data without making any network calls. Use this to restore a session from persisted tokens.

baseUrl : string

The PDS base URL (e.g. "https://bsky.social").

session : AtpSession

A previously obtained AtpSession.

Returns: AtpAgent

An authenticated AtpAgent with the given session.

resumeSessionWithClient client baseUrl session

Full Usage: resumeSessionWithClient client baseUrl session

Parameters:
    client : HttpClient - The HTTP client to use for all requests.
    baseUrl : string - The PDS base URL (e.g. "https://bsky.social").
    session : AtpSession - A previously obtained AtpSession.

Returns: AtpAgent An authenticated AtpAgent with the given session.

Construct an agent from saved session data with a custom HttpClient. Use this to restore a session from persisted tokens with custom HTTP configuration.

client : HttpClient

The HTTP client to use for all requests.

baseUrl : string

The PDS base URL (e.g. "https://bsky.social").

session : AtpSession

A previously obtained AtpSession.

Returns: AtpAgent

An authenticated AtpAgent with the given session.

searchActors agent query limit cursor

Full Usage: searchActors agent query limit cursor

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    query : string - The search query string.
    limit : int64 option - Maximum number of actors to return (optional).
    cursor : string option - Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<ProfileSummary>, XrpcError>> A page of ProfileSummary with an optional cursor, or an XrpcError.

Search for actors (users) matching a query string.

agent : AtpAgent

An authenticated AtpAgent.

query : string

The search query string.

limit : int64 option

Maximum number of actors to return (optional).

cursor : string option

Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<ProfileSummary>, XrpcError>>

A page of ProfileSummary with an optional cursor, or an XrpcError.

searchActorsTypeahead agent query limit

Full Usage: searchActorsTypeahead agent query limit

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    query : string - The search query string (prefix).
    limit : int64 option - Maximum number of actors to return (optional).

Returns: Task<Result<ProfileSummary list, XrpcError>> A list of ProfileSummary on success, or an XrpcError.

Lightweight actor search for autocomplete/typeahead. Returns a flat list (no pagination).

agent : AtpAgent

An authenticated AtpAgent.

query : string

The search query string (prefix).

limit : int64 option

Maximum number of actors to return (optional).

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

A list of ProfileSummary on success, or an XrpcError.

searchPosts agent query limit cursor

Full Usage: searchPosts agent query limit cursor

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    query : string - The search query string.
    limit : int64 option - Maximum number of posts to return (optional).
    cursor : string option - Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<TimelinePost>, XrpcError>> A page of TimelinePost with an optional cursor, or an XrpcError.

Search for posts matching a query string.

agent : AtpAgent

An authenticated AtpAgent.

query : string

The search query string.

limit : int64 option

Maximum number of posts to return (optional).

cursor : string option

Pagination cursor from a previous response (optional).

Returns: Task<Result<Page<TimelinePost>, XrpcError>>

A page of TimelinePost with an optional cursor, or an XrpcError.

setAdultContentEnabled agent enabled

Full Usage: setAdultContentEnabled agent enabled

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    enabled : bool - Whether adult content should be enabled.

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

Enable or disable adult content in the user's preferences.

agent : AtpAgent

An authenticated AtpAgent.

enabled : bool

Whether adult content should be enabled.

Returns: Task<Result<unit, XrpcError>>

Ok () on success, or an XrpcError.

setAvatar agent avatar

Full Usage: setAvatar agent avatar

Parameters:
Returns: Task<Result<unit, XrpcError>>

Set or clear the authenticated user's avatar image. Uploads the blob first, then updates the profile record. Retries once on conflict. Pass None to clear the avatar.

agent : AtpAgent
avatar : (byte[] * ImageMime) option
Returns: Task<Result<unit, XrpcError>>

setBanner agent banner

Full Usage: setBanner agent banner

Parameters:
Returns: Task<Result<unit, XrpcError>>

Set or clear the authenticated user's banner image. Uploads the blob first, then updates the profile record. Retries once on conflict. Pass None to clear the banner.

agent : AtpAgent
banner : (byte[] * ImageMime) option
Returns: Task<Result<unit, XrpcError>>

setContentLabelPref agent label visibility labelerDid

Full Usage: setContentLabelPref agent label visibility labelerDid

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    label : string - The label identifier (e.g. "nsfw", "gore").
    visibility : ContentLabelPrefVisibility - The desired visibility setting.
    labelerDid : Did option - Optional labeler DID (for custom labelers).

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

Set the visibility for a content label.

agent : AtpAgent

An authenticated AtpAgent.

label : string

The label identifier (e.g. "nsfw", "gore").

visibility : ContentLabelPrefVisibility

The desired visibility setting.

labelerDid : Did option

Optional labeler DID (for custom labelers).

Returns: Task<Result<unit, XrpcError>>

Ok () on success, or an XrpcError.

setDescription agent description

Full Usage: setDescription agent description

Parameters:
    agent : AtpAgent
    description : string option

Returns: Task<Result<unit, XrpcError>>

Set or clear the authenticated user's bio/description. Retries once on conflict.

agent : AtpAgent
description : string option
Returns: Task<Result<unit, XrpcError>>

setDisplayName agent name

Full Usage: setDisplayName agent name

Parameters:
Returns: Task<Result<unit, XrpcError>>

Set or clear the authenticated user's display name. Retries once on conflict.

agent : AtpAgent
name : string option
Returns: Task<Result<unit, XrpcError>>

setThreadViewPref agent sort

Full Usage: setThreadViewPref agent sort

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

Set thread view preferences (sort order).

agent : AtpAgent

An authenticated AtpAgent.

sort : ThreadViewPrefSort

The desired thread sort order.

Returns: Task<Result<unit, XrpcError>>

Ok () on success, or an XrpcError.

unblock agent blockRef

Full Usage: unblock agent blockRef

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

Unblock a user by deleting the block record.

agent : AtpAgent

An authenticated AtpAgent.

blockRef : BlockRef

The BlockRef returned by block.

Returns: Task<Result<unit, XrpcError>>

Ok () on success, or an XrpcError.

unblockModList agent listBlockRef

Full Usage: unblockModList agent listBlockRef

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

Unblock a previously blocked moderation list by deleting the list block record.

agent : AtpAgent

An authenticated AtpAgent.

listBlockRef : ListBlockRef

The ListBlockRef returned by blockModList.

Returns: Task<Result<unit, XrpcError>>

Ok () on success, or an XrpcError.

undo agent ref

Full Usage: undo agent ref

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    ref : ^a - Any ref type with an AT-URI (LikeRef, RepostRef, FollowRef, or BlockRef).

Returns: Task<Result<UndoResult, XrpcError>> Ok Undone on success, or an XrpcError. Note: the AT Protocol's deleteRecord is idempotent, so this always returns Undone even if the record was already deleted. Only target-based functions (unlikePost/unrepostPost) can return WasNotPresent.
Modifiers: inline
Type parameters: ^a

Generic undo: delete any ref type (LikeRef, RepostRef, FollowRef, or BlockRef). Dispatches to the correct typed undo function via SRTP.

agent : AtpAgent

An authenticated AtpAgent.

ref : ^a

Any ref type with an AT-URI (LikeRef, RepostRef, FollowRef, or BlockRef).

Returns: Task<Result<UndoResult, XrpcError>>

Ok Undone on success, or an XrpcError. Note: the AT Protocol's deleteRecord is idempotent, so this always returns Undone even if the record was already deleted. Only target-based functions (unlikePost/unrepostPost) can return WasNotPresent.

Example

 let! likeRef = Bluesky.like agent postRef
 let! result = Bluesky.undo agent likeRef  // works with any ref type

undoBlock agent blockRef

Full Usage: undoBlock agent blockRef

Parameters:
Returns: Task<Result<UndoResult, XrpcError>> Ok Undone on success, or an XrpcError. Note: the AT Protocol's deleteRecord is idempotent, so this always returns Undone even if the record was already deleted. Only target-based functions (unlikePost/unrepostPost) can return WasNotPresent.

Undo a block by deleting the block record. Returns Undone on success.

agent : AtpAgent

An authenticated AtpAgent.

blockRef : BlockRef

The BlockRef returned by block.

Returns: Task<Result<UndoResult, XrpcError>>

Ok Undone on success, or an XrpcError. Note: the AT Protocol's deleteRecord is idempotent, so this always returns Undone even if the record was already deleted. Only target-based functions (unlikePost/unrepostPost) can return WasNotPresent.

undoFollow agent followRef

Full Usage: undoFollow agent followRef

Parameters:
Returns: Task<Result<UndoResult, XrpcError>> Ok Undone on success, or an XrpcError. Note: the AT Protocol's deleteRecord is idempotent, so this always returns Undone even if the record was already deleted. Only target-based functions (unlikePost/unrepostPost) can return WasNotPresent.

Undo a follow by deleting the follow record. Returns Undone on success.

agent : AtpAgent

An authenticated AtpAgent.

followRef : FollowRef

The FollowRef returned by follow.

Returns: Task<Result<UndoResult, XrpcError>>

Ok Undone on success, or an XrpcError. Note: the AT Protocol's deleteRecord is idempotent, so this always returns Undone even if the record was already deleted. Only target-based functions (unlikePost/unrepostPost) can return WasNotPresent.

undoLike agent likeRef

Full Usage: undoLike agent likeRef

Parameters:
Returns: Task<Result<UndoResult, XrpcError>> Ok Undone on success, or an XrpcError. Note: the AT Protocol's deleteRecord is idempotent, so this always returns Undone even if the record was already deleted. Only target-based functions (unlikePost/unrepostPost) can return WasNotPresent.

Undo a like by deleting the like record. Returns Undone on success.

agent : AtpAgent

An authenticated AtpAgent.

likeRef : LikeRef

The LikeRef returned by like.

Returns: Task<Result<UndoResult, XrpcError>>

Ok Undone on success, or an XrpcError. Note: the AT Protocol's deleteRecord is idempotent, so this always returns Undone even if the record was already deleted. Only target-based functions (unlikePost/unrepostPost) can return WasNotPresent.

undoRepost agent repostRef

Full Usage: undoRepost agent repostRef

Parameters:
Returns: Task<Result<UndoResult, XrpcError>> Ok Undone on success, or an XrpcError. Note: the AT Protocol's deleteRecord is idempotent, so this always returns Undone even if the record was already deleted. Only target-based functions (unlikePost/unrepostPost) can return WasNotPresent.

Undo a repost by deleting the repost record. Returns Undone on success.

agent : AtpAgent

An authenticated AtpAgent.

repostRef : RepostRef

The RepostRef returned by repost.

Returns: Task<Result<UndoResult, XrpcError>>

Ok Undone on success, or an XrpcError. Note: the AT Protocol's deleteRecord is idempotent, so this always returns Undone even if the record was already deleted. Only target-based functions (unlikePost/unrepostPost) can return WasNotPresent.

unfollow agent followRef

Full Usage: unfollow agent followRef

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

Unfollow a user by deleting the follow record.

agent : AtpAgent

An authenticated AtpAgent.

followRef : FollowRef

The FollowRef returned by follow.

Returns: Task<Result<unit, XrpcError>>

Ok () on success, or an XrpcError.

unlike agent likeRef

Full Usage: unlike agent likeRef

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

Unlike a post by deleting the like record.

agent : AtpAgent

An authenticated AtpAgent.

likeRef : LikeRef

The LikeRef returned by like.

Returns: Task<Result<unit, XrpcError>>

Ok () on success, or an XrpcError.

unlikePost agent target

Full Usage: unlikePost agent target

Parameters:
Returns: Task<Result<UndoResult, XrpcError>> Ok Undone if the like was found and deleted, Ok WasNotPresent if the post was not liked by the current user, or an XrpcError on failure.
Modifiers: inline
Type parameters: ^a

Unlike a post by its PostRef, without needing the original LikeRef. Fetches the post to find the current user's like URI from the viewer state, then deletes it.

agent : AtpAgent

An authenticated AtpAgent.

target : ^a

The post to unlike (a PostRef or TimelinePost).

Returns: Task<Result<UndoResult, XrpcError>>

Ok Undone if the like was found and deleted, Ok WasNotPresent if the post was not liked by the current user, or an XrpcError on failure.

unlikePostImpl agent postRef

Full Usage: unlikePostImpl agent postRef

Parameters:
Returns: Task<Result<UndoResult, XrpcError>>
agent : AtpAgent
postRef : PostRef
Returns: Task<Result<UndoResult, XrpcError>>

unmuteModList agent listUri

Full Usage: unmuteModList agent listUri

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    listUri : AtUri - The AT-URI of the moderation list to unmute.

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

Unmute a previously muted moderation list.

agent : AtpAgent

An authenticated AtpAgent.

listUri : AtUri

The AT-URI of the moderation list to unmute.

Returns: Task<Result<unit, XrpcError>>

unit on success, or an XrpcError.

unmuteThread agent root

Full Usage: unmuteThread agent root

Parameters:
Returns: Task<Result<unit, XrpcError>> unit on success, or an XrpcError.
Modifiers: inline
Type parameters: ^a

Unmute a previously muted thread. Accepts an AtUri, PostRef, or TimelinePost.

agent : AtpAgent

An authenticated AtpAgent.

root : ^a

The thread root post (an AtUri, PostRef, or TimelinePost).

Returns: Task<Result<unit, XrpcError>>

unit on success, or an XrpcError.

unmuteThreadImpl agent root

Full Usage: unmuteThreadImpl agent root

Parameters:
Returns: Task<Result<unit, XrpcError>>
agent : AtpAgent
root : AtUri
Returns: Task<Result<unit, XrpcError>>

unmuteUser agent target

Full Usage: unmuteUser agent target

Parameters:
Returns: Task<Result<unit, XrpcError>> unit on success, or an XrpcError.
Modifiers: inline
Type parameters: ^a

Unmute a previously muted account. Accepts a Did, ProfileSummary, or Profile directly.

agent : AtpAgent

An authenticated AtpAgent.

target : ^a

The user to unmute — a Did, ProfileSummary, or Profile.

Returns: Task<Result<unit, XrpcError>>

unit on success, or an XrpcError.

unmuteUserByHandle agent identifier

Full Usage: unmuteUserByHandle agent identifier

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    identifier : string - A handle (e.g., my-handle.bsky.social) or DID string (e.g., did:plc:abc123).

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

Unmute an account by handle string. The handle is resolved to a DID, then the unmute is performed. Also accepts a DID string directly (if it starts with did:, it is parsed as a DID).

For type-safe usage when you already have a Did, use unmuteUser instead.

agent : AtpAgent

An authenticated AtpAgent.

identifier : string

A handle (e.g., my-handle.bsky.social) or DID string (e.g., did:plc:abc123).

Returns: Task<Result<unit, XrpcError>>

unit on success, or an XrpcError.

unmuteUserImpl agent did

Full Usage: unmuteUserImpl agent did

Parameters:
Returns: Task<Result<unit, XrpcError>>
agent : AtpAgent
did : Did
Returns: Task<Result<unit, XrpcError>>

unrepost agent repostRef

Full Usage: unrepost agent repostRef

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

Undo a repost by deleting the repost record.

agent : AtpAgent

An authenticated AtpAgent.

repostRef : RepostRef

The RepostRef returned by repost.

Returns: Task<Result<unit, XrpcError>>

Ok () on success, or an XrpcError.

unrepostPost agent target

Full Usage: unrepostPost agent target

Parameters:
Returns: Task<Result<UndoResult, XrpcError>> Ok Undone if the repost was found and deleted, Ok WasNotPresent if the post was not reposted by the current user, or an XrpcError on failure.
Modifiers: inline
Type parameters: ^a

Un-repost a post by its PostRef, without needing the original RepostRef. Fetches the post to find the current user's repost URI from the viewer state, then deletes it.

agent : AtpAgent

An authenticated AtpAgent.

target : ^a

The post to un-repost (a PostRef or TimelinePost).

Returns: Task<Result<UndoResult, XrpcError>>

Ok Undone if the repost was found and deleted, Ok WasNotPresent if the post was not reposted by the current user, or an XrpcError on failure.

unrepostPostImpl agent postRef

Full Usage: unrepostPostImpl agent postRef

Parameters:
Returns: Task<Result<UndoResult, XrpcError>>
agent : AtpAgent
postRef : PostRef
Returns: Task<Result<UndoResult, XrpcError>>

updateHandle agent handle

Full Usage: updateHandle agent handle

Parameters:
Returns: Task<Result<unit, XrpcError>> unit on success, or an XrpcError.

Update the authenticated user's handle.

agent : AtpAgent

An authenticated AtpAgent.

handle : Handle

The new Handle to set.

Returns: Task<Result<unit, XrpcError>>

unit on success, or an XrpcError.

updateProfile agent transform

Full Usage: updateProfile agent transform

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

Update the authenticated user's profile by applying a transform function. Reads the current profile, applies the transform, then writes back with optimistic concurrency.

agent : AtpAgent

An authenticated AtpAgent.

transform : Profile -> Profile

A function that transforms the current profile record.

Returns: Task<Result<unit, XrpcError>>

Ok () on success, or an XrpcError (including on swap conflict).

uploadBlob agent data mimeType

Full Usage: uploadBlob agent data mimeType

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    data : byte[] - The raw binary content of the blob.
    mimeType : ImageMime - The MIME type of the blob (e.g., Jpeg, Png).

Returns: Task<Result<BlobRef, XrpcError>> Ok with a BlobRef on success, or an XrpcError. The Json field contains the raw JSON for use in embed records, while Ref, MimeType, and Size provide typed access to individual fields.

Upload a blob (image, video, or other binary data) to the PDS. Returns a typed BlobRef containing the blob reference needed to embed the blob in a record.

Use Json when constructing custom embed records, or use postWithImages for a higher-level API that handles blob references automatically.

agent : AtpAgent

An authenticated AtpAgent.

data : byte[]

The raw binary content of the blob.

mimeType : ImageMime

The MIME type of the blob (e.g., Jpeg, Png).

Returns: Task<Result<BlobRef, XrpcError>>

Ok with a BlobRef on success, or an XrpcError. The Json field contains the raw JSON for use in embed records, while Ref, MimeType, and Size provide typed access to individual fields.

uploadVideo agent data mimeType

Full Usage: uploadVideo agent data mimeType

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    data : byte[] - The raw video bytes.
    mimeType : VideoMime - The video MIME type.

Returns: Task<Result<JobStatus, XrpcError>> A JobStatus on success, or an XrpcError.

Upload a video to the video processing service. Returns a job status that can be polled with getVideoJobStatus.

agent : AtpAgent

An authenticated AtpAgent.

data : byte[]

The raw video bytes.

mimeType : VideoMime

The video MIME type.

Returns: Task<Result<JobStatus, XrpcError>>

A JobStatus on success, or an XrpcError.

upsertPreferences agent updateFn

Full Usage: upsertPreferences agent updateFn

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

Read-modify-write the authenticated user's preferences. Reads current preferences, applies your transform function, and writes the result back. Preferences use last-write-wins semantics (no CAS).

agent : AtpAgent

An authenticated AtpAgent.

updateFn : JsonElement list -> JsonElement list

A function that receives the current preferences list and returns the updated list.

Returns: Task<Result<unit, XrpcError>>

Ok () on success, or an XrpcError.

upsertProfile agent updateFn

Full Usage: upsertProfile agent updateFn

Parameters:
    agent : AtpAgent - An authenticated AtpAgent.
    updateFn : Profile option -> Profile - A function that receives the current profile (or None if the user has no profile record) and returns the updated profile to write.

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

Read-modify-write the authenticated user's profile with CAS (compare-and-swap) retry. Reads the current profile, applies your update function, and writes the result back. Automatically retries (up to 3 times) if another write conflicts.

agent : AtpAgent

An authenticated AtpAgent.

updateFn : Profile option -> Profile

A function that receives the current profile (or None if the user has no profile record) and returns the updated profile to write.

Returns: Task<Result<unit, XrpcError>>

Ok () on success, or an XrpcError.

Example

 let! result = Bluesky.upsertProfile agent (fun currentProfile ->
     let current = currentProfile |> Option.defaultValue { DisplayName = None; Description = None; Avatar = None; Banner = None; CreatedAt = None; JoinedViaStarterPack = None; Labels = None; Pinnedpost = None }
     { current with DisplayName = Some "New Name" })
module Option from Microsoft.FSharp.Core
val defaultValue: value: 'T -> option: 'T option -> 'T
union case Option.None: Option<'T>
union case Option.Some: Value: 'T -> Option<'T>

Type something to start searching.