Stashr Collections API

Saved filter rules

GitHub OpenAPI

Operations 4

GET /v1/collections List collections #
POST /v1/collections Create a collection #
DELETE /v1/collections/{collectionId} Delete a collection #
PATCH /v1/collections/{collectionId} Update a collection #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/stashr-me:stashr-me-collections-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

stashr-me-collections-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: support@stashr.me
    name: Stashr support
    url: https://stashr.me/contact
  description: 'Agent- and CLI-focused access to a user''s Stashr library: search by meaning, read saves in full, save URLs, and manage tags, notes, favorites, and collections. Authenticate with a scoped stashr_ API key (Settings → API keys) or an OAuth token audience-bound to /v1. GET /v1 needs no credential and describes the API. Every response carries X-Request-Id and RateLimit headers (240 requests per minute per account; see RateLimit-Policy). Versioning: the major version is in the path (/v1). Backwards-compatible additions (new fields, endpoints, enum values, filters) ship without a version bump; breaking changes get a new major version, and the old one keeps working for at least 6 months after the replacement ships and is announced with Deprecation and Sunset headers plus a Link rel="deprecation" on the affected endpoints. Deprecation policy: https://stashr.me/docs/api-versioning'
  termsOfService: https://stashr.me/terms
  title: Stashr Collections API
  version: 1.0.0
servers:
- description: Production
  url: https://stashr.me
security:
- bearerAuth: []
tags:
- description: Saved filter rules
  name: Collections
