Skip to content
MediuxDocs

Subscribe to or leave a Public List

PUT/account/lists/{id}/subscription

Subscribes the user to another User's Public List, or ends the subscription.

changed is false when the user was already in the requested state. A user can't subscribe to their own Public List (409 list.subscriptionInvalid); a private or unknown List is 404 list.notFound. A user can follow 500 Lists (409 list.limit.subscriptions). Subscriber counts on the public routes refresh hourly.

Authorization

OAuth 2 bearer token in the Authorization header. Required scope: lists:write

Path parameters

  • id string required

    The List's ID (a lowercase UUID). A List the user neither owns nor subscribes to, or a malformed ID, is 404 list.notFound.

    pattern

Request body required

true to subscribe, false to leave.

Content type:application/json

  • subscribed boolean required

Responses

200 The subscription now in place.

Headers

  • Cache-Control string

    Browser caching policy.

    "private, no-store"
  • data object
    Show child attributes
    • subscribed boolean
    • changed boolean
    • subscriberCount integer
      min 0
400 The request is malformed or failed validation. Inspect error.code and error.issues.

Headers

  • Cache-Control string

    Browser caching policy.

    "private, no-store"
  • data any | null

    Always null on an error.

  • error object

    Why the request failed.

    Show child attributes
    • code string

      Stable dotted camelCase code such as resource.gone. Branch on this, not on message.

    • message string

      Short explanation for people. Wording can change.

      min length 1max length 256
    • requestId string

      The Cloudflare ray ID. Absent on Snippet and WAF errors and on cached 404, 410 and 503 responses, which carry it only in cf-ray.

      min length 1
    • docs string (uri)

      Link to this code's entry in the error catalogue.

    • details map of string | number | boolean | array of string | null

      Constraints that apply to the failure, such as byte limits, dimensions or allowed types.

    • issues array of object

      Per-field validation failures, when any.

      max 50 items
      Show item attributes
      • code string

        Stable code for this field failure. Branch on this.

        min length 1
      • message string

        Short human-readable description of this field failure.

        min length 1
      • path array of string

        Path to the failing field, for example ["items", 2, "slot"].

      • details map of string | number | boolean | array of string | null

        Constraints that apply to the failure, such as byte limits, dimensions or allowed types.

401 The access token is missing (auth.required), or invalid, expired or revoked (auth.invalidToken).

Headers

  • Cache-Control string

    Browser caching policy.

    "private, no-store"
  • WWW-Authenticate string

    RFC 6750 challenge: Bearer realm="mediux", plus error="invalid_token" for a bad or expired token.

  • data any | null

    Always null on an error.

  • error object

    Why the request failed.

    Show child attributes
    • code string

      Stable dotted camelCase code such as resource.gone. Branch on this, not on message.

    • message string

      Short explanation for people. Wording can change.

      min length 1max length 256
    • requestId string

      The Cloudflare ray ID. Absent on Snippet and WAF errors and on cached 404, 410 and 503 responses, which carry it only in cf-ray.

      min length 1
    • docs string (uri)

      Link to this code's entry in the error catalogue.

    • details map of string | number | boolean | array of string | null

      Constraints that apply to the failure, such as byte limits, dimensions or allowed types.

    • issues array of object

      Per-field validation failures, when any.

      max 50 items
      Show item attributes
      • code string

        Stable code for this field failure. Branch on this.

        min length 1
      • message string

        Short human-readable description of this field failure.

        min length 1
      • path array of string

        Path to the failing field, for example ["items", 2, "slot"].

      • details map of string | number | boolean | array of string | null

        Constraints that apply to the failure, such as byte limits, dimensions or allowed types.

403 The token lacks the required App Permission (auth.insufficientScope, with details.required), or the account or connection may not do this (auth.forbidden).

