---
title: "Set history window teams"
method: POST
path: "/history_window/teams"
tags: ["product:chat"]
---

# Set history window teams

`POST /history_window/teams`

## Request

- Base URL: `https://chat.stream-io-api.com`
- URL: `https://chat.stream-io-api.com/history_window/teams`
- Auth: one of:
  - API key in header `Authorization` and API key in query parameter `api_key` and API key in header `Stream-Auth-Type`
  - API key in query parameter `api_key` and API key in header `Stream-Auth-Type`

Gives up to ten teams full history. Only for apps with the history window enabled; other apps get 403. Server-side only.

## Request body

- SetHistoryWindowTeamsRequest, nullable
  - `teams` string[], required: Teams to give full history, 1 to 10, each listed once. Marking a team that already has full history keeps its created_at

## Response `201`

Successful response

- SetHistoryWindowTeamsResponse, nullable
  - `duration` string, required: Duration of the request in milliseconds
  - `teams` HistoryWindowTeam[], required: The teams of the request, each with full history
    - `created_at` string, date-time, required: Date/time the team was first given full history
    - `team` string, required: The team, as set on channels and users
    - `updated_at` string, date-time, required: Date/time the team was last marked

## Other responses

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

## Changes

> 574 revisions in range; 3 not diffed.

- **2026-10-29** `07a3e99a260f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/getstream/apis/stream-api/changes/history_window/teams/post.md)

---

[API](https://skmtc.dev/getstream/apis/stream-api.md) - [All operations](https://skmtc.dev/getstream/apis/stream-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getstream/apis/stream-api/revisions/1fda44d40b27?raw)
