Package-level declarations

Objects returned by the Mastodon API.

Types

Link copied to clipboard
@Serializable
data class Account(val accountId: String, val username: String, val acct: String, val url: String, val displayName: String, val bio: String, val avatarUrl: String, val avatarStaticUrl: String, val headerUrl: String, val headerStaticUrl: String, val isLocked: Boolean, val emojis: List<Emoji>, val createdAt: Instant, val lastStatusAt: LocalDate? = null, val statusesCount: Long, val followersCount: Long, val followingCount: Long, val isDiscoverable: Boolean? = null, val movedTo: Account? = null, val isGroup: Boolean, val fields: List<Field>? = null, val isBot: Boolean? = null, val source: Source? = null, val isSuspended: Boolean? = null, val muteExpiresAt: Instant? = null) : Pageable

Represents a user of Mastodon and their associated profile.

Link copied to clipboard
@Serializable
enum AccountRole : Enum<AccountRole>

The different roles that can be attributed to an Account.

Link copied to clipboard
@Serializable
enum ActionType : Enum<ActionType>

Type of moderating action to be taken.

Link copied to clipboard
@Serializable
data class Activity(val week: LocalDate, val statusCount: Long, val loginCount: Long, val registrationCount: Long)

Represents a weekly bucket of instance activity.

Link copied to clipboard
@Serializable
data class AdminAccount(val accountId: String, val username: String, val domain: String, val createdAt: Instant, val email: String, val ip: String, val locale: String, val inviteRequest: String, val role: AccountRole, val isConfirmed: Boolean, val isApproved: Boolean, val isDisabled: Boolean, val isSilenced: Boolean, val isSuspended: Boolean, val account: Account, val createdByApplicationId: String? = null, val invitedByAccountId: String? = null)

Admin-level information about a given account.

Link copied to clipboard
@Serializable
data class AdminReport(val reportId: String, val wasActionTaken: Boolean, val comment: String, val createdAt: Instant, val updatedAt: Instant, val account: AdminAccount, val targetAccount: AdminAccount, val statuses: List<Status>, val assignedAccount: AdminAccount? = null, val actionTakenByAccount: AdminAccount? = null)

Admin-level information about a filed report.

Link copied to clipboard
@Serializable
data class Alerts(val onFollow: Boolean, val onFavourite: Boolean, val onMention: Boolean, val onBoost: Boolean, val onPoll: Boolean)

Used to select which alerts to receive from a PushSubscription.

Link copied to clipboard
@Serializable
data class Announcement(val announcementId: String, val text: String, val isPublished: Boolean, val isAllDay: Boolean, val createdAt: Instant, val updatedAt: Instant, val isRead: Boolean, val reactions: List<AnnouncementReaction>, val scheduledAt: Instant? = null, val startsAt: Instant? = null, val endsAt: Instant? = null)

Represents an announcement set by an administrator.

Link copied to clipboard
@Serializable
data class AnnouncementReaction(val name: String, val count: Long, val me: Boolean, val url: String? = null, val staticUrl: String? = null)

Represents an emoji reaction to an Announcement.

Link copied to clipboard
@Serializable
data class Application(val name: String, val website: String? = null, val vapidKey: String? = null, val clientId: String? = null, val clientSecret: String? = null)

Represents an application that interfaces with the REST API to access accounts or post statuses.

Link copied to clipboard
@Serializable
sealed class Attachment

Represents a file or media attachment that can be added to a status.

Link copied to clipboard
@Serializable
sealed class Card

Represents a rich preview card that is generated using OpenGraph tags from a URL.

Link copied to clipboard
@Serializable
data class Context(val ancestors: List<Status>, val descendants: List<Status>)

Represents the tree around a given status.

Link copied to clipboard
@Serializable
data class Conversation(val conversationId: String, val participants: List<Account>, val isUnread: Boolean, val lastStatus: Status? = null) : Pageable

Represents a conversation with "direct message" visibility.

