---
title: "Store session logs"
method: POST
path: "/api/session-logs"
tags: ["Session Data"]
---

# Store session logs

`POST /api/session-logs`

## Request body

- object
  - `sessionId` string, required
  - `iteration` integer, required
  - `lines` string[], required
  - `taskId` string
  - `cli` string

## Response `201`

Logs stored

- object
  - `success` true, required
  - `count` integer, required

## Other responses

- `400` — Validation error

## Changes

- **2026-08-07** `06cac6a7c5bc` — 2 info
  - added the media type `application/json` for the response with the status `201`
  - added the media type `application/json` for the response with the status `400`

[Change history](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/changes/api/session-logs/post.md)

---

[API](https://skmtc.dev/desplega-ai/apis/agent-swarm-api.md) · [All operations](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/desplega-ai/agent-swarm-api/revisions/db1079e034dc/schema)