paths:
  /v1/collections:
    get:
      description: Return every collection (saved filter rules), unpaginated, sorted pinned-first and then by manual position.
      operationId: listCollections
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    items:
                      $ref: '#/components/schemas/Collection'
                    type: array
                required:
                - data
                type: object
          description: All collections
          headers:
            RateLimit-Policy:
              description: The limiter policy, e.g. "per-minute";q=240;w=60 (quota q per window of w seconds)
              schema:
                type: string
            RateLimit:
              description: Live window state, e.g. "per-minute";r=239;t=58 (r requests remaining, t seconds until reset)
              schema:
                type: string
            RateLimit-Limit:
              schema:
                type: integer
            RateLimit-Remaining:
              schema:
                type: integer
            RateLimit-Reset:
              description: Seconds until the window resets (delta, not epoch)
              schema:
                type: integer
            X-Request-Id:
              description: Echoes the request's X-Request-Id, or a generated id
              schema:
                type: string
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Malformed request (error.code bad_request or invalid_json)
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Missing, invalid, or expired credentials (error.code unauthorized)
        '402':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: A Pro plan or active trial is required (error.code payment_required)
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: The credential lacks the required scope (error.code forbidden)
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: The resource does not exist or belongs to another account (error.code not_found)
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Validation failed; error.details.issues lists the fields (error.code validation_error)
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Too many requests (error.code rate_limited); wait Retry-After seconds, also given as error.retryAfterMs
          headers:
            Retry-After:
              description: Seconds to wait before retrying
              schema:
                type: integer
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Something failed on Stashr's side (error.code internal_error); retryable
      summary: List collections
      tags:
      - Collections
    post:
      description: 'Create a collection: a named, live filter rule over the library. Invalid color or icon ids fail with a 422 listing the allowed values. Requires the write scope.'
      operationId: createCollection
      requestBody:
        content:
          application/json:
            schema:
              properties:
                color:
                  description: A collection color id from the app (defaults to blue)
                  type: string
                filters:
                  allOf:
                  - $ref: '#/components/schemas/BookmarkFilters'
                  description: Live filter rules in the shared vocabulary (no q, untagged, or capture-date bounds)
                icon:
                  description: A collection icon id from the app
                  type: string
                name:
                  maxLength: 50
                  minLength: 1
                  type: string
              required:
              - name
              type: object
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/Collection'
                required:
                - data
                type: object
          description: Collection created
          headers:
            RateLimit-Policy:
              description: The limiter policy, e.g. "per-minute";q=240;w=60 (quota q per window of w seconds)
              schema:
                type: string
            RateLimit:
              description: Live window state, e.g. "per-minute";r=239;t=58 (r requests remaining, t seconds until reset)
              schema:
                type: string
            RateLimit-Limit:
              schema:
                type: integer
            RateLimit-Remaining:
              schema:
                type: integer
            RateLimit-Reset:
              description: Seconds until the window resets (delta, not epoch)
              schema:
                type: integer
            X-Request-Id:
              description: Echoes the request's X-Request-Id, or a generated id
              schema:
                type: string
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Malformed request (error.code bad_request or invalid_json)
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Missing, invalid, or expired credentials (error.code unauthorized)
        '402':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: A Pro plan or active trial is required (error.code payment_required)
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: The credential lacks the required scope (error.code forbidden)
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: The resource does not exist or belongs to another account (error.code not_found)
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Validation failed; error.details.issues lists the fields (error.code validation_error)
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Too many requests (error.code rate_limited); wait Retry-After seconds, also given as error.retryAfterMs
          headers:
            Retry-After:
              description: Seconds to wait before retrying
              schema:
                type: integer
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Something failed on Stashr's side (error.code internal_error); retryable
      summary: Create a collection
      tags:
      - Collections
  /v1/collections/{collectionId}:
    delete:
      description: Delete a collection. Requires the destructive scope and the literal query parameter confirm=true; without it the request fails with 400 instead of deleting. Removes the collection, never its bookmarks.
      operationId: deleteCollection
      parameters:
      - description: Collection id (uuid)
        in: path
        name: collectionId
        required: true
        schema:
          format: uuid
          type: string
      - description: Must be the literal string true
        in: query
        name: confirm
        required: true
        schema:
          enum:
          - 'true'
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      id:
                        format: uuid
                        type: string
                    required:
                    - id
                    type: object
                required:
                - data
                type: object
          description: The deleted collection's id
          headers:
            RateLimit-Policy:
              description: The limiter policy, e.g. "per-minute";q=240;w=60 (quota q per window of w seconds)
              schema:
                type: string
            RateLimit:
              description: Live window state, e.g. "per-minute";r=239;t=58 (r requests remaining, t seconds until reset)
              schema:
                type: string
            RateLimit-Limit:
              schema:
                type: integer
            RateLimit-Remaining:
              schema:
                type: integer
            RateLimit-Reset:
              description: Seconds until the window resets (delta, not epoch)
              schema:
                type: integer
            X-Request-Id:
              description: Echoes the request's X-Request-Id, or a generated id
              schema:
                type: string
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Malformed request (error.code bad_request or invalid_json)
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Missing, invalid, or expired credentials (error.code unauthorized)
        '402':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: A Pro plan or active trial is required (error.code payment_required)
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: The credential lacks the required scope (error.code forbidden)
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: The resource does not exist or belongs to another account (error.code not_found)
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Validation failed; error.details.issues lists the fields (error.code validation_error)
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Too many requests (error.code rate_limited); wait Retry-After seconds, also given as error.retryAfterMs
          headers:
            Retry-After:
              description: Seconds to wait before retrying
              schema:
                type: integer
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Something failed on Stashr's side (error.code internal_error); retryable
      summary: Delete a collection
      tags:
      - Collections
    patch:
      description: Update any subset of a collection's name, color, icon, filters, and pinned state; send at least one field. pinned=true pins it to the top of the sidebar. Requires the write scope.
      operationId: updateCollection
      parameters:
      - description: Collection id (uuid)
        in: path
        name: collectionId
        required: true
        schema:
          format: uuid
          type: string
      requestBody:
        content:
          application/json:
            schema:
              minProperties: 1
              properties:
                color:
                  description: A collection color id from the app (defaults to blue)
                  type: string
                filters:
                  allOf:
                  - $ref: '#/components/schemas/BookmarkFilters'
                  description: Live filter rules in the shared vocabulary (no q, untagged, or capture-date bounds)
                icon:
                  description: A collection icon id from the app
                  type: string
                name:
                  maxLength: 50
                  minLength: 1
                  type: string
                pinned:
                  type: boolean
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/Collection'
                required:
                - data
                type: object
          description: The updated collection
          headers:
            RateLimit-Policy:
              description: The limiter policy, e.g. "per-minute";q=240;w=60 (quota q per window of w seconds)
              schema:
                type: string
            RateLimit:
              description: Live window state, e.g. "per-minute";r=239;t=58 (r requests remaining, t seconds until reset)
              schema:
                type: string
            RateLimit-Limit:
              schema:
                type: integer
            RateLimit-Remaining:
              schema:
                type: integer
            RateLimit-Reset:
              description: Seconds until the window resets (delta, not epoch)
              schema:
                type: integer
            X-Request-Id:
              description: Echoes the request's X-Request-Id, or a generated id
              schema:
                type: string
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Malformed request (error.code bad_request or invalid_json)
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Missing, invalid, or expired credentials (error.code unauthorized)
        '402':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: A Pro plan or active trial is required (error.code payment_required)
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: The credential lacks the required scope (error.code forbidden)
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: The resource does not exist or belongs to another account (error.code not_found)
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Validation failed; error.details.issues lists the fields (error.code validation_error)
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Too many requests (error.code rate_limited); wait Retry-After seconds, also given as error.retryAfterMs
          headers:
            Retry-After:
              description: Seconds to wait before retrying
              schema:
                type: integer
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Something failed on Stashr's side (error.code internal_error); retryable
      summary: Update a collection
      tags:
      - Collections