Link copied to clipboard
@Serializable
enum DirectoryOrder : Enum<DirectoryOrder>
Link copied to clipboard
@Serializable
data class Emoji(val shortCode: String, val url: String, val staticUrl: String, val isVisibleInPicker: Boolean, val category: String? = null)

Represents a custom emoji.

Link copied to clipboard
@Serializable
data class Error(val error: String, val errorDescription: String? = null)

Represents an API error.

Link copied to clipboard
@Serializable
data class FeaturedTag(val tagId: String, val name: String, val statusesCount: Long, val lastStatusAt: LocalDate)

Represents a hashtag that is featured on a profile.

Link copied to clipboard
@Serializable
data class Field(val name: String, val value: String, val verifiedAt: Instant? = null)

Profile metadata name and value.

Link copied to clipboard
@Serializable
data class Filter(val filterId: String, val phrase: String, val context: List<FilterContext>, val isIrreversible: Boolean, val wholeWord: Boolean, val expiresAt: Instant?)

Represents a user-defined filter for determining which statuses should not be shown to the user.

Link copied to clipboard
@Serializable
enum FilterContext : Enum<FilterContext>
Link copied to clipboard
@Serializable
data class FocalPoint(val x: Double, val y: Double)
Link copied to clipboard
@Serializable
enum GrantType : Enum<GrantType>
Link copied to clipboard
@Serializable
data class History(val day: LocalDate, val usageCount: Long, val accountCount: Long)

Represents daily usage history of a hashtag.

Link copied to clipboard
@Serializable
data class IdentityProof(val provider: String, val providerUsername: String, val updatedAt: Instant, val proofUrl: String, val profileUrl: String)

Represents a proof from an external identity provider.

Link copied to clipboard
@Serializable
data class Instance(val uri: String, val title: String, val description: String, val shortDescription: String, val email: String, val version: String, val languages: List<String>, val areRegistrationsEnabled: Boolean, val isApprovalRequired: Boolean, val areInvitesEnabled: Boolean, val urls: InstanceUrls, val stats: InstanceStats, val thumbnail: String? = null, val contactAccount: Account? = null)

Information about the software instance of Mastodon running on this domain.

Link copied to clipboard
@Serializable
data class InstanceStats(val userCount: Long, val statusCount: Long, val domainCount: Long)

Usage statistics about the Mastodon instance.

Link copied to clipboard
@Serializable
data class InstanceUrls(val streamingApiUrl: String)

Related instance URLs.

Link copied to clipboard
@Serializable
enum ListReplyPolicy : Enum<ListReplyPolicy>

Reply policy set on a UserList.

Link copied to clipboard
@Serializable
data class Marker(val home: MarkerProperties, val notifications: MarkerProperties)

Marks the user's current position in their timelines, to synchronize and restore it across devices.

Link copied to clipboard
@Serializable
data class MarkerProperties(val lastReadId: String, val updatedAt: Instant, val version: Long)

Marks the current reading position on a specific timeline.

Link copied to clipboard
@Serializable
enum MediaVisibility : Enum<MediaVisibility>

Preferred media content visibility, i.e. whether media attachments should be automatically displayed or blurred/hidden.

Link copied to clipboard
@Serializable
data class Mention(val accountId: String, val username: String, val acct: String, val url: String)

Represents a mention of a user within the content of a status.

Link copied to clipboard
@Serializable
data class Notification(val notificationId: String, val type: NotificationType, val createdAt: Instant, val account: Account, val status: Status? = null) : Pageable

Represents a notification of an event relevant to the user.

Link copied to clipboard
@Serializable
enum NotificationType : Enum<NotificationType>
Link copied to clipboard
@Serializable
data class Poll(val pollId: String, val isExpired: Boolean, val allowsMultipleChoices: Boolean, val votesCount: Long, val options: List<PollOption>, val emojis: List<Emoji>, val expiresAt: Instant? = null, val votersCount: Long? = null, val hasVoted: Boolean? = null, val ownVotes: List<Int>? = null)

Represents a poll attached to a status.

