---
title: "POST /api/script-assistant/sessions/{sessionId}/create-story"
method: POST
path: "/api/script-assistant/sessions/{sessionId}/create-story"
tags: ["ScriptAssistant"]
---

# POST /api/script-assistant/sessions/{sessionId}/create-story

`POST /api/script-assistant/sessions/{sessionId}/create-story`

## Request

- Base URL: `https://api.wearelearning.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.wearelearning.io/api/script-assistant/sessions/{sessionId}/create-story`
- Auth: OAuth 2
  - Implicit: `https://login.wearelearning.io/authorize?audience=https://api.wearelearning.io`

## Path parameters

- `sessionId` string, required

## Response `200`

OK

- CreateStoryResponseDto
  - `success` boolean, required
  - `simulationId` string, nullable
  - `message` string, required
  - `failureReason` string, nullable: Typed failure reason (e.g. "NoOutline", "CharactersNotInSlots") so the frontend can branch on it instead of matching the human-readable WeAreLearning.R2D2.Api.DTO.ScriptAssistant.CreateStoryResponseDto.Message. Null on success.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found

---

[API](https://skmtc.dev/wearelearning/apis/we-are-learning-api.md) - [All operations](https://skmtc.dev/wearelearning/apis/we-are-learning-api/llms.txt) - [OpenAPI document](https://skmtc.dev/wearelearning/apis/we-are-learning-api/revisions/e2ca5265db77?raw)
