---
title: "Set Session Stream Header"
method: POST
path: "/sessions/streams/header"
tags: ["Sessions", "Sessions"]
---

# Set Session Stream Header

`POST /sessions/streams/header`

## Query parameters

- `session_id` string, required

## Request body

- SessionStreamHeaderEdit — The rename edit: a full-PUT of the header fields only. Distinct from SessionStreamEdit (used by the flag-mirror/heartbeat paths) so the liveness-only writes can never carry name/description, and vice versa. The one other header writer is the heartbeat's fill-once proposal, which goes through the DAO's NULL-guarded `fill_missing` and so cannot overwrite this edit. ``name`` may be omitted/``None`` (no change) or an empty string (the explicit clear-title action the chat rail's rename path uses), but a NON-empty name must contain a non-whitespace character: storing ``" "`` clears the visible title while the row still holds a value, a state no caller ever means. The LLM-facing ``rename_session`` schema already rejects both; this closes the direct-API hole.
  - `name` string, nullable
  - `description` string, nullable

## Response `200`

Successful Response

- SessionStreamResponse
  - `stream` SessionStream
    - `created_at` string, date-time, nullable
    - `updated_at` string, date-time, nullable
    - `deleted_at` string, date-time, nullable
    - `created_by_id` string, uuid, nullable
    - `updated_by_id` string, uuid, nullable
    - `deleted_by_id` string, uuid, nullable
    - `name` string, nullable
    - `description` string, nullable
    - `id` string, uuid, nullable
    - `project_id` string, uuid, required
    - `session_id` string, required
    - `flags` SessionStreamFlags — The nest as primitive bools (alive ⊇ running ⊇ attached). resumable (alive & !running) and reattachable (running & !attached) are derived client-side, never stored.
      - `is_alive` boolean
      - `is_running` boolean
      - `is_attached` boolean
    - `tags` object, nullable
    - `meta` object, nullable
    - `turn_id` string, nullable
    - `references` SessionReference[], nullable
      - `version` string, nullable
      - `slug` string, nullable
      - `id` string, uuid, nullable
      - `key` string, nullable
    - `archived_at` string, date-time, nullable
    - `origin` 'manual' | 'trigger'
    - `trigger` SessionTrigger
      - `id` string, uuid, required
      - `kind` 'schedule' | 'subscription', required
      - `name` string, nullable
    - `delivery` SessionDelivery
      - `id` string, uuid, required

## Other responses

- `422` — Validation Error

---

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