Headers

  • Cache-Control string

    Browser caching policy.

    "private, no-store"
  • data any | null

    Always null on an error.

  • error object

    Why the request failed.

    Show child attributes
    • code string

      Stable dotted camelCase code such as resource.gone. Branch on this, not on message.

    • message string

      Short explanation for people. Wording can change.

      min length 1max length 256
    • requestId string

      The Cloudflare ray ID. Absent on Snippet and WAF errors and on cached 404, 410 and 503 responses, which carry it only in cf-ray.

      min length 1
    • docs string (uri)

      Link to this code's entry in the error catalogue.

    • details map of string | number | boolean | array of string | null

      Constraints that apply to the failure, such as byte limits, dimensions or allowed types.

    • issues array of object

      Per-field validation failures, when any.

      max 50 items
      Show item attributes
      • code string

        Stable code for this field failure. Branch on this.

        min length 1
      • message string

        Short human-readable description of this field failure.

        min length 1
      • path array of string

        Path to the failing field, for example ["items", 2, "slot"].

      • details map of string | number | boolean | array of string | null

        Constraints that apply to the failure, such as byte limits, dimensions or allowed types.

404 The resource does not exist or is not the user's.

Headers

  • Cache-Control string

    Browser caching policy.

    "private, no-store"
  • data any | null

    Always null on an error.

  • error object

    Why the request failed.

    Show child attributes
    • code string

      Stable dotted camelCase code such as resource.gone. Branch on this, not on message.

    • message string

      Short explanation for people. Wording can change.

      min length 1max length 256
    • requestId string

      The Cloudflare ray ID. Absent on Snippet and WAF errors and on cached 404, 410 and 503 responses, which carry it only in cf-ray.

      min length 1
    • docs string (uri)

      Link to this code's entry in the error catalogue.

    • details map of string | number | boolean | array of string | null

      Constraints that apply to the failure, such as byte limits, dimensions or allowed types.

    • issues array of object

      Per-field validation failures, when any.

      max 50 items
      Show item attributes
      • code string

        Stable code for this field failure. Branch on this.

        min length 1
      • message string

        Short human-readable description of this field failure.

        min length 1
      • path array of string

        Path to the failing field, for example ["items", 2, "slot"].

      • details map of string | number | boolean | array of string | null

        Constraints that apply to the failure, such as byte limits, dimensions or allowed types.

409 The request conflicts with current state or a limit. Inspect error.code and error.details.

Headers

  • Cache-Control string

    Browser caching policy.

    "private, no-store"
  • data any | null

    Always null on an error.

  • error object

    Why the request failed.

    Show child attributes
    • code string

      Stable dotted camelCase code such as resource.gone. Branch on this, not on message.

    • message string

      Short explanation for people. Wording can change.

      min length 1max length 256
    • requestId string

      The Cloudflare ray ID. Absent on Snippet and WAF errors and on cached 404, 410 and 503 responses, which carry it only in cf-ray.

      min length 1
    • docs string (uri)

      Link to this code's entry in the error catalogue.

    • details map of string | number | boolean | array of string | null

      Constraints that apply to the failure, such as byte limits, dimensions or allowed types.

    • issues array of object

      Per-field validation failures, when any.

      max 50 items
      Show item attributes
      • code string

        Stable code for this field failure. Branch on this.

        min length 1
      • message string

        Short human-readable description of this field failure.

        min length 1
      • path array of string

        Path to the failing field, for example ["items", 2, "slot"].

      • details map of string | number | boolean | array of string | null

        Constraints that apply to the failure, such as byte limits, dimensions or allowed types.

413 The body exceeds the allowed size.

Headers

  • Cache-Control string

    Browser caching policy.

    "private, no-store"
  • data any | null

    Always null on an error.

  • error object

    Why the request failed.

    Show child attributes
    • code string

      Stable dotted camelCase code such as resource.gone. Branch on this, not on message.

    • message string

      Short explanation for people. Wording can change.

      min length 1max length 256
    • requestId string

      The Cloudflare ray ID. Absent on Snippet and WAF errors and on cached 404, 410 and 503 responses, which carry it only in cf-ray.

      min length 1
    • docs string (uri)

      Link to this code's entry in the error catalogue.

    • details map of string | number | boolean | array of string | null

      Constraints that apply to the failure, such as byte limits, dimensions or allowed types.

    • issues array of object

      Per-field validation failures, when any.

      max 50 items
      Show item attributes
      • code string

        Stable code for this field failure. Branch on this.

        min length 1
      • message string

        Short human-readable description of this field failure.

        min length 1
      • path array of string

        Path to the failing field, for example ["items", 2, "slot"].

      • details map of string | number | boolean | array of string | null

        Constraints that apply to the failure, such as byte limits, dimensions or allowed types.

415 The Content-Type is not application/json.

Headers

  • Cache-Control string

    Browser caching policy.

    "private, no-store"
  • data any | null

    Always null on an error.

  • error object

    Why the request failed.

    Show child attributes
    • code string

      Stable dotted camelCase code such as resource.gone. Branch on this, not on message.

    • message string

      Short explanation for people. Wording can change.

      min length 1max length 256
    • requestId string

      The Cloudflare ray ID. Absent on Snippet and WAF errors and on cached 404, 410 and 503 responses, which carry it only in cf-ray.

      min length 1
    • docs string (uri)

      Link to this code's entry in the error catalogue.

    • details map of string | number | boolean | array of string | null

      Constraints that apply to the failure, such as byte limits, dimensions or allowed types.

    • issues array of object

      Per-field validation failures, when any.

      max 50 items
      Show item attributes
      • code string

        Stable code for this field failure. Branch on this.

        min length 1
      • message string

        Short human-readable description of this field failure.

        min length 1
      • path array of string

        Path to the failing field, for example ["items", 2, "slot"].

      • details map of string | number | boolean | array of string | null

        Constraints that apply to the failure, such as byte limits, dimensions or allowed types.

429 Too many requests. Wait the Retry-After seconds before trying again.

Headers

  • Cache-Control string

    Browser caching policy.

    "private, no-store"
  • Retry-After string

    Seconds to wait before trying again.

    pattern ^\d+$
  • data any | null

    Always null on an error.

  • error object

    Why the request failed.

    Show child attributes
    • code string

      Stable dotted camelCase code such as resource.gone. Branch on this, not on message.

    • message string

      Short explanation for people. Wording can change.

      min length 1max length 256
    • requestId string

      The Cloudflare ray ID. Absent on Snippet and WAF errors and on cached 404, 410 and 503 responses, which carry it only in cf-ray.

      min length 1
    • docs string (uri)

      Link to this code's entry in the error catalogue.

    • details map of string | number | boolean | array of string | null

      Constraints that apply to the failure, such as byte limits, dimensions or allowed types.

    • issues array of object

      Per-field validation failures, when any.

      max 50 items
      Show item attributes
      • code string

        Stable code for this field failure. Branch on this.

        min length 1
      • message string

        Short human-readable description of this field failure.

        min length 1
      • path array of string

        Path to the failing field, for example ["items", 2, "slot"].

      • details map of string | number | boolean | array of string | null

        Constraints that apply to the failure, such as byte limits, dimensions or allowed types.

503 Temporarily unavailable. Check the outcome before retrying a write.

Headers

  • Cache-Control string

    Browser caching policy.

    "private, no-store"
  • data any | null

    Always null on an error.

  • error object

    Why the request failed.

    Show child attributes
    • code string

      Stable dotted camelCase code such as resource.gone. Branch on this, not on message.

    • message string

      Short explanation for people. Wording can change.

      min length 1max length 256
    • requestId string

      The Cloudflare ray ID. Absent on Snippet and WAF errors and on cached 404, 410 and 503 responses, which carry it only in cf-ray.

      min length 1
    • docs string (uri)

      Link to this code's entry in the error catalogue.

    • details map of string | number | boolean | array of string | null

      Constraints that apply to the failure, such as byte limits, dimensions or allowed types.

    • issues array of object

      Per-field validation failures, when any.

      max 50 items
      Show item attributes
      • code string

        Stable code for this field failure. Branch on this.

        min length 1
      • message string

        Short human-readable description of this field failure.

        min length 1
      • path array of string

        Path to the failing field, for example ["items", 2, "slot"].

      • details map of string | number | boolean | array of string | null

        Constraints that apply to the failure, such as byte limits, dimensions or allowed types.