Link copied to clipboard
@Serializable
data class PollOption(val title: String, val votesCount: Long? = null)

A possible choice of answer in a Poll.

Link copied to clipboard
@Serializable
data class Preferences(val defaultVisibility: StatusVisibility, val defaultSensitivity: Boolean, val defaultLanguage: String, val defaultMediaVisibility: MediaVisibility, val defaultExpandContentWarnings: Boolean)
Link copied to clipboard
@Serializable
data class PushSubscription(val subscriptionId: String, val endpoint: String, val serverKey: String, val alerts: Alerts)

Represents a subscription to the push streaming server.

Link copied to clipboard
@Serializable
data class Relationship(val accountId: String, val isFollowing: Boolean, val hasPendingFollowRequest: Boolean, val isFeatured: Boolean, val isFollowedBy: Boolean, val isMuting: Boolean, val isMutingNotifications: Boolean, val isShowingBoosts: Boolean, val isNotifying: Boolean, val isBlocking: Boolean, val isDomainBlocking: Boolean, val isBlockedBy: Boolean, val note: String)

Represents the relationship between accounts.

Link copied to clipboard
@Serializable
data class Report(val reportId: String, val wasActionTaken: Boolean)

Reports filed against users and/or statuses, to be taken action on by moderators.

Link copied to clipboard
@Serializable
data class Results(val accounts: List<Account>, val statuses: List<Status>, val hashtags: List<Tag>)

Represents the results of a search.

Link copied to clipboard
@Serializable
data class ScheduledStatus(val statusId: String, val scheduledAt: Instant, val params: ScheduledStatusParams, val mediaAttachments: List<Attachment>) : Pageable

Represents a status that will be published at a future scheduled date.

Link copied to clipboard
@Serializable
data class ScheduledStatusParams(val plainText: String, val visibility: StatusVisibility, val applicationId: String, val inReplyToId: String? = null, val mediaIds: List<String>? = null, val isSensitive: Boolean? = null, val contentWarningText: String? = null, val scheduledAt: Instant? = null)

Parameters for a ScheduledStatus.

Link copied to clipboard
@Serializable
enum SearchType : Enum<SearchType>
Link copied to clipboard
@Serializable
data class Source(val bio: String, val fields: List<Field>, val defaultPrivacy: StatusVisibility? = null, val defaultSensitivity: Boolean? = null, val defaultLanguage: String? = null, val followRequestsCount: Long? = null)

Represents display or publishing preferences of the Account.

Link copied to clipboard
@Serializable
data class Status(val statusId: String, val uri: String, val createdAt: Instant, val account: Account, val content: String, val visibility: StatusVisibility, val isSensitive: Boolean, val contentWarningText: String, val mediaAttachments: List<Attachment>, val mentions: List<Mention>, val tags: List<Tag>, val emojis: List<Emoji>, val boostsCount: Long, val favouritesCount: Long, val repliesCount: Long, val application: Application? = null, val url: String? = null, val inReplyToId: String? = null, val inReplyToAccountId: String? = null, val boostedStatus: Status? = null, val poll: Poll? = null, val card: Card? = null, val language: String? = null, val plainText: String? = null, val isFavourited: Boolean? = null, val isBoosted: Boolean? = null, val isMuted: Boolean? = null, val isBookmarked: Boolean? = null, val isPinned: Boolean? = null) : Pageable

Represents a status posted by an account.

Link copied to clipboard
@Serializable
enum StatusVisibility : Enum<StatusVisibility>

Visibility of a Status to other users.

Link copied to clipboard
@Serializable
data class Tag(val name: String, val url: String, val history: List<History>? = null) : Pageable

Represents a hashtag used within the content of a status.

Link copied to clipboard
@Serializable
data class Token(val accessToken: String, val tokenType: String, val scope: String, val createdAt: Instant)

Represents an OAuth token used for authenticating with the API and performing actions.

Link copied to clipboard
@Serializable
data class UserList(val listId: String, val title: String, val replyPolicy: ListReplyPolicy)

Represents a list of some users that the authenticated user follows.