---
title: "Write Scripted Step"
method: POST
path: "/chats/{chat_id}/scripted-step"
tags: ["Chats"]
---

# Write Scripted Step

`POST /chats/{chat_id}/scripted-step`

## Request

- Base URL: `https://api.excellence-ai.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.excellence-ai.com/chats/{chat_id}/scripted-step`
- Auth: OAuth 2 (password, token URL `api/login`)

The student's answer to a scripted opening's matière card, answered
without the model with the chapters of that matière (EXC-1554).

## Path parameters

- `chat_id` string, required

## Request body

- ScriptedStepRequest
  - `message` string, required

## Response `200`

Successful Response

- ScriptedOpeningResponse
  - `user_text` string, required
  - `reply` string, required
  - `tool_activity` object[], nullable
  - `scripted_step` string, nullable

## Other responses

- `404`: Resource not found
- `409`: Business rule violated
- `422`: Validation Error

## Changes

> 55 revisions in range; 1 not diffed.

- **2026-10-21** `1d6009058248`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/excellence-ai/apis/excellence-learning/changes/chats/:chat_id/scripted-step/post.md)

---

[API](https://skmtc.dev/excellence-ai/apis/excellence-learning.md) - [All operations](https://skmtc.dev/excellence-ai/apis/excellence-learning/llms.txt) - [OpenAPI document](https://skmtc.dev/excellence-ai/apis/excellence-learning/revisions/379e4a57dee8?raw)
