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

# POST /api/script-assistant/sessions/{sessionId}/files

`POST /api/script-assistant/sessions/{sessionId}/files`

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

## Path parameters

- `sessionId` string, required

## Request body `multipart/form-data`

- object
  - `file` string, binary

## Response `200`

OK

- FileUploadResultDto
  - `fileId` string, required
  - `fileName` string, required
  - `status` 'Pending' | 'Converting' | 'Succeeded' | 'Failed', required
  - `parsingSucceeded` boolean, required: Derived from WeAreLearning.R2D2.Api.DTO.ScriptAssistant.FileUploadResultDto.Status for one release. The API and the client deploy separately, so removing this before the client stops reading it makes every upload look failed. Delete once the client is out — tracked as a follow-up.
  - `parsingErrorCode` 'None' | 'Unknown' | 'UnsupportedFileType' | 'FileTooLarge' | 'EncryptedFile' | 'NoTextFound' | 'CorruptFile' | 'Timeout' | 'SuspectedZipBomb' | 'TooManySlides' | 'SourceExpired' | 'NotASlideDeck', required
  - `skippedCount` integer, required: Pages or slides that could not be read and were skipped. Greater than zero means the extraction succeeded but is incomplete, so clients can warn the user.
  - `extractedTextPreview` string, nullable
  - `isSlideDeck` boolean, required: Whether this upload classified as a slide deck.
  - `slideCount` integer, nullable: Nullable and advisory. Known for parse-backed OpenXML decks and a successfully-parsed `.pdf`; null — never zero — for conversion-backed formats and anything else not yet known, since nothing reads those before LibreOffice conversion runs. For a deck it counts the slides that will render, so hidden slides are excluded.

## Other responses

- `400`: Bad Request
- `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)
