---
title: "Block user"
method: POST
path: "/users/block"
tags: ["product:chat"]
---

# Block user

`POST /users/block`

Block users

## Request body

- BlockUsersRequest, nullable
  - `blocked_user_id` string, required — User id to block
  - `user` UserRequest — User request object
    - `custom` object — Custom user data
    - `id` string, required — User ID
    - `image` string — User's profile image URL
    - `invisible` boolean
    - `language` string
    - `name` string — Optional name of user
    - `privacy_settings` PrivacySettingsResponse
      - `delivery_receipts` DeliveryReceiptsResponse
        - `enabled` boolean
      - `read_receipts` ReadReceiptsResponse
        - `enabled` boolean
      - `typing_indicators` TypingIndicatorsResponse
        - `enabled` boolean
    - `role` string — User's global role
    - `teams` string[] — List of teams the user belongs to
    - `teams_role` object — Map of team-specific roles for the user
  - `user_id` string

## Response `201`

Successful response

- BlockUsersResponse, nullable
  - `blocked_by_user_id` string, required — User id who blocked another user
  - `blocked_user_id` string, required — User id who got blocked
  - `created_at` string, date-time, required — Timestamp when the user was blocked
  - `duration` string, required — Duration of the request in milliseconds

## Other responses

- `400` — Bad request
- `429` — Too many requests

---

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