Mastodon
  • What is Mastodon?
  • Using Mastodon
    • Signing up for an account
    • Setting up your profile
    • Posting to your profile
    • Using the network features
    • Quoting other posts
    • Dealing with unwanted content
    • Promoting yourself and others
    • Set your preferences
    • More settings
    • Using Mastodon externally
    • Moving or leaving accounts
    • Official iOS and Android apps
    • Running your own server
  • Running Mastodon
    • Preparing your machine
    • Installing from source
    • Configuring your environment
    • Configuring full-text search
    • Installing optional features
      • Object storage
      • Onion services
      • Captcha
      • Single Sign On
    • Setting up your new instance
    • Using the admin CLI
    • Upgrading to a new release
    • Backing up your server
    • Migrating to a new machine
    • Scaling up your server
    • Moderation actions
    • Troubleshooting errors
      • Database index corruption
    • Webhooks
    • Roles
  • Developing Mastodon apps
    • Getting started with the API
    • Playing with public data
    • Obtaining client app access
    • Logging in with an account
    • Libraries and implementations
    • Implementing quote posts
  • Contributing to Mastodon
    • Technical overview
    • Setting up a dev environment
    • Code structure
    • Routes
    • Security issues and responsible disclosure
  • Spec compliance
    • ActivityPub
    • WebFinger
    • Security
    • Microformats
    • OAuth
    • Bearcaps
  • REST API
    • Datetime formats
    • Guidelines and best practices
    • OAuth Tokens
    • OAuth Scopes
    • Rate limits
  • API Methods
    • accounts
      • blocks
      • bookmarks
      • domain_blocks
      • endorsements
      • favourites
      • featured_tags
      • filters
      • follow_requests
      • followed_tags
      • mutes
      • preferences
      • reports
      • suggestions
      • tags
    • admin
      • accounts
      • canonical_email_blocks
      • dimensions
      • domain_allows
      • domain_blocks
      • email_domain_blocks
      • ip_blocks
      • measures
      • reports
      • retention
      • trends
    • apps
      • emails
      • oauth
    • async_refreshes
    • grouped notifications
    • health
    • instance
      • announcements
      • custom_emojis
      • directory
      • trends
    • notifications
      • push
    • oembed
    • profile
    • proofs
    • search
    • statuses
      • media
      • polls
      • scheduled_statuses
    • timelines
      • conversations
      • lists
      • markers
      • streaming
  • API Entities
    • Account
    • AccountWarning
    • Admin::Account
    • Admin::CanonicalEmailBlock
    • Admin::Cohort
    • Admin::Dimension
    • Admin::DomainAllow
    • Admin::DomainBlock
    • Admin::EmailDomainBlock
    • Admin::Ip
    • Admin::IpBlock
    • Admin::Measure
    • Admin::Report
    • Announcement
    • Appeal
    • Application
    • AsyncRefresh
    • Collection
    • CollectionItem
    • CollectionsWithAccountPreviews
    • CollectionWithAccounts
    • Context
    • Conversation
    • CustomEmoji
    • DomainBlock
    • Error
    • ExtendedDescription
    • FamiliarFollowers
    • FeaturedTag
    • Filter
    • FilterKeyword
    • FilterResult
    • FilterStatus
    • IdentityProof
    • Instance
    • List
    • Marker
    • MediaAttachment
    • Notification
    • NotificationPolicy
    • NotificationRequest
    • Poll
    • Preferences
    • PreviewCard
    • PreviewCardAuthor
    • PrivacyPolicy
    • Profile
    • Quote
    • QuoteApproval
    • Reaction
    • Relationship
    • RelationshipSeveranceEvent
    • Report
    • Role
    • Rule
    • ScheduledStatus
    • Search
    • ShallowQuote
    • ShallowTag
    • Status
    • StatusEdit
    • StatusSource
    • Suggestion
    • Tag
    • TermsOfService
    • Token
    • Translation
    • V1::Filter
    • V1::Instance
    • V1::NotificationPolicy
    • WebPushSubscription

