---
title: "Schedule turn at budget reset"
method: POST
path: "/api/chat/sessions/{session_id}/at-reset"
tags: ["v2", "chat"]
---

# Schedule turn at budget reset

`POST /api/chat/sessions/{session_id}/at-reset`

## Request

- The document declares no server URL.
- Auth: HTTP bearer

Resume the chat's paused task, or send a message, when the budget resets.

It fires just after the exhausted window that refills last. A chat has
at most one of each: a resume set again replaces the earlier one, and a
send joins the message already waiting, so nothing written meanwhile is
lost. Sending a message in the chat cancels a pending resume.

## Path parameters

- `session_id` string, required

## Request body

- AtResetRequest: A turn to run when the budget resets.
  - `kind` 'resume' | 'send', required: "resume" picks the paused task back up; "send" sends ``message`` as the user's.
  - `message` string, nullable: What to send. Required for send, ignored for resume.

## Response `200`

Successful Response

- AtResetTurn: A turn set to run when the budget resets.
  - `kind` 'resume' | 'send', required
  - `run_at` string, date-time, required
  - `message` string, nullable

## Other responses

- `401`: Authentication required
- `404`: Session not found, or not writable
- `409`: "not_out_of_budget": nothing to wait for, so carry on now. "no_reset": the allowance never refills (a trial).
- `413`: "message_too_long": the message waiting plus this one would be longer than a single message may be
- `422`: Validation Error
- `503`: Usage could not be read; retry shortly

## Changes

- **2026-10-16** `ad42c53e22ca`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server/changes/api/chat/sessions/:session_id/at-reset/post.md)

---

[API](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server.md) - [All operations](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server/llms.txt) - [OpenAPI document](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server/revisions/c508818c16ad?raw)