components:
  schemas:
    Collection:
      properties:
        color:
          type: string
        filters:
          additionalProperties: true
          type: object
        icon:
          type: string
        id:
          format: uuid
          type: string
        name:
          type: string
        pinned:
          type: boolean
        position:
          type: integer
      required:
      - id
      - name
      - filters
      - color
      - icon
      type: object
    BookmarkFilters:
      properties:
        authorMode:
          default: include
          enum:
          - include
          - exclude
          type: string
        authors:
          items:
            description: An author username ("naval"), optionally platform-scoped ("twitter:naval")
            type: string
          type: array
        capturedAfter:
          description: Only bookmarks saved on/after this ISO-8601 date or datetime (inclusive)
          type: string
        capturedBefore:
          description: Only bookmarks saved before this ISO-8601 date or datetime (exclusive)
          type: string
        capturedWithin:
          description: Only bookmarks saved in the last N days, as "<N>d" (1d–3650d), counted in UTC days including today. "7d" = today and the 6 days before
          pattern: ^[1-9][0-9]{0,3}d$
          type: string
        contentTypeMode:
          default: include
          enum:
          - include
          - exclude
          type: string
        contentTypes:
          items:
            description: 'A content type ("article"), optionally platform-scoped ("twitter:article"). Valid types: repo, image, post, video, comment, article, page, snippet, event, link, listing'
            type: string
          type: array
        excludeTags:
          items:
            description: A tag name the bookmark must not have (ANDed with tags/tagMode). "__untagged__" excludes untagged bookmarks
            type: string
          type: array
        favorite:
          items:
            enum:
            - favorite
            - not-favorite
            type: string
          type: array
        media:
          items:
            enum:
            - image
            - video
            - any-media
            - text-only
            type: string
          type: array
        mediaMode:
          default: include
          enum:
          - include
          - exclude
          type: string
        note:
          items:
            enum:
            - has-note
            - no-note
            type: string
          type: array
        platformMode:
          default: include
          enum:
          - include
          - exclude
          type: string
        platforms:
          items:
            description: Platform id. X/Twitter is "twitter".
            enum:
            - github
            - instagram
            - reddit
            - linkedin
            - tiktok
            - twitter
            - web
            - youtube
            - facebook
            - hackernews
            type: string
          type: array
        postedAfter:
          description: Only bookmarks originally posted on/after this ISO-8601 date or datetime (inclusive). Bookmarks without a known post date are excluded
          type: string
        postedBefore:
          description: Only bookmarks originally posted before this ISO-8601 date or datetime (exclusive). Bookmarks without a known post date are excluded
          type: string
        postedWithin:
          description: Only bookmarks originally posted in the last N days, as "<N>d" (1d–3650d), counted in UTC days including today. Bookmarks without a known post date are excluded
          pattern: ^[1-9][0-9]{0,3}d$
          type: string
        tagMode:
          default: include_any
          enum:
          - include_any
          - include_all
          - exclude_any
          - exclude_all
          type: string
        tags:
          items:
            description: A tag name from /v1/tags
            type: string
          type: array
      type: object
    ErrorEnvelope:
      description: The one error shape every 4xx and 5xx response uses. Branch on error.code, show error.message to humans, and retry only when error.retryable is true.
      properties:
        error:
          properties:
            code:
              description: Stable machine-readable code
              enum:
              - bad_request
              - forbidden
              - internal_error
              - invalid_json
              - not_found
              - payment_required
              - rate_limited
              - unauthorized
              - validation_error
              type: string
            details:
              description: 'Code-specific context: validation issues, allowed values, or resolution hints'
            message:
              description: Human-readable explanation
              type: string
            retryAfterMs:
              description: 'Present on 429: how long to wait before retrying, matching the Retry-After header'
              type: integer
            retryable:
              description: True for rate limits and server errors, false for anything the caller must change
              type: boolean
          required:
          - code
          - message
          - retryable
          type: object
        requestId:
          description: Correlates with the X-Request-Id header
          type: string
      required:
      - error
      - requestId
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: Stashr OAuth access token or API key
      description: Use an OAuth access token audience-bound to /v1, or a scoped stashr_ API key for non-interactive clients.
      scheme: bearer
      type: http
externalDocs:
  description: Stashr API reference (human docs; add .md for Markdown)
  url: https://stashr.me/docs/api
x-deprecation-policy:
  breakingChanges: Shipped as a new major version (/v2) alongside the old one, never in place
  deprecationSignals:
  - Deprecation header (RFC 9745) with the date it took effect
  - Sunset header (RFC 8594) with the date it stops working
  - 'Link: <migration notes>; rel="deprecation"'
  minimumNoticeMonths: 6
  url: https://stashr.me/docs/api-versioning
  versioning: URL path (/v1)