---
title: "Fetch Bans"
method: GET
path: "/servers/{target}/bans"
tags: ["Server Members"]
---

# Fetch Bans

`GET /servers/{target}/bans`

Fetch all bans on a server.

## Path parameters

- `target` string, required

## Response `200`

- BanListResult — Ban list result
  - `users` BannedUser[], required — Users objects
    - `_id` string, required — Id of the banned user
    - `username` string, required — Username of the banned user
    - `discriminator` string, required — Discriminator of the banned user
    - `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
  - `bans` ServerBan[], required — Ban objects
    - `_id` MemberCompositeKey, required — Composite primary key consisting of server and user id
      - `server` string, required — Server Id
      - `user` string, required — User Id
    - `reason` string, nullable — Reason for ban creation

## 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/revisions/fee80de86d4d/schema)
