Skip to content

Collections

Collections group related pastes under a named list, for example “React hooks” or “Deployment scripts.” Collections are available when the Collections feature is enabled in settings.

  • On a member’s profile, under the Collections tab (/pastes/user/{username}/?tab=collections). Each collection links to its own page.
  • On the collection page itself (/pastes/collection/{username}/{slug}/), which lists the pastes inside it.

Each collection has a name, a URL slug, an optional description, and a visibility of public or private. Private collections are visible only to their owner.

Collections are created and managed through the SnipShare REST API:

  • POST /collections — create a collection.
  • POST /collections/{id}/pastes — add a paste to a collection.
  • DELETE /collections/{id}/pastes/{paste_id} — remove a paste from a collection.
  • PUT /collections/{id} / DELETE /collections/{id} — update or delete a collection.

This makes collections well suited to companion apps and custom integrations that manage a member’s snippet library programmatically.

Note: there is currently no built-in front-end button to create a collection or add a paste to one from the paste view; use the REST API for those actions.