Collection

Represents a curated collection of accounts that a user recommends others to follow.

    • Example
    • Attributes
      • id
      • account_id
      • uri
      • url
      • name
      • description
      • language
      • local
      • sensitive
      • discoverable
      • tag
      • created_at
      • updated_at
      • item_count
      • items
    • WrappedCollection entity
      • Example
      • collection
    • See also

Example

{
  "id": "116131056935959117",
  "account_id": "113668893442515793",
  "uri": "https://example.com/ap/113668893442515793/collections/116131056935959117",
  "url": "https://example.com/collections/116131056935959117",
  "name": "Excellent people",
  "description": "Well worth following",
  "language": "en",
  "local": true,
  "sensitive": false,
  "discoverable": true,
  "tag": {
    "name": "discovery",
    "url": "https://example.com/tags/discovery"
  },
  "item_count": 2,
  "items": [
    {
      "id": "116141056635954112",
      "account_id": "112658193342215767",
      "state": "accepted",
      "created_at": "2026-02-25T11:35:01.394Z"
    },
    {
      "id": "116141051635254139",
      "account_id": "117628196343117789",
      "state": "pending",
      "created_at": "2026-02-25T11:35:01.394Z"
    }
  ],
  "created_at": "2026-02-25T11:35:01.394Z",
  "updated_at": "2026-02-25T11:37:38.182Z"
}

Attributes

id

Description: The collection id.
Type: String (cast from an integer, but not guaranteed to be a number)
Version history:
4.6.0 - added

account_id

Description: The id of the account that curates this Collection.
Type: String (cast from an integer, but not guaranteed to be a number)
Version history:
4.6.0 - added

uri

Description: The Collection’s ActivityPub identifier (used for federation).
Type: String (URL)
Version history:
4.6.0 - added

url

Description: The url of the Collection’s HTML page (web interface URL).
Type: nullable String (URL)
Version history:
4.6.0 - added

name

Description: The name of the Collection.
Type: String
Version history:
4.6.0 - added

description

Description: An optional description of the Collection.
Type: String (HTML)
Version history:
4.6.0 - added

language

Description: Primary language of this Collection.
Type: nullable String (ISO 639-1 two-letter language code) or null
Version history:
4.6.0 - added

local

Description: Whether the Collection was created on this server or resides on a remote server.
Type: Boolean
Version history:
4.6.0 - added

sensitive

Description: Whether the Collection has been marked as including sensitive content.
Type: Boolean
Version history:
4.6.0 - added

discoverable

Description: Whether the Collection should show up in search results and recommendations.
Type: Boolean
Version history:
4.6.0 - added

tag

Description: A single hashtag that describes this Collection.
Type: nullable ShallowTag
Version history:
4.6.0 - added

created_at

Description: When the Collection was created.
Type: String (Datetime)
Version history:
4.6.0 - added

updated_at

Description: When the Collection was last updated.
Type: String (Datetime)
Version history:
4.6.0 - added

item_count

Description: The number of items in this Collection.
Type: Integer
Version history:
4.6.0 - added

items

Description: The items in this Collection.
Type: Array of CollectionItem
Version history:
4.6.0 - added

WrappedCollection entity

This is a regular Collection in a wrapper object to make it consistent with CollectionWithAccounts and other parts of the API.

Example

{
  "collection": {
    "id": "116131056935959117",
    "account_id": "113668893442515793",
    "uri": "https://example.com/ap/113668893442515793/collections/116131056935959117",
    "url": "https://example.com/collections/116131056935959117",
    "name": "Excellent people",
    // ...
  }
}

collection

Description: The actual Collection.
Type: Collection
Version history:
4.6.0 - added

See also

app/serializers/rest/collection_serializer.rb

Last updated May 12, 2026 · Improve this page

Sponsored by

Dotcom-Monitor LoadView Stephen Tures Swayable SponsorMotion

Join Mastodon · Blog ·

View source · CC BY-SA 4.0 · Imprint