AuthenticatedXrpcBlueskyApi

Wrapper around XrpcBlueskyApi to transparently manage session tokens on the user's behalf.

This class is responsible for saving and restoring session tokens from the server's responses. The session will also automatically be refreshed and retried using the refresh token if any method call results in an ExpiredToken error. Use of one of the following methods will automatically start a session and save the tokens:

A session can also be manually activated by invoking the activateBearerTokens or activateOAuth methods.

Use of deleteSession (for Bearer auth) or deleteOAuthSession (for OAuth) will clear the session. The session can also be manually cleared by calling clearCredentials which will remove, but not invalidate, the current session tokens.

Constructors

Link copied to clipboard
constructor(httpClient: HttpClient = defaultHttpClient, initialTokens: BlueskyAuthPlugin.Tokens? = null, oauthApi: OAuthApi = OAuthApi(httpClient, { OAuthCodeChallengeMethod.S256 }))

Creates a new instance of AuthenticatedXrpcBlueskyApi

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The current session tokens. This will be null if the user is not authenticated.

Functions

Link copied to clipboard
open suspend override fun acceptConvo(request: AcceptConvoRequest): AtpResponse<AcceptConvoResponse>

Marks a conversation as accepted, so it is shown in the list of accepted convos instead on the request convos.

Link copied to clipboard
open suspend override fun activateAccount(): AtpResponse<Unit>

Activates a currently deactivated account. Used to finalize account migration after the account's repo is imported and identity is setup.

Link copied to clipboard
fun activateBearerTokens(accessToken: String, refreshToken: String)

Activates the Bearer session using the provided tokens. This will save the access and refresh tokens. Rotation of the tokens is handled automatically.

Link copied to clipboard
fun activateOAuth(oauthToken: OAuthToken)

Activates the OAuth session using the provided OAuthToken. This will save the OAuth access and refresh tokens, as well as the PDS URL, key pair, client ID, and nonce. Rotation of the DPoP nonce is handled automatically.

Link copied to clipboard
open suspend override fun addMember(request: AddMemberRequest): AtpResponse<AddMemberResponse>

Add a member to the ozone team. Requires admin role.

Link copied to clipboard
open suspend override fun addMembers(request: AddMembersRequest): AtpResponse<AddMembersResponse>

NOTE: This is under active development and should be considered unstable while this note is here. Adds members to a group. The members are added in 'request' status, so they have to accept it. This creates convo memberships.

Link copied to clipboard
open suspend override fun addReaction(request: AddReactionRequest): AtpResponse<AddReactionResponse>

Adds an emoji reaction to a message. Requires authentication. It is idempotent, so multiple calls from the same user with the same emoji result in a single reaction.

Link copied to clipboard

Add a handle to the set of reserved handles.

Link copied to clipboard
open suspend override fun addRule(request: AddRuleRequest): AtpResponse<AddRuleResponse>

Add a new URL safety rule

Link copied to clipboard
open suspend override fun addValues(request: AddValuesRequest): AtpResponse<Unit>

Add values to a specific set. Attempting to add values to a set that does not exist will result in an error.

Link copied to clipboard
open suspend override fun applyWrites(request: ApplyWritesRequest): AtpResponse<ApplyWritesResponse>

Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS.

Link copied to clipboard

NOTE: This is under active development and should be considered unstable while this note is here. Approves a request to join a group (via join link) the user owns. Action taken by the group owner.

Link copied to clipboard

Assign a user to a queue.

Assign a report to a user. Defaults to the caller. Admins may assign to any moderator.

Link copied to clipboard
open suspend override fun begin(request: BeginRequest): AtpResponse<BeginResponse>

Initiate Age Assurance for an account.

Link copied to clipboard

Cancel all pending scheduled moderation actions for specified subjects

Link copied to clipboard

Returns the status of an account, especially as pertaining to import or recovery. Can be called many times over the course of an account migration. Requires auth and can only be called pertaining to oneself.

Link copied to clipboard

Checks whether the provided handle is available. If the handle is not available, available suggestions will be returned. Optional inputs will be used to generate suggestions.

Link copied to clipboard

Check accounts location in signup queue.

Link copied to clipboard

Clears the current session tokens, effectively logging the user out. Note that any previously-cached tokens are not invalidated on the server side, unlike calling deleteSession.

Link copied to clipboard
open suspend override fun confirmEmail(request: ConfirmEmailRequest): AtpResponse<Unit>

Confirm an email using a token from com.atproto.server.requestEmailConfirmation.

Link copied to clipboard

Create an account. Implemented by PDS.

Link copied to clipboard

Register an activity on a report. For state-change activity types, validates the transition and updates report.status atomically.

Link copied to clipboard

Create an App Password.

Link copied to clipboard
open suspend override fun createBookmark(request: CreateBookmarkRequest): AtpResponse<Unit>

Creates a private bookmark for the specified record. Currently, only app.bsky.feed.post records are supported. Requires authentication.

Link copied to clipboard
open suspend override fun createDraft(request: CreateDraftRequest): AtpResponse<CreateDraftResponse>

Inserts a draft using private storage (stash). An upper limit of drafts might be enforced. Requires authentication.

Link copied to clipboard
open suspend override fun createGroup(request: CreateGroupRequest): AtpResponse<CreateGroupResponse>

NOTE: This is under active development and should be considered unstable while this note is here. Creates a group convo, specifying the members to be added to it. Unlike getConvoForMembers, this isn't idempotent. It will create new groups even if the membership is identical to pre-existing groups. Will create 'request' membership for all members, except the owner who is 'accepted'.

