---
title: "Block User"
method: PUT
path: "/users/{target}/block"
tags: ["Relationships"]
---

# Block User

`PUT /users/{target}/block`

Block another user by their id.

## Path parameters

- `target` string, required

## Response `200`

- User — User
  - `_id` string, required — Unique Id
  - `username` string, required — Username
  - `discriminator` string, required — Discriminator
  - `display_name` string, nullable — Display name
  - `pronouns` string, nullable — User's pronouns
  - `avatar` File — File
    - `_id` string, required — Unique Id
    - `tag` string, required — Tag / bucket this file was uploaded to
    - `filename` string, required — Original filename
    - `metadata` union, required — Metadata associated with a file
      - object — File is just a generic uncategorised file
        - `type` 'File', required
      - object — File contains textual data and should be displayed as such
        - `type` 'Text', required
      - object — File is an image with specific dimensions, and may be animated
        - `type` 'Image', required
        - `width` integer, required
        - `height` integer, required
        - `thumbhash` integer[], nullable
        - `animated` boolean, nullable
      - object — File is a video with specific dimensions
        - `type` 'Video', required
        - `width` integer, required
        - `height` integer, required
      - object — File is audio
        - `type` 'Audio', required
    - `content_type` string, required — Raw content type of this file
    - `size` integer, required — Size of this file (in bytes)
    - `deleted` boolean, nullable — Whether this file was deleted
    - `reported` boolean, nullable — Whether this file was reported
    - `message_id` string, nullable
    - `user_id` string, nullable
    - `server_id` string, nullable
    - `object_id` string, nullable — Id of the object this file is associated with
  - `relations` Relationship[] — Relationships with other users
    - `_id` string, required — Other user's Id
    - `status` union, required — User's relationship with another user (or themselves)
      - 'None' — No relationship with other user
      - 'User' — Other user is us
      - 'Friend' — Friends with the other user
      - 'Outgoing' — Pending friend request to user
      - 'Incoming' — Incoming friend request from user
      - 'Blocked' — Blocked this user
      - 'BlockedOther' — Blocked by this user
  - `badges` integer — Bitfield of user badges https://docs.rs/revolt-models/latest/revolt_models/v0/enum.UserBadges.html
  - `status` UserStatus — User's active status
    - `text` string, nullable — Custom status text
    - `presence` union — Presence status
      - 'Online' — User is online
      - 'Idle' — User is not currently available
      - 'Focus' — User is focusing / will only receive mentions
      - 'Busy' — User is busy / will not receive any notifications
      - 'Invisible' — User appears to be offline
  - `flags` integer — Enum of user flags https://docs.rs/revolt-models/latest/revolt_models/v0/enum.UserFlags.html
  - `privileged` boolean — Whether this user is privileged
  - `bot` BotInformation — Bot information for if the user is a bot
    - `owner` string, required — Id of the owner of this bot
  - `relationship` union, required — User's relationship with another user (or themselves)
    - 'None' — No relationship with other user
    - 'User' — Other user is us
    - 'Friend' — Friends with the other user
    - 'Outgoing' — Pending friend request to user
    - 'Incoming' — Incoming friend request from user
    - 'Blocked' — Blocked this user
    - 'BlockedOther' — Blocked by this user
  - `online` boolean, required — Whether this user is currently online

## Other responses

- `default` — An error occurred.

---

[API](https://skmtc.net/revolt/apis/revolt-api.md) · [All operations](https://skmtc.net/revolt/apis/revolt-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/revolt/revolt-api/versions/a235e4654b18/schema)
