Skip to content
MediuxDocs

Follow or hide a User

PUT/relationships/{username}

Sets your relationship with a User to follow or hide.

There is one relationship per pair of Users, so setting hide replaces a follow. The body is limited to 1 KiB. An app can make 50 follow changes per User per day across all apps; hides and clears are not limited. Following a User again within 24 hours of the last follow sends no new Notification. The username matches in any letter case; an unknown, banned or hidden User returns 404, and naming yourself returns 422 relationship.self. Usernames can change, and a freed username can be taken by another User: store the target's id and re-read its current username (from GET /relationships or the profile) before writing.

Authorization

OAuth 2 bearer token in the Authorization header. Required scope: relationships:manage

Path parameters

  • username string required

    The username of the User to follow, hide or clear, in any letter case.

    pattern

Request body required

The relationship to set.

Content type:application/json

  • kind string required
    "follow""hide"

Responses

200 The relationship now in place.

Headers

  • Cache-Control string

    Browser caching policy.

    "private, no-store"
  • data object
    Show child attributes
    • kind string
      "follow""hide"
    • target object
      Show child attributes
      • id string (uuid)
      • username string
        min length 1
      • avatar object | null
        Show child attributes
        • id string (uuid)

          Stable image ID, a lowercase UUID. Variant filenames use the same ID.

        • extension string

          Extension of the Original, such as png.

          pattern ^[a-z0-9]{2,5}$
    • createdAt string

      ISO 8601 UTC instant with milliseconds, such as 2026-11-14T15:03:02.000Z.

      pattern
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.

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.

422 A business rule refused the request. Inspect error.code.

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.

The path holds the target’s username, in any letter case (/relationships/Koltom and /relationships/koltom are the same user), and the body holds the relationship:

{ "kind": "follow" }

The response is the resulting row, with the target’s stable id and current username. Store the id: usernames can change, and a freed username can be taken by another user, so re-read the current username (from GET /relationships or the user’s profile) before writing. An unknown username answers 404. Setting hide on a followed user replaces the follow, because each pair of users has one relationship.

An app can make 50 follow changes per user each day (UTC), across all apps. After that, PUT answers 429 with request.rateLimited, details.scope: "follows" and a Retry-After. Hides and clears are not limited. Following a user again within 24 hours of the last follow sends the target no second notification.