Link copied to clipboard

Create an invite code.

Link copied to clipboard

Create invite codes.

Link copied to clipboard

NOTE: This is under active development and should be considered unstable while this note is here. Creates a join link for the group convo.

Link copied to clipboard
open suspend override fun createQueue(request: CreateQueueRequest): AtpResponse<CreateQueueResponse>

Create a new moderation queue. Will fail if the queue configuration conflicts with an existing queue.

Link copied to clipboard

Create a single new repository record. Requires auth, implemented by PDS.

Link copied to clipboard

Submit a moderation report regarding an atproto account or record. Implemented by moderation services (with PDS proxying), and requires auth.

Link copied to clipboard

Create an authentication session.

Link copied to clipboard

Administrative action to create a new, re-usable communication (email for now) template.

Link copied to clipboard
open suspend override fun deactivateAccount(request: DeactivateAccountRequest): AtpResponse<Unit>

Deactivates a currently active account. Stops serving of repo, and future writes to repo until reactivated. Used to finalize account migration with the old host after the account has been activated on the new host.

Link copied to clipboard
open suspend override fun deleteAccount(): AtpResponse<DeleteAccountResponse>

open suspend override fun deleteAccount(request: DeleteAccountRequest): AtpResponse<Unit>

Delete a user account as an administrator.

open suspend override fun deleteAccount(request: DeleteAccountRequest): AtpResponse<Unit>

Delete an actor's account with a token and password. Can only be called after requesting a deletion token. Requires auth.

Link copied to clipboard
open suspend override fun deleteBookmark(request: DeleteBookmarkRequest): AtpResponse<Unit>

Deletes a private bookmark for the specified record. Currently, only app.bsky.feed.post records are supported. Requires authentication.

Link copied to clipboard
open suspend override fun deleteDraft(request: DeleteDraftRequest): AtpResponse<Unit>

Deletes a draft by ID. Requires authentication.

Link copied to clipboard
open suspend override fun deleteMember(request: DeleteMemberRequest): AtpResponse<Unit>

Delete a member from ozone team. Requires admin role.

Link copied to clipboard

Marks a message as deleted for the viewer, so they won't see that message in future enumerations.

Link copied to clipboard
suspend fun deleteOAuthSession()

Revoke the current oauthToken using the OAuth server's revocation endpoint.

Link copied to clipboard
open suspend override fun deleteQueue(request: DeleteQueueRequest): AtpResponse<DeleteQueueResponse>

Delete a moderation queue. Optionally migrate reports to another queue.

Link copied to clipboard

Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS.

Link copied to clipboard
open suspend override fun deleteSession(): AtpResponse<Unit>

Delete the current session. Requires auth using the 'refreshJwt' (not the 'accessJwt').

Link copied to clipboard
open suspend override fun deleteSet(request: DeleteSetRequest): AtpResponse<DeleteSetResponse>

Delete an entire set. Attempting to delete a set that does not exist will result in an error.

Link copied to clipboard
open suspend override fun deleteTemplate(request: DeleteTemplateRequest): AtpResponse<Unit>

Delete a communication template.

Link copied to clipboard
open suspend override fun deleteValues(request: DeleteValuesRequest): AtpResponse<Unit>

Delete values from a specific set. Attempting to delete values that are not in the set will not result in an error

Link copied to clipboard

Allows finding the oauth permission scope from a reference

Link copied to clipboard

Get information about a feed generator, including policies and offered feed URIs. Does not require auth; implemented by Feed Generator services (not App View).

Link copied to clipboard

Get information about an account and repository, including the list of collections. Does not require auth.

Link copied to clipboard
open suspend override fun describeServer(): AtpResponse<DescribeServerResponse>

Describes the server's account creation requirements and capabilities. Implemented by PDS.

Link copied to clipboard

Disable an account from receiving new invite codes, but does not invalidate existing codes.

Link copied to clipboard
open suspend override fun disableInviteCodes(request: DisableInviteCodesRequest): AtpResponse<Unit>

Disable some set of codes and/or all codes associated with a set of users.

Link copied to clipboard

NOTE: This is under active development and should be considered unstable while this note is here. Disables the active join link for the group convo.

Link copied to clipboard

Removes a match that was found via contact import. It shouldn't appear again if the same contact is re-imported. Requires authentication.

Link copied to clipboard
open suspend override fun editGroup(request: EditGroupRequest): AtpResponse<EditGroupResponse>

NOTE: This is under active development and should be considered unstable while this note is here. Edits group settings.

Link copied to clipboard

NOTE: This is under active development and should be considered unstable while this note is here. Edits the existing join link settings for the group convo.

Link copied to clipboard
open suspend override fun emitEvent(request: EmitEventRequest): AtpResponse<EmitEventResponse>

Take a moderation action on an actor.

Link copied to clipboard

Re-enable an account's ability to receive invite codes.

Link copied to clipboard

NOTE: This is under active development and should be considered unstable while this note is here. Re-enables a previously disabled join link for the group convo.

Link copied to clipboard
open suspend override fun exportAccountData(): AtpResponse<ByteArray>
Link copied to clipboard
Link copied to clipboard

Find all correlated threat signatures between 2 or more accounts.

Link copied to clipboard

Get accounts that share some matching threat signatures with the root account.

Link copied to clipboard

Get account history, e.g. log of updated email addresses or other identity information.

Link copied to clipboard

Get details about an account.

Link copied to clipboard

Get details about some accounts.

Link copied to clipboard

Get all invite codes for the current account. Requires auth.

Link copied to clipboard

Get timeline of all available events of an account. This includes moderation events, account history and did history.

Link copied to clipboard

Get a list of feeds (feed generator records) created by the actor (in the actor's repo).

Link copied to clipboard

Get a list of posts liked by an actor. Requires auth, actor must be the requesting account.

Link copied to clipboard
Link copied to clipboard

Get a list of starter packs created by the actor.

Link copied to clipboard

Returns the current state of the age assurance process for an account. This is used to check if the user has completed age assurance or if further action is required.

Link copied to clipboard

Get moderator assignments, optionally filtered by active status, queue, or moderator.

Get assignments for reports.

Link copied to clipboard

Get a view of an actor's 'author feed' (post and reposts by the author). Does not require auth.

Link copied to clipboard
open suspend override fun getBlob(params: GetBlobQueryParams): AtpResponse<ByteArray>

Get a blob associated with a given account. Returns the full blob as originally uploaded. Does not require auth; implemented by PDS.

Link copied to clipboard
open suspend override fun getBlocks(params: GetBlocksQueryParams): AtpResponse<GetBlocksResponse>

Enumerates which accounts the requesting account is currently blocking. Requires auth.

open suspend override fun getBlocks(params: GetBlocksQueryParams): AtpResponse<ByteArray>

Get data blocks from a given repo, by CID. For example, intermediate MST nodes, or records. Does not require auth; implemented by PDS.

Link copied to clipboard

Gets views of records bookmarked by the authenticated user. Requires authentication.

Link copied to clipboard
open suspend override fun getCheckout(params: GetCheckoutQueryParams): AtpResponse<ByteArray>
Link copied to clipboard

Returns Age Assurance configuration for use on the client.

Link copied to clipboard

Get details about ozone's server configuration.

Link copied to clipboard
open suspend override fun getConfigUnspecced(): AtpResponse<GetConfigResponse>

Get miscellaneous runtime configuration.

Link copied to clipboard
open suspend override fun getConvo(params: GetConvoQueryParams): AtpResponse<GetConvoResponse>

Gets an existing conversation by its ID.

open suspend override fun getConvo(params: GetConvoQueryParams): AtpResponse<GetConvoResponse>

NOTE: This is under active development and should be considered unstable while this note is here. Gets an existing conversation by its ID, for moderation purposes. Does not require the requester to be a member of the conversation.

Link copied to clipboard

Check whether the requester and the other members can start a 1-1 chat. Only applicable to direct (non-group) conversations. If an existing convo is found for these members, it is returned. Does not create a new convo if it doesn't exist.

Link copied to clipboard

Get or create a 1-1 conversation for the given members. Always returns the same direct (non-group) conversation. To create a group conversation, use createGroup.

Link copied to clipboard

Returns a paginated list of members from a conversation.

NOTE: This is under active development and should be considered unstable while this note is here. Returns a paginated list of members from a conversation, for moderation purposes. Does not require the requester to be a member of the conversation.

Link copied to clipboard
open suspend override fun getConvos(params: GetConvosQueryParams): AtpResponse<GetConvosResponse>

NOTE: This is under active development and should be considered unstable while this note is here. Gets existing conversations by their IDs, for moderation purposes. Does not require the requester to be a member of the conversations. Unknown IDs are silently omitted from the response.

Link copied to clipboard
open suspend override fun getDrafts(params: GetDraftsQueryParams): AtpResponse<GetDraftsResponse>

Gets views of user drafts. Requires authentication.

Link copied to clipboard

Resolve one or more AT-URIs into the data needed to render an enhanced external embed. Returns associatedRefs (strongRefs to embed into a post's external.associatedRefs), the raw associatedRecords, and a hydrated view. The response is empty ({}) when no records were resolvable, or when validation determined the resolved records don't actually back the requested URL; clients should fall back to their own link-card rendering in that case and skip writing strongRefs to the post.

Link copied to clipboard
open suspend override fun getEvent(params: GetEventQueryParams): AtpResponse<GetEventResponse>

Get details about a moderation event.

Link copied to clipboard
open suspend override fun getFeed(params: GetFeedQueryParams): AtpResponse<GetFeedResponse>

Get a hydrated feed from an actor's selected feed generator. Implemented by App View.

Link copied to clipboard

Get information about a feed generator. Implemented by AppView.

Link copied to clipboard

Get information about a list of feed generators.

Link copied to clipboard

Get a skeleton of a feed provided by a feed generator. Auth is optional, depending on provider requirements, and provides the DID of the requester. Implemented by Feed Generator Service.

Link copied to clipboard

Enumerates accounts which follow a specified account (actor).

Link copied to clipboard
open suspend override fun getFollows(params: GetFollowsQueryParams): AtpResponse<GetFollowsResponse>

Enumerates accounts which a specified account (actor) follows.

Link copied to clipboard
open suspend override fun getHead(params: GetHeadQueryParams): AtpResponse<GetHeadResponse>
Link copied to clipboard

Get historical daily report statistics. Returns a paginated list of daily stat snapshots, newest first. Filter by queue, moderator, or report type.

Link copied to clipboard

Returns information about a specified upstream host, as consumed by the server. Implemented by relays.

Link copied to clipboard

Get an admin view of invite codes.

Link copied to clipboard

Get status details for a video processing job.

Link copied to clipboard

NOTE: This is under active development and should be considered unstable while this note is here. Get public information about groups from join links. The output array matches the input codes one-to-one by position (and each view also carries its 'code'). Disabled codes return a disabledJoinLinkPreviewView, and codes that do not map to a previewable link return an invalidJoinLinkPreviewView.

Link copied to clipboard

Enumerates accounts which follow a specified account (actor) and are followed by the viewer.

Link copied to clipboard

Get the current commit CID & revision of the specified repo. Does not require auth.

Link copied to clipboard

Get the most recent report.

Link copied to clipboard
open suspend override fun getLikes(params: GetLikesQueryParams): AtpResponse<GetLikesResponse>

Get like records which reference a subject (by AT-URI and CID).

Link copied to clipboard
open suspend override fun getList(params: GetListQueryParams): AtpResponse<GetListResponse>

Gets a 'view' (with additional context) of a specified list.

Link copied to clipboard

Get mod lists that the requesting account (actor) is blocking. Requires auth.

Link copied to clipboard

Get a feed of recent posts from a list (posts and reposts from any actors on the list). Does not require auth.

Link copied to clipboard

Enumerates mod lists that the requesting account (actor) currently has muted. Requires auth.

Link copied to clipboard
open suspend override fun getLists(params: GetListsQueryParams): AtpResponse<GetListsResponse>

Enumerates the lists created by a specified account (actor).

Link copied to clipboard

Enumerates the lists created by the session user, and includes membership information about actor in those lists. Only supports curation and moderation lists (no reference lists, used in starter packs). Requires auth.

Link copied to clipboard

Get live report statistics from the past 24 hours. Filter by queue, moderator, or report type. Omit all parameters for aggregate stats.

Link copied to clipboard
open suspend override fun getLog(params: GetLogQueryParams): AtpResponse<GetLogResponse>
Link copied to clipboard
open suspend override fun getMatches(params: GetMatchesQueryParams): AtpResponse<GetMatchesResponse>

Returns the matched contacts (contacts that were mutually imported). Excludes dismissed matches. Requires authentication.

Link copied to clipboard
Link copied to clipboard

Returns a page of messages from a conversation.

Link copied to clipboard
open suspend override fun getMutes(params: GetMutesQueryParams): AtpResponse<GetMutesResponse>

Enumerates accounts that the requesting account (actor) currently has muted. Requires auth.

Get a skeleton of suggested starterpacks for onboarding. Intended to be called and hydrated by app.bsky.unspecced.getOnboardingSuggestedStarterPacks

Get a skeleton of suggested users for onboarding. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedOnboardingUsers

Link copied to clipboard

An unspecced view of globally popular feed generators.

Link copied to clipboard
open suspend override fun getPosts(params: GetPostsQueryParams): AtpResponse<GetPostsResponse>

Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'.

Link copied to clipboard

Get posts in a thread. Does not require auth, but additional metadata and filtering will be applied for authed requests.

Link copied to clipboard

(NOTE: this endpoint is under development and WILL change without notice. Don't use it until it is moved out of unspecced or your application WILL break) Get additional posts under a thread e.g. replies hidden by threadgate. Based on an anchor post at any depth of the tree, returns top-level replies below that anchor. It does not include ancestors nor the anchor itself. This should be called after exhausting app.bsky.unspecced.getPostThreadV2. Does not require auth, but additional metadata and filtering will be applied for authed requests.

Link copied to clipboard

(NOTE: this endpoint is under development and WILL change without notice. Don't use it until it is moved out of unspecced or your application WILL break) Get posts in a thread. It is based in an anchor post at any depth of the tree, and returns posts above it (recursively resolving the parent, without further branching to their replies) and below it (recursive replies, with branching to their replies). Does not require auth, but additional metadata and filtering will be applied for authed requests.

Link copied to clipboard

Get private preferences attached to the current account. Expected use is synchronization between multiple devices, and import/export during account migration. Requires auth.

Link copied to clipboard

Get notification-related preferences for an account. Requires auth.

Link copied to clipboard
open suspend override fun getProfile(params: GetProfileQueryParams): AtpResponse<GetProfileResponse>

Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth.

Link copied to clipboard

Get detailed profile views of multiple actors.

Get detailed profile views of multiple actors, hydrating social proof (known followers) only for a subset of them. Intended for internal service-to-service use.

Link copied to clipboard
open suspend override fun getQuotes(params: GetQuotesQueryParams): AtpResponse<GetQuotesResponse>

Get a list of quotes for a given post.

Link copied to clipboard

Describe the credentials that should be included in the DID doc of an account that is migrating to this service.

Link copied to clipboard
open suspend override fun getRecord(params: GetRecordQueryParams): AtpResponse<GetRecordResponse>

Get a single record from a repository. Does not require auth.

open suspend override fun getRecord(params: GetRecordQueryParams): AtpResponse<ByteArray>

Get data blocks needed to prove the existence or non-existence of record in the current version of repo. Does not require auth.

open suspend override fun getRecord(params: GetRecordQueryParams): AtpResponse<GetRecordResponse>

Get details about a record.

Link copied to clipboard
open suspend override fun getRecords(params: GetRecordsQueryParams): AtpResponse<GetRecordsResponse>

Get details about some records.

Link copied to clipboard

Enumerates public relationships between one account, and a list of other accounts. Does not require auth.

Link copied to clipboard
open suspend override fun getRepo(params: GetRepoQueryParams): AtpResponse<ByteArray>

Download a repository export as CAR file. Optionally only a 'diff' since a previous revision. Does not require auth; implemented by PDS.

open suspend override fun getRepo(params: GetRepoQueryParams): AtpResponse<GetRepoResponse>

Get details about a repository.

Link copied to clipboard
open suspend override fun getReport(params: GetReportQueryParams): AtpResponse<GetReportResponse>

Get details about a single moderation report by ID.

Link copied to clipboard

Get reporter stats for a list of users.

Link copied to clipboard
open suspend override fun getRepos(params: GetReposQueryParams): AtpResponse<GetReposResponse>

Get details about some repositories.

Link copied to clipboard

Get the hosting status for a repository, on this server. Expected to be implemented by PDS and Relay.

Link copied to clipboard

Get a list of reposts for a given post.

Link copied to clipboard

Get a signed token on behalf of the requesting DID for the requested service.

Link copied to clipboard

Get information about a list of labeler services.

Link copied to clipboard
open suspend override fun getSession(): AtpResponse<GetSessionResponse>

Get information about the current auth session. Requires auth.

Link copied to clipboard

Gets a view of a starter pack.

Link copied to clipboard

Get views for a list of starter packs.

Link copied to clipboard

Enumerates the starter packs created by the session user, and includes membership information about actor in those starter packs. Requires auth.

Link copied to clipboard
open suspend override fun getState(params: GetStateQueryParams): AtpResponse<GetStateResponse>

Returns server-computed Age Assurance state, if available, and any additional metadata needed to compute Age Assurance state client-side.

Link copied to clipboard
open suspend override fun getStatus(): AtpResponse<GetStatusResponse>

Get the authenticated viewer's chat status: whether their account is chat-disabled and whether their group-membership additions are restricted to accounts they follow.

Link copied to clipboard

Get details about subjects.

Link copied to clipboard

Get the service-specific admin status of a subject (account, record, or blob).

Link copied to clipboard

Get a list of suggested feeds (feed generators) for the requesting account.

Link copied to clipboard

Get a skeleton of suggested feeds. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedFeeds

Link copied to clipboard

Get a list of suggested feeds

Link copied to clipboard

Enumerates follows similar to a given account (actor). Expected use is to recommend additional accounts immediately after following one account.

Link copied to clipboard

Get a list of suggested users for onboarding

Get a skeleton of suggested starterpacks. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedStarterpacks

Link copied to clipboard

Get a list of suggested starterpacks

Get a skeleton of suggested users for the Discover page. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsersForDiscover

Link copied to clipboard

Get a list of suggested users for the Discover page

Get a skeleton of suggested users for the Explore page. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsersForExplore

Link copied to clipboard

Get a list of suggested users for the Explore page

Get a skeleton of suggested users for the See More page. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsersForSeeMore

Link copied to clipboard

Get a list of suggested users for the See More page

Link copied to clipboard

Get a skeleton of suggested users. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsers

Link copied to clipboard

Get a list of suggested users

Link copied to clipboard

Get a list of suggested actors. Expected use is discovery of accounts to follow during new account onboarding.

Link copied to clipboard

Get a skeleton of suggested actors. Intended to be called and then hydrated through app.bsky.actor.getSuggestions

Link copied to clipboard
open suspend override fun getSyncStatus(): AtpResponse<GetSyncStatusResponse>

Gets the user's current contact import status. Requires authentication.

Link copied to clipboard

Get a list of suggestions (feeds and users) tagged with categories

Link copied to clipboard

Get a view of the requesting account's home timeline. This is expected to be some form of reverse-chronological feed.

Link copied to clipboard

Get a list of trending topics

Link copied to clipboard

Get the skeleton of trends on the network. Intended to be called and then hydrated through app.bsky.unspecced.getTrends

Link copied to clipboard

Get the current trends on the network

Link copied to clipboard

Count the number of unread notifications for the requesting account. Requires auth.

Link copied to clipboard

Returns unread conversation counts equivalent to one page of chat.bsky.convo.listConvos with readState=unread and lockStatus=unlocked, split by convo status. The combined total is capped at 31, where 31 means more than 30.

Link copied to clipboard

Get video upload limits for the authenticated user.

Link copied to clipboard
open suspend override fun getValues(params: GetValuesQueryParams): AtpResponse<GetValuesResponse>

Get a specific set and its values

Link copied to clipboard

Grant verifications to multiple subjects. Allows batch processing of up to 100 verifications at once.

Link copied to clipboard

Import contacts for securely matching with other users. This follows the protocol explained in https://docs.bsky.app/blog/contact-import-rfc. Requires authentication.

Link copied to clipboard
open suspend override fun importRepo(request: ByteArray): AtpResponse<Unit>

Import a repo in the form of a CAR file. Requires Content-Length HTTP header to be set.

Link copied to clipboard

Initiate age assurance for an account. This is a one-time action that will start the process of verifying the user's age.

Link copied to clipboard
open suspend override fun leaveConvo(request: LeaveConvoRequest): AtpResponse<LeaveConvoResponse>

Leaves a conversation (direct or group). For group, this effectively removes membership. For direct, membership is never removed, only changed to remove from enumerations by the user who left.

Link copied to clipboard

List all activities for a report, sorted most-recent-first.

Link copied to clipboard

Enumerate all accounts to which the requesting account is subscribed to receive notifications for. Requires auth.

Link copied to clipboard

List all App Passwords.

Link copied to clipboard
open suspend override fun listBlobs(params: ListBlobsQueryParams): AtpResponse<ListBlobsResponse>

List blob CIDs for an account, since some repo revision. Does not require auth; implemented by PDS.

Link copied to clipboard

NOTE: This is under active development and should be considered unstable while this note is here. Returns a page of incoming conversation requests for the user. Direct convo requests are returned as convoView; group join requests made by the user are returned as joinRequestConvoView.

Link copied to clipboard
open suspend override fun listConvos(params: ListConvosQueryParams): AtpResponse<ListConvosResponse>

Returns a page of conversations (direct or group) for the user.

Link copied to clipboard
open suspend override fun listHosts(params: ListHostsQueryParams): AtpResponse<ListHostsResponse>

Enumerates upstream hosts (eg, PDS or relay instances) that this service consumes from. Implemented by relays.

Link copied to clipboard

NOTE: This is under active development and should be considered unstable while this note is here. Lists a page of request to join a group (via join link) the user owns. Shows the data from the owner's point of view.

Link copied to clipboard

List all members with access to the ozone service.

Link copied to clipboard

Returns a list of missing blobs for the requesting account. Intended to be used in the account migration flow.

Link copied to clipboard

NOTE: This is under active development and should be considered unstable while this note is here. Returns a page of group conversations that both the requester and the specified actor are members of.

Link copied to clipboard

Enumerate notifications for the requesting account. Requires auth.

Link copied to clipboard

List settings with optional filtering

Link copied to clipboard
open suspend override fun listQueues(params: ListQueuesQueryParams): AtpResponse<ListQueuesResponse>

List all configured moderation queues with statistics.

Link copied to clipboard

List a range of records in a repository, matching a specific collection. Does not require auth.

Link copied to clipboard
open suspend override fun listRepos(params: ListReposQueryParams): AtpResponse<ListReposResponse>

Enumerates all the DID, rev, and commit CID for all repos hosted by this service. Does not require auth; implemented by PDS and Relay.

Link copied to clipboard

Enumerates all the DIDs which have records with the given collection NSID.

Link copied to clipboard

List scheduled moderation actions with optional filtering

Link copied to clipboard
open suspend override fun listTemplates(): AtpResponse<ListTemplatesResponse>

Get list of all communication templates.

Link copied to clipboard

List verifications

Link copied to clipboard
open suspend override fun lockConvo(request: LockConvoRequest): AtpResponse<LockConvoResponse>

NOTE: This is under active development and should be considered unstable while this note is here. Locks a group convo so no more content (messages, reactions) can be added to it.

Link copied to clipboard
open suspend override fun muteActor(request: MuteActorRequest): AtpResponse<Unit>

Creates a mute relationship for the specified account. Mutes are private in Bluesky. Requires auth.

Link copied to clipboard
open suspend override fun muteActorList(request: MuteActorListRequest): AtpResponse<Unit>

Creates a mute relationship for the specified list of accounts. Mutes are private in Bluesky. Requires auth.

Link copied to clipboard
open suspend override fun muteConvo(request: MuteConvoRequest): AtpResponse<MuteConvoResponse>

Mutes a conversation, preventing notifications related to it.

Link copied to clipboard
open suspend override fun muteThread(request: MuteThreadRequest): AtpResponse<Unit>

Mutes a thread preventing notifications from the thread and any of its children. Mutes are private in Bluesky. Requires auth.

Link copied to clipboard
open suspend override fun notifyOfUpdate(request: NotifyOfUpdateRequest): AtpResponse<Unit>

Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay. DEPRECATED: just use com.atproto.sync.requestCrawl

Link copied to clipboard

Puts an activity subscription entry. The key should be omitted for creation and provided for updates. Requires auth.

Link copied to clipboard
open suspend override fun putPreferences(request: PutPreferencesRequest): AtpResponse<Unit>

Set the private preferences attached to the account.

open suspend override fun putPreferences(request: PutPreferencesRequest): AtpResponse<Unit>

Set notification-related preferences for an account. Requires auth.

Link copied to clipboard

Set notification-related preferences for an account. Requires auth.

Link copied to clipboard
open suspend override fun putRecord(request: PutRecordRequest): AtpResponse<PutRecordResponse>

Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS.

Link copied to clipboard

List moderation events related to a subject.

open suspend override fun queryEvents(request: QueryEventsRequest): AtpResponse<QueryEventsResponse>

Query URL safety audit events

Link copied to clipboard

Find labels relevant to the provided AT-URI patterns. Public endpoint for moderation services, though may return different or additional results with auth.

Link copied to clipboard

View moderation reports. Reports are individual instances of content being reported, as opposed to subject statuses which aggregate reports at the subject level.

Link copied to clipboard
open suspend override fun queryRules(request: QueryRulesRequest): AtpResponse<QueryRulesResponse>

Query URL safety rules

Link copied to clipboard
open suspend override fun querySets(params: QuerySetsQueryParams): AtpResponse<QuerySetsResponse>

Query available sets

Link copied to clipboard

View moderation statuses of subjects (record or repo).

Link copied to clipboard

Manually reassign a report to a different queue (or unassign it). Records a queueActivity entry on the report.

Link copied to clipboard

Request that the server re-resolve an identity (DID and handle). The server may ignore this request, or require authentication, depending on the role, implementation, and policy of the server.

Link copied to clipboard
open suspend override fun refreshSession(): AtpResponse<RefreshSessionResponse>

Refresh an authentication session. Requires auth using the 'refreshJwt' (not the 'accessJwt').

Link copied to clipboard

Recompute report statistics for a date range. Useful for backfilling after failures or data corrections.

Link copied to clipboard
open suspend override fun registerPush(request: RegisterPushRequest): AtpResponse<Unit>

Register to receive push notifications, via a specified service, for the requesting account. Requires auth.

Link copied to clipboard

NOTE: This is under active development and should be considered unstable while this note is here. Rejects a request to join a group (via join link) the user owns. Action taken by the group owner.

Link copied to clipboard
open suspend override fun removeData(request: RemoveDataRequest): AtpResponse<RemoveDataResponse>

Removes all stored hashes used for contact matching, existing matches, and sync status. Requires authentication.

Link copied to clipboard

NOTE: This is under active development and should be considered unstable while this note is here. Removes members from a group. This deletes convo memberships, doesn't just set a status.

Link copied to clipboard

Delete settings by key

Link copied to clipboard

Removes an emoji reaction from a message. Requires authentication. It is idempotent, so multiple calls from the same user with the same emoji result in that reaction not being present, even if it already wasn't.

Link copied to clipboard
open suspend override fun removeRule(request: RemoveRuleRequest): AtpResponse<RemoveRuleResponse>

Remove an existing URL safety rule

Link copied to clipboard
open suspend override fun requestAccountDelete(): AtpResponse<Unit>

Initiate a user account deletion via email.

Link copied to clipboard
open suspend override fun requestCrawl(request: RequestCrawlRequest): AtpResponse<Unit>

Request a service to persistently crawl hosted repos. Expected use is new PDS instances declaring their existence to Relays. Does not require auth.

Link copied to clipboard
open suspend override fun requestEmailConfirmation(): AtpResponse<Unit>

Request an email with a code to confirm ownership of email.

Link copied to clipboard

Request a token in order to update email.

Link copied to clipboard
open suspend override fun requestJoin(request: RequestJoinRequest): AtpResponse<RequestJoinResponse>

NOTE: This is under active development and should be considered unstable while this note is here. Sends a request to join a group (via join link) to the group owner. Action taken by the prospective group member.

Link copied to clipboard

Initiate a user account password reset via email.

Link copied to clipboard

Request a verification code to be sent to the supplied phone number

Link copied to clipboard
open suspend override fun requestPlcOperationSignature(): AtpResponse<Unit>

Request an email with a code to in order to request a signed PLC operation. Requires Auth.

Link copied to clipboard

Reserve a repo signing key, for use with account creation. Necessary so that a DID PLC update operation can be constructed during an account migraiton. Public and does not require auth; implemented by PDS. NOTE: this endpoint may change when full account migration is implemented.

Link copied to clipboard
open suspend override fun resetPassword(request: ResetPasswordRequest): AtpResponse<Unit>

Reset a user account password using a token.

Link copied to clipboard
open suspend override fun resolveDid(params: ResolveDidQueryParams): AtpResponse<ResolveDidResponse>

Resolves DID to DID document. Does not bi-directionally verify handle.

Link copied to clipboard

Resolves an atproto handle (hostname) to a DID. Does not necessarily bi-directionally verify against the the DID document.

Link copied to clipboard

Resolves an identity (DID or Handle) to a full identity (DID document and verified handle).

Link copied to clipboard

Resolves an atproto lexicon (NSID) to a schema.

Link copied to clipboard

Revoke sessions, password, and app passwords associated with account. May be resolved by a password reset.

Link copied to clipboard
open suspend override fun revokeAppPassword(request: RevokeAppPasswordRequest): AtpResponse<Unit>

Revoke an App Password by name.

Link copied to clipboard

Revoke previously granted verifications in batches of up to 100.

Link copied to clipboard

Route reports within an ID range to matching queues based.

Link copied to clipboard

Schedule a moderation action to be executed at a future time

Link copied to clipboard

Get list of accounts that matches your search query.

Search for accounts that match one or more threat signature values.

Link copied to clipboard

Find actors (profiles) matching search criteria. Does not require auth.

Link copied to clipboard

Backend Actors (profile) search, returns only skeleton.

Link copied to clipboard

Find actor suggestions for a prefix search term. Expected use is for auto-completion during text field entry. Does not require auth.

Link copied to clipboard

Find posts matching search criteria, returning views of those posts. Note that this API endpoint may require authentication (eg, not public) for some service providers and implementations.

Link copied to clipboard

Backend Posts search, returns only skeleton

Link copied to clipboard

Find repositories based on a search term.

Link copied to clipboard

Find starter packs matching search criteria. Does not require auth.

Link copied to clipboard

Backend Starter Pack search, returns only skeleton.

Link copied to clipboard
open suspend override fun sendEmail(request: SendEmailRequest): AtpResponse<SendEmailResponse>

Send email to a user's account email address.

Link copied to clipboard

Send information about interactions with feed items back to the feed generator that served them.

Link copied to clipboard
open suspend override fun sendMessage(request: SendMessageRequest): AtpResponse<SendMessageResponse>

Sends a message to a conversation.

Link copied to clipboard

Sends a batch of messages to a conversation.

Link copied to clipboard

System endpoint to send notifications related to contact imports. Requires role authentication.

Link copied to clipboard

Signs a PLC operation to update some value(s) in the requesting DID's document.

Link copied to clipboard

Starts a phone verification flow. The phone passed will receive a code via SMS that should be passed to app.bsky.contact.verifyPhone. Requires authentication.

Link copied to clipboard
open suspend override fun submitPlcOperation(request: SubmitPlcOperationRequest): AtpResponse<Unit>

Validates a PLC operation to ensure that it doesn't violate a service's constraints or get the identity into a bad state, then submits it to the PLC registry

Link copied to clipboard

Subscribe to stream of labels (and negations). Public endpoint implemented by mod services. Uses same sequencing scheme as repo event stream.

Link copied to clipboard

Subscribe to stream of chat events targeted to moderation. Private endpoint.

Link copied to clipboard

Repository event stream, aka Firehose endpoint. Outputs repo commits with diff data, and identity update events, for all repositories on the current server. See the atproto specifications for details around stream sequencing, repo versioning, CAR diff format, and more. Public and does not require auth; implemented by PDS and Relay.

Link copied to clipboard
open suspend override fun unassignModerator(request: UnassignModeratorRequest): AtpResponse<Unit>

Remove a user's assignment from a queue.

Remove report assignment.

Link copied to clipboard
open suspend override fun unlockConvo(request: UnlockConvoRequest): AtpResponse<UnlockConvoResponse>

NOTE: This is under active development and should be considered unstable while this note is here. Unlocks a group convo so it is able to receive new content.

Link copied to clipboard
open suspend override fun unmuteActor(request: UnmuteActorRequest): AtpResponse<Unit>

Unmutes the specified account. Requires auth.

Link copied to clipboard
open suspend override fun unmuteActorList(request: UnmuteActorListRequest): AtpResponse<Unit>

Unmutes the specified list of accounts. Requires auth.

Link copied to clipboard
open suspend override fun unmuteConvo(request: UnmuteConvoRequest): AtpResponse<UnmuteConvoResponse>

Unmutes a conversation, allowing notifications related to it.

Link copied to clipboard
open suspend override fun unmuteThread(request: UnmuteThreadRequest): AtpResponse<Unit>

Unmutes the specified thread. Requires auth.

Link copied to clipboard
open suspend override fun unregisterPush(request: UnregisterPushRequest): AtpResponse<Unit>

The inverse of registerPush - inform a specified service that push notifications should no longer be sent to the given token for the requesting account. Requires auth.

Link copied to clipboard
open suspend override fun updateAccountEmail(request: UpdateAccountEmailRequest): AtpResponse<Unit>

Administrative action to update an account's email.

Link copied to clipboard
open suspend override fun updateAccountHandle(request: UpdateAccountHandleRequest): AtpResponse<Unit>

Administrative action to update an account's handle.

Link copied to clipboard

Update the password for a user account as an administrator.

Link copied to clipboard

Administrative action to update an account's signing key in their Did document.

Link copied to clipboard
open suspend override fun updateActorAccess(request: UpdateActorAccessRequest): AtpResponse<Unit>
Link copied to clipboard

Sets conversations from a user as read to the latest message, with filters.

Link copied to clipboard
open suspend override fun updateDraft(request: UpdateDraftRequest): AtpResponse<Unit>

Updates a draft using private storage (stash). If the draft ID points to a non-existing ID, the update will be silently ignored. This is done because updates don't enforce draft limit, so it accepts all writes, but will ignore invalid ones. Requires authentication.

Link copied to clipboard
open suspend override fun updateEmail(request: UpdateEmailRequest): AtpResponse<Unit>

Update an account's email.

Link copied to clipboard
open suspend override fun updateHandle(request: UpdateHandleRequest): AtpResponse<Unit>

Updates the current account's handle. Verifies handle validity, and updates did:plc document if necessary. Implemented by PDS, and requires auth.

Link copied to clipboard

NOTE: This is under active development and should be considered unstable while this note is here. Marks all join requests as read for the group owner.

Link copied to clipboard

Update a member in the ozone service. Requires admin role.

Link copied to clipboard
open suspend override fun updateQueue(request: UpdateQueueRequest): AtpResponse<UpdateQueueResponse>

Update queue properties. Currently only supports updating the name and enabled status to prevent configuration conflicts.

Link copied to clipboard
open suspend override fun updateRead(request: UpdateReadRequest): AtpResponse<UpdateReadResponse>

Updates the read state of a conversation from, optionally specifying the last read message.

Link copied to clipboard
open suspend override fun updateRule(request: UpdateRuleRequest): AtpResponse<UpdateRuleResponse>

Update an existing URL safety rule

Link copied to clipboard
open suspend override fun updateSeen(request: UpdateSeenRequest): AtpResponse<Unit>

Notify server that the requesting account has seen notifications. Requires auth.

Link copied to clipboard

Update the service-specific admin status of a subject (account, record, or blob).

Link copied to clipboard

Administrative action to update an existing communication template. Allows passing partial fields to patch specific fields only.

Link copied to clipboard
open suspend override fun uploadBlob(request: ByteArray): AtpResponse<UploadBlobResponse>

Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is not referenced within a time window (eg, minutes). Blob restrictions (mimetype, size, etc) are enforced when the reference is created. Requires auth, implemented by PDS.

Link copied to clipboard
open suspend override fun uploadVideo(request: ByteArray): AtpResponse<UploadVideoResponse>

Upload a video to be processed then stored on the PDS.

Link copied to clipboard

Create or update setting option

Link copied to clipboard
open suspend override fun upsertSet(request: UpsertSetRequest): AtpResponse<UpsertSetResponse>

Create or update set metadata

Link copied to clipboard
open suspend override fun verifyPhone(request: VerifyPhoneRequest): AtpResponse<VerifyPhoneResponse>

Verifies control over a phone number with a code received via SMS and starts a contact import session. Requires authentication.

Link copied to clipboard

NOTE: This is under active development and should be considered unstable while this note is here. Withdraws a pending request to join a group. Action taken by the prospective member who originally requested to join.