---
title: "Sets the story's narration language from the page's language dropdown. Checked against the supported languages and recorded exactly as the assistant records it."
method: PUT
path: "/api/script-assistant/sessions/{sessionId}/script-language"
tags: ["ScriptAssistant"]
---

# Sets the story's narration language from the page's language dropdown. Checked against the supported languages and recorded exactly as the assistant records it.

`PUT /api/script-assistant/sessions/{sessionId}/script-language`

## 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}/script-language`
- Auth: OAuth 2
  - Implicit: `https://login.wearelearning.io/authorize?audience=https://api.wearelearning.io`

## Path parameters

- `sessionId` string, required

## Request body

- SetScriptLanguageRequestDto
  - `languageCode` string, required: A supported language's code, e.g. "nb-NO".

## Response `200`

OK

- ScriptLanguageDto
  - `scriptLanguage` string, required: What was recorded, e.g. "Norwegian (nb-NO)".
  - `storyLocale` string, required: The locale the story is now built in.

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `422`: Unprocessable Content

---

